StateStorage.h
151 virtual StateSamplerAllocator getStateSamplerAllocatorRange(std::size_t from, std::size_t to) const;
254 }
278 };
285 }
bool hasMetadata() const
Return a flag that indicates whether there is metadata associated to the states in this storage.
Definition: StateStorage.h:220
void sort(const std::function< bool(const State *, const State *)> &op)
Sort the states according to the less-equal operator op. Metadata is NOT sorted; if metadata was adde...
Definition: StateStorage.cpp:230
const M & getMetadata(unsigned int index) const
Get const access to the metadata of a state at a particular index.
Definition: StateStorage.h:314
virtual void loadStates(const Header &h, boost::archive::binary_iarchive &ia)
Load the states from a binary archive ia, given the loaded header is h.
Definition: StateStorage.cpp:133
virtual void loadMetadata(const Header &h, boost::archive::binary_iarchive &ia)
Load the state metadata from a binary archive ia, given the loaded header is h. No metadata is actual...
Definition: StateStorage.cpp:150
StateSamplerAllocator getStateSamplerAllocator() const
Get a sampler allocator to a sampler that can be specified for a StateSpace, such that all sampled st...
Definition: StateStorage.cpp:235
StateSamplerAllocator getStateSamplerAllocatorRangeUntil(std::size_t until) const
Get a sampler allocator to a sampler that can be specified for a StateSpace, such that all sampled st...
Definition: StateStorage.cpp:240
void addState(const State *state) override
Add a state to the set of states maintained by this storage structure. The state is copied to interna...
Definition: StateStorage.h:293
void loadMetadata(const Header &, boost::archive::binary_iarchive &ia) override
Load the state metadata from a binary archive ia, given the loaded header is h. No metadata is actual...
Definition: StateStorage.h:328
Manage loading and storing for a set of states of a specified state space.
Definition: StateStorage.h:125
const StateSpacePtr & getStateSpace() const
Get the state space this class maintains states for.
Definition: StateStorage.h:165
virtual void storeStates(const Header &h, boost::archive::binary_oarchive &oa)
Store the states to a binary archive oa, given the stored header is h.
Definition: StateStorage.cpp:180
virtual void generateSamples(unsigned int count)
Generate count states uniformly at random and store them in this structure.
Definition: StateStorage.cpp:205
void load(const char *filename)
Load a set of states from a specified file.
Definition: StateStorage.cpp:83
void serialize(Archive &ar, const unsigned int)
boost::serialization routine
Definition: StateStorage.h:268
virtual StateSamplerAllocator getStateSamplerAllocatorRange(std::size_t from, std::size_t to) const
Get a sampler allocator to a sampler that can be specified for a StateSpace, such that all sampled st...
Definition: StateStorage.cpp:250
Information stored at the beginning of the archive.
Definition: StateStorage.h:254
StateSpacePtr space_
State space that corresponds to maintained states.
Definition: StateStorage.h:298
State * getState(unsigned int index)
Get a particular state for non-const access.
Definition: StateStorage.h:205
void storeMetadata(const Header &, boost::archive::binary_oarchive &oa) override
Save the state metadata to a binary archive oa, given the stored header is h. No metadata is actually...
Definition: StateStorage.h:335
StateStorage(StateSpacePtr space)
The state space to store states for is specified as argument.
Definition: StateStorage.cpp:74
virtual void clear()
Clear the stored states. This frees all the memory.
Definition: StateStorage.cpp:224
std::function< StateSamplerPtr(const StateSpace *)> StateSamplerAllocator
Definition of a function that can allocate a state sampler.
Definition: StateSampler.h:255
virtual void addState(const State *state)
Add a state to the set of states maintained by this storage structure. The state is copied to interna...
Definition: StateStorage.cpp:198
const std::vector< const State * > & getStates() const
Get the stored states.
Definition: StateStorage.h:199
A shared pointer wrapper for ompl::base::StateSpace.
void clear() override
Clear the stored states. This frees all the memory.
Definition: StateStorage.h:307
StateSamplerAllocator getStateSamplerAllocatorRangeAfter(std::size_t after) const
Get a sampler allocator to a sampler that can be specified for a StateSpace, such that all sampled st...
Definition: StateStorage.cpp:245
StateStorageWithMetadata(const StateSpacePtr &space)
The state space to store states for is specified as argument.
Definition: StateStorage.h:285
State storage that allows storing state metadata as well.
Definition: StateStorage.h:278
virtual void print(std::ostream &out=std::cout) const
Output the set of states to a specified stream, in a human readable fashion.
Definition: StateStorage.cpp:263
std::vector< int > signature
Signature of state space that allocated the saved states (see ompl::base::StateSpace::computeSignatur...
Definition: StateStorage.h:264
virtual void storeMetadata(const Header &h, boost::archive::binary_oarchive &oa)
Save the state metadata to a binary archive oa, given the stored header is h. No metadata is actually...
Definition: StateStorage.cpp:194
bool hasMetadata_
Flag indicating whether there is metadata associated to the states in this storage.
Definition: StateStorage.h:304