src/smp/components/samplers/trajectory_bias.h

Go to the documentation of this file.
00001 
00009 #ifndef _SMP_SAMPLER_TRAJECTORY_BIAS_H_
00010 #define _SMP_SAMPLER_TRAJECTORY_BIAS_H_
00011 
00012 #include <smp/components/samplers/base.h>
00013 #include <smp/common/region.h>
00014 #include <smp/planner_utils/trajectory.h>
00015 
00016 
00017 namespace smp {
00018 
00020 
00028 template < class typeparams, int NUM_DIMENSIONS >
00029 class sampler_trajectory_bias : public sampler_base< typeparams > {
00030 
00031     typedef typename typeparams::state state_t;
00032     typedef typename typeparams::input input_t;
00033     typedef typename typeparams::vertex_data vertex_data_t;
00034     typedef typename typeparams::edge_data edge_data_t;
00035 
00036     typedef vertex<typeparams> vertex_t;
00037     typedef edge<typeparams> edge_t;
00038 
00039     typedef trajectory<typeparams> trajectory_t;
00040 
00041     typedef region<NUM_DIMENSIONS> region_t;
00042 
00043     typedef int (*trajectory_update_func_t)(trajectory_t *);
00044 
00045     
00046     double bias_probability;
00047     
00048     double dispersion;
00049     
00050     region_t support;
00051 
00052     trajectory_t sample_trajectory;
00053     double length_sample_trajectory;
00054     
00055 public:
00056     sampler_trajectory_bias ();
00057     ~sampler_trajectory_bias ();
00058 
00059 
00060     int sm_update_insert_vertex (vertex_t *vertex_in);
00061     
00062 
00063     int sm_update_insert_edge (edge_t *edge_in);  
00064 
00065 
00066     int sm_update_delete_vertex (vertex_t *vertex_in);
00067     
00068     
00069     int sm_update_delete_edge (edge_t *edge_in);
00070 
00071 
00072     int sample (state_t **state_sample_out);
00073 
00074 
00091     int set_support (const region_t support_in);
00092     
00103     int update_trajectory (trajectory_t *trajectory_in);
00104 
00105 
00116     int set_sample_dispersion (double dispersion_in);
00117 
00118 
00132     int set_bias_probability (double bias_probability_in);
00133     
00134 };
00135 
00136 
00137 }
00138 
00139 #endif