Implements the sampler components that relies on uniform sampling. More...
#include <uniform.h>
Public Member Functions | |
int | sm_update_insert_vertex (vertex_t *vertex_in) |
Update function for vertex insertion. | |
int | sm_update_insert_edge (edge_t *edge_in) |
Update function for edge insertion. | |
int | sm_update_delete_vertex (vertex_t *vertex_in) |
Update function for vertex deletion. | |
int | sm_update_delete_edge (edge_t *edge_in) |
Update function for edge insertion. | |
int | sample (state_t **state_sample_out) |
Provides a sample state from the state space. | |
int | set_support (const region_t support_in) |
Sets the dimensions and position of the rectangular bounding box of the support. |
Implements the sampler components that relies on uniform sampling.
A sampler component that implements uniform sampling.
libbot_rrg_double_integrator.cpp, libbot_rrg_dubins_car.cpp, libbot_rrg_dubins_double_integrator_airplane.cpp, libbot_rrg_single_integrator.cpp, libbot_rrg_single_integrator_mu_calculus.cpp, libbot_rrt_double_integrator.cpp, libbot_rrt_dubins_car.cpp, libbot_rrt_dubins_double_integrator_airplane.cpp, libbot_rrt_single_integrator.cpp, libbot_rrtstar_double_integrator.cpp, libbot_rrtstar_dubins_car.cpp, libbot_rrtstar_dubins_double_integrator_airplane.cpp, libbot_rrtstar_single_integrator.cpp, standalone_rrg_double_integrator.cpp, standalone_rrg_dubins_car.cpp, standalone_rrg_dubins_double_integrator_airplane.cpp, standalone_rrg_single_integrator.cpp, standalone_rrg_single_integrator_mu_calculus.cpp, standalone_rrt_double_integrator.cpp, standalone_rrt_dubins_car.cpp, standalone_rrt_dubins_double_integrator_airplane.cpp, standalone_rrt_single_integrator.cpp, standalone_rrtstar_double_integrator.cpp, standalone_rrtstar_dubins_car.cpp, standalone_rrtstar_dubins_double_integrator_airplane.cpp, and standalone_rrtstar_single_integrator.cpp.
int smp::sampler_uniform< typeparams, NUM_DIMENSIONS >::sample | ( | state_t ** | state_sample_out | ) | [virtual] |
Provides a sample state from the state space.
This function creates (by allocating the memory) for a new state that is sampled (randomly or quasi-randomly) from the state space. It returns a pointer to the new state.
state_sample_out | A pointer to the state that will be returned. This variable can be set to, e.g., the address of a null pointer. |
Implements smp::sampler_base< typeparams >.
int smp::sampler_uniform< typeparams, NUM_DIMENSIONS >::set_support | ( | const region_t | support_in | ) |
Sets the dimensions and position of the rectangular bounding box of the support.
Uniform distribution only makes sense in a bounded support, which can be set using this function. This sampler function only draws samples from a rectangular box in the Euclidean space with dimensions NUM_DIMENSIONS, which is a template parameter to the uniform sampler class. If the support variable is not set, i.e., this function is never called, then the support is initialized to the unit cube centered at the origin by default.
support_in | New support for the uniform sampling distribution. |
int smp::sampler_uniform< typeparams, NUM_DIMENSIONS >::sm_update_delete_edge | ( | edge_t * | edge_in | ) | [virtual] |
Update function for edge insertion.
This function is called by the planner whenever an edge is delete from the graph. A pointer to the edge is given as an argument.
edge_in | A pointer to deleted edge. |
Implements smp::sampler_base< typeparams >.
int smp::sampler_uniform< typeparams, NUM_DIMENSIONS >::sm_update_delete_vertex | ( | vertex_t * | vertex_in | ) | [virtual] |
Update function for vertex deletion.
This function is called by the planner whenever a vertex is deleted from the graph. A pointer to the vertex is given as an argument.
vertex_in | A pointer to deleted vertex. |
Implements smp::sampler_base< typeparams >.
int smp::sampler_uniform< typeparams, NUM_DIMENSIONS >::sm_update_insert_edge | ( | edge_t * | edge_in | ) | [virtual] |
Update function for edge insertion.
This function is called by the planner whenever a new edge is added to the graph. A pointer to the new edge is given as an argument.
edge_in | A pointer to the new edge. |
Implements smp::sampler_base< typeparams >.
int smp::sampler_uniform< typeparams, NUM_DIMENSIONS >::sm_update_insert_vertex | ( | vertex_t * | vertex_in | ) | [virtual] |
Update function for vertex insertion.
This function is called by the planner whenever a new vertex is added to the graph. A pointer to the new vertex is given as an argument.
vertex_in | A pointer to the new vertex. |
Implements smp::sampler_base< typeparams >.