Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::NumericStats Struct Reference

Static Public Member Functions

static DUCKDB_API BaseStatistics CreateUnknown (LogicalType type)
 Unknown statistics - i.e. "has_min" is false, "has_max" is false.
 
static DUCKDB_API BaseStatistics CreateEmpty (LogicalType type)
 Empty statistics - i.e. "min = MaxValue<type>, max = MinValue<type>".
 
static DUCKDB_API bool IsConstant (const BaseStatistics &stats)
 Returns true if the stats has a constant value.
 
static DUCKDB_API bool HasMinMax (const BaseStatistics &stats)
 Returns true if the stats has both a min and max value defined.
 
static DUCKDB_API bool HasMin (const BaseStatistics &stats)
 Returns true if the stats has a min value defined.
 
static DUCKDB_API bool HasMax (const BaseStatistics &stats)
 Returns true if the stats has a max value defined.
 
static DUCKDB_API Value Min (const BaseStatistics &stats)
 Returns the min value - throws an exception if there is no min value.
 
static DUCKDB_API Value Max (const BaseStatistics &stats)
 Returns the max value - throws an exception if there is no max value.
 
static DUCKDB_API void SetMin (BaseStatistics &stats, const Value &val)
 Sets the min value of the statistics.
 
static DUCKDB_API void SetMax (BaseStatistics &stats, const Value &val)
 Sets the max value of the statistics.
 
template<class T >
static void SetMax (BaseStatistics &stats, T val)
 
template<class T >
static void SetMin (BaseStatistics &stats, T val)
 
static DUCKDB_API FilterPropagateResult CheckZonemap (const BaseStatistics &stats, ExpressionType comparison_type, array_ptr< const Value > constants)
 Check whether or not a given comparison with a constant could possibly be satisfied by rows given the statistics.
 
static DUCKDB_API void Merge (BaseStatistics &stats, const BaseStatistics &other_p)
 
static DUCKDB_API void Serialize (const BaseStatistics &stats, Serializer &serializer)
 
static DUCKDB_API void Deserialize (Deserializer &deserializer, BaseStatistics &stats)
 
static DUCKDB_API string ToString (const BaseStatistics &stats)
 
template<class T >
static void UpdateValue (T new_value, T &min, T &max)
 
template<class T >
static void Update (NumericStatsData &nstats, T new_value)
 
static void Verify (const BaseStatistics &stats, Vector &vector, const SelectionVector &sel, idx_t count)
 
template<class T >
staticGetMin (const BaseStatistics &stats)
 
template<class T >
staticGetMax (const BaseStatistics &stats)
 
template<class T >
staticGetMinUnsafe (const BaseStatistics &stats)
 
template<class T >
staticGetMaxUnsafe (const BaseStatistics &stats)
 

Static Private Member Functions

static NumericStatsDataGetDataUnsafe (BaseStatistics &stats)
 
static const NumericStatsDataGetDataUnsafe (const BaseStatistics &stats)
 
static Value MinOrNull (const BaseStatistics &stats)
 
static Value MaxOrNull (const BaseStatistics &stats)
 
template<class T >
static void TemplatedVerify (const BaseStatistics &stats, Vector &vector, const SelectionVector &sel, idx_t count)
 

Member Function Documentation

◆ SetMax()

template<class T >
static void duckdb::NumericStats::SetMax ( BaseStatistics stats,
val 
)
inlinestatic
15224 {
15225 auto &nstats = GetDataUnsafe(stats);
15226 nstats.has_max = true;
15227 nstats.max.GetReferenceUnsafe<T>() = val;
15228 }

◆ SetMin()

template<class T >
static void duckdb::NumericStats::SetMin ( BaseStatistics stats,
val 
)
inlinestatic
15231 {
15232 auto &nstats = GetDataUnsafe(stats);
15233 nstats.has_min = true;
15234 nstats.min.GetReferenceUnsafe<T>() = val;
15235 }

◆ UpdateValue()

template<class T >
static void duckdb::NumericStats::UpdateValue ( new_value,
T &  min,
T &  max 
)
inlinestatic
15249 {
15250 min = LessThan::Operation(new_value, min) ? new_value : min;
15251 max = GreaterThan::Operation(new_value, max) ? new_value : max;
15252 }
static softfloat min()
static softfloat max()

◆ Update()

template<class T >
static void duckdb::NumericStats::Update ( NumericStatsData nstats,
new_value 
)
inlinestatic
15254 {
15255 UpdateValue<T>(new_value, nstats.min.GetReferenceUnsafe<T>(), nstats.max.GetReferenceUnsafe<T>());
15256 }

◆ GetMin()

template<class T >
static T duckdb::NumericStats::GetMin ( const BaseStatistics stats)
inlinestatic
15261 {
15262 return NumericStats::Min(stats).GetValueUnsafe<T>();
15263 }
static DUCKDB_API Value Min(const BaseStatistics &stats)
Returns the min value - throws an exception if there is no min value.

◆ GetMax()

template<class T >
static T duckdb::NumericStats::GetMax ( const BaseStatistics stats)
inlinestatic
15265 {
15266 return NumericStats::Max(stats).GetValueUnsafe<T>();
15267 }
static DUCKDB_API Value Max(const BaseStatistics &stats)
Returns the max value - throws an exception if there is no max value.

The documentation for this struct was generated from the following file: