37 #ifndef OMPL_BASE_PRECOMPUTED_SEQUENCE
38 #define OMPL_BASE_PRECOMPUTED_SEQUENCE
40 #include "ompl/base/samplers/deterministic/DeterministicSequence.h"
49 class PrecomputedSequence :
public DeterministicSequence
58 size_t max_samples = 0);
62 std::vector<double>
sample()
override;
65 std::vector<std::vector<double>> sample_set_;
66 size_t current_index_{0};
67 std::default_random_engine rand_eng_;
70 void readSamplesFromFile(std::string path,
unsigned int dimensions,
size_t max_samples = 0);
73 void shuffleSamples();
std::vector< double > sample() override
Returns the next sample, loops if there are no more precomputed samples. The range of the samples dep...
PrecomputedSequence(std::string path, unsigned int dimensions, bool shuffle=false, size_t max_samples=0)
Constructor, requires the path of file containing the precomputed samples formated with one sample pe...
Main namespace. Contains everything in this library.