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::BlockingSample Class Referenceabstract
Inheritance diagram for duckdb::BlockingSample:
Collaboration diagram for duckdb::BlockingSample:

Public Member Functions

 BlockingSample (int64_t seed=-1)
 
virtual void AddToReservoir (DataChunk &input)=0
 Add a chunk of data to the sample.
 
virtual unique_ptr< BlockingSampleCopy () const =0
 
virtual void Finalize ()=0
 
virtual void Destroy ()
 
virtual unique_ptr< DataChunkGetChunk ()=0
 
virtual void Serialize (Serializer &serializer) const
 
std::pair< double, idx_tPopFromWeightQueue ()
 Helper functions needed to merge two reservoirs while respecting weights of sampled rows.
 
double GetMinWeightThreshold ()
 
idx_t GetPriorityQueueSize ()
 
template<class TARGET >
TARGETCast ()
 
template<class TARGET >
const TARGETCast () const
 

Static Public Member Functions

static unique_ptr< BlockingSampleDeserialize (Deserializer &deserializer)
 

Public Attributes

unique_ptr< BaseReservoirSamplingbase_reservoir_sample
 
SampleType type
 The sample type.
 
bool destroyed
 has the sample been destroyed due to updates to the referenced table
 

Static Public Attributes

static constexpr const SampleType TYPE = SampleType::BLOCKING_SAMPLE
 

Constructor & Destructor Documentation

◆ BlockingSample()

duckdb::BlockingSample::BlockingSample ( int64_t  seed = -1)
inlineexplicit
47815 : base_reservoir_sample(make_uniq<BaseReservoirSampling>(seed)), type(SampleType::BLOCKING_SAMPLE),
47816 destroyed(false) {
47817 }
bool destroyed
has the sample been destroyed due to updates to the referenced table
Definition duckdb.hpp:47811
SampleType type
The sample type.
Definition duckdb.hpp:47809

◆ ~BlockingSample()

virtual duckdb::BlockingSample::~BlockingSample ( )
inlinevirtual
47818 {
47819 }

Member Function Documentation

◆ AddToReservoir()

virtual void duckdb::BlockingSample::AddToReservoir ( DataChunk input)
pure virtual

Add a chunk of data to the sample.

Implemented in duckdb::ReservoirSample, and duckdb::ReservoirSamplePercentage.

◆ Copy()

virtual unique_ptr< BlockingSample > duckdb::BlockingSample::Copy ( ) const
pure virtual

Implemented in duckdb::ReservoirSample.

◆ GetChunk()

virtual unique_ptr< DataChunk > duckdb::BlockingSample::GetChunk ( )
pure virtual

Fetches a chunk from the sample. destroy = true should only be used when querying from a sample defined in a query and not a duckdb_table_sample.

Implemented in duckdb::ReservoirSample, and duckdb::ReservoirSamplePercentage.

◆ Cast() [1/2]

template<class TARGET >
TARGET & duckdb::BlockingSample::Cast ( )
inline
47841 {
47842 if (type != TARGET::TYPE && TARGET::TYPE != SampleType::BLOCKING_SAMPLE) {
47843 throw InternalException("Failed to cast sample to type - sample type mismatch");
47844 }
47845 return reinterpret_cast<TARGET &>(*this);
47846 }

◆ Cast() [2/2]

template<class TARGET >
const TARGET & duckdb::BlockingSample::Cast ( ) const
inline
47849 {
47850 if (type != TARGET::TYPE && TARGET::TYPE != SampleType::BLOCKING_SAMPLE) {
47851 throw InternalException("Failed to cast sample to type - sample type mismatch");
47852 }
47853 return reinterpret_cast<const TARGET &>(*this);
47854 }

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