![]() |
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.
|
The reservoir sample sample_size class maintains a streaming sample of variable size. More...


Public Member Functions | |
| ReservoirSamplePercentage (Allocator &allocator, double percentage, int64_t seed=-1) | |
| ReservoirSamplePercentage (double percentage, int64_t seed, idx_t reservoir_sample_size) | |
| ReservoirSamplePercentage (double percentage, int64_t seed=-1) | |
| void | AddToReservoir (DataChunk &input) override |
| Add a chunk of data to the sample. | |
| unique_ptr< BlockingSample > | Copy () const override |
| unique_ptr< DataChunk > | GetChunk () override |
| Fetches a chunk from the sample. If destory = true this method is descructive. | |
| void | Finalize () override |
| void | Serialize (Serializer &serializer) const override |
Public Member Functions inherited from duckdb::BlockingSample | |
| BlockingSample (int64_t seed=-1) | |
| virtual void | Destroy () |
| std::pair< double, idx_t > | PopFromWeightQueue () |
| Helper functions needed to merge two reservoirs while respecting weights of sampled rows. | |
| double | GetMinWeightThreshold () |
| idx_t | GetPriorityQueueSize () |
| template<class TARGET > | |
| TARGET & | Cast () |
| template<class TARGET > | |
| const TARGET & | Cast () const |
Static Public Member Functions | |
| static unique_ptr< BlockingSample > | Deserialize (Deserializer &deserializer) |
Static Public Member Functions inherited from duckdb::BlockingSample | |
| static unique_ptr< BlockingSample > | Deserialize (Deserializer &deserializer) |
Static Public Attributes | |
| static constexpr const SampleType | TYPE = SampleType::RESERVOIR_PERCENTAGE_SAMPLE |
Static Public Attributes inherited from duckdb::BlockingSample | |
| static constexpr const SampleType | TYPE = SampleType::BLOCKING_SAMPLE |
Private Attributes | |
| Allocator & | allocator |
| double | sample_percentage |
| The sample_size to sample. | |
| idx_t | reservoir_sample_size |
| The fixed sample size of the sub-reservoirs. | |
| unique_ptr< ReservoirSample > | current_sample |
| The current sample. | |
| vector< unique_ptr< ReservoirSample > > | finished_samples |
| The set of finished samples of the reservoir sample. | |
| idx_t | current_count = 0 |
| The amount of tuples that have been processed so far (not put in the reservoir, just processed) | |
| bool | is_finalized |
Static Private Attributes | |
| static constexpr idx_t | RESERVOIR_THRESHOLD = 100000 |
Additional Inherited Members | |
Public Attributes inherited from duckdb::BlockingSample | |
| unique_ptr< BaseReservoirSampling > | base_reservoir_sample |
| SampleType | type |
| The sample type. | |
| bool | destroyed |
| has the sample been destroyed due to updates to the referenced table | |
The reservoir sample sample_size class maintains a streaming sample of variable size.
Add a chunk of data to the sample.
Implements duckdb::BlockingSample.
|
overridevirtual |
Implements duckdb::BlockingSample.
|
overridevirtual |
Fetches a chunk from the sample. If destory = true this method is descructive.
Implements duckdb::BlockingSample.
|
overridevirtual |
Implements duckdb::BlockingSample.
|
overridevirtual |
Reimplemented from duckdb::BlockingSample.
|
private |
Whether or not the stream is finalized. The stream is automatically finalized on the first call to GetChunkAndShrink();