smp::sampler_base< typeparams > Class Template Reference

The abstract class that specifies the structure of a sampler component. More...

#include <base.h>

Inheritance diagram for smp::sampler_base< typeparams >:
smp::sampler_halton< typeparams, NUM_DIMENSIONS > smp::sampler_trajectory_bias< typeparams, NUM_DIMENSIONS > smp::sampler_uniform< typeparams, NUM_DIMENSIONS >

List of all members.

Public Member Functions

virtual int sm_update_insert_vertex (vertex_t *vertex_in)=0
 Update function for vertex insertion.
virtual int sm_update_insert_edge (edge_t *edge_in)=0
 Update function for edge insertion.
virtual int sm_update_delete_vertex (vertex_t *vertex_in)=0
 Update function for vertex deletion.
virtual int sm_update_delete_edge (edge_t *edge_in)=0
 Update function for edge insertion.
virtual int sample (state_t **state_sample_out)=0
 Provides a sample state from the state space.

Detailed Description

template<class typeparams>
class smp::sampler_base< typeparams >

The abstract class that specifies the structure of a sampler component.

A sampler component provides random or quasi-random samples of states. This abstract class specifies how the sample function should be implemented in any derived class.


Member Function Documentation

template<class typeparams >
virtual int smp::sampler_base< typeparams >::sample ( state_t **  state_sample_out) [pure 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.

Parameters:
state_sample_outA pointer to the state that will be returned. This variable can be set to, e.g., the address of a null pointer.
Returns:
Returns 1 for success, a non-positive number for failure.

Implemented in smp::sampler_halton< typeparams, NUM_DIMENSIONS >, smp::sampler_trajectory_bias< typeparams, NUM_DIMENSIONS >, and smp::sampler_uniform< typeparams, NUM_DIMENSIONS >.

template<class typeparams >
virtual int smp::sampler_base< typeparams >::sm_update_delete_edge ( edge_t edge_in) [pure 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.

Parameters:
edge_inA pointer to deleted edge.
Returns:
Return 1 for success, a non-positive value to indiacate error.

Implemented in smp::sampler_halton< typeparams, NUM_DIMENSIONS >, smp::sampler_trajectory_bias< typeparams, NUM_DIMENSIONS >, and smp::sampler_uniform< typeparams, NUM_DIMENSIONS >.

template<class typeparams >
virtual int smp::sampler_base< typeparams >::sm_update_delete_vertex ( vertex_t vertex_in) [pure 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.

Parameters:
vertex_inA pointer to deleted vertex.
Returns:
Return 1 if success, a non-positive value to indiacate error.

Implemented in smp::sampler_halton< typeparams, NUM_DIMENSIONS >, smp::sampler_trajectory_bias< typeparams, NUM_DIMENSIONS >, and smp::sampler_uniform< typeparams, NUM_DIMENSIONS >.

template<class typeparams >
virtual int smp::sampler_base< typeparams >::sm_update_insert_edge ( edge_t edge_in) [pure 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.

Parameters:
edge_inA pointer to the new edge.
Returns:
Return 1 for success, a non-positive value to indiacate error.

Implemented in smp::sampler_halton< typeparams, NUM_DIMENSIONS >, smp::sampler_trajectory_bias< typeparams, NUM_DIMENSIONS >, and smp::sampler_uniform< typeparams, NUM_DIMENSIONS >.

template<class typeparams >
virtual int smp::sampler_base< typeparams >::sm_update_insert_vertex ( vertex_t vertex_in) [pure 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.

Parameters:
vertex_inA pointer to the new vertex.
Returns:
Return 1 if success, a non-positive value to indiacate error.

Implemented in smp::sampler_halton< typeparams, NUM_DIMENSIONS >, smp::sampler_trajectory_bias< typeparams, NUM_DIMENSIONS >, and smp::sampler_uniform< typeparams, NUM_DIMENSIONS >.


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