estar Namespace Reference


Detailed Description

E-Star core and utilities.


Classes

class  Algorithm
 Medium-level layer for controlling E*. More...
class  AlphaKernel
 Simple interpolating kernel. More...
struct  value_p
 Value property tag attached to C-space nodes. More...
struct  meta_p
 Meta property tag attached to C-space nodes. More...
struct  rhs_p
 "Right-hand-side" property tag attached to C-space nodes. More...
struct  flag_p
 Flag property tag attached to C-space nodes. More...
class  ComparisonFacade
struct  vertex_read_iteration
struct  edge_read_iteration
class  BaseCSpace
 
Note:
You cannot add vertices to this base class, use one of the derived classes instead.
More...
class  CSpace
class  CustomCSpace
 It is recommened to use a custom_t that is cheap to copy by value. More...
class  GridOptions
class  AlgorithmOptions
class  Facade
 High-level interface for E-star approach to smooth dynamic navigation functions. More...
struct  carrot_item
 An element of the 'trace' of the steepest gradient from a given start position. More...
class  FacadeReadInterface
 Abstraction of operations that "read" from a Facade. More...
class  FacadeWriteInterface
 Abstraction of operations that "write" to a Facade. More...
class  flexgrid
struct  flexgrid_iterator_traits
struct  flexgrid_const_iterator_traits
class  base_flexgrid_iterator
class  flexgrid_iterator
class  const_flexgrid_iterator
class  flexgrid_traits
class  Grid
class  GridNode
 Holds a C-space vertex and associated data for a node in a Grid. More...
struct  grid_postransform
 Utility for translating a grid index into coordinates. More...
struct  grid_bbox_compute
class  GridCSpace
class  Kernel
 Generic E* kernel interface. More...
class  LSMKernel
 Interpolation kernel based on Level Set Method. More...
class  NF1Kernel
 Non-interpolating kernel, mimics NF1 but allows continuous risk. More...
class  fakeos
 Utility for compile-time switchable debug messages. More...
class  Propagator
 Propagator set of a node. More...
class  PropagatorFactory
class  Queue
 Wavefront propagation queue. More...
class  Region
 A Region is a Sprite that has been placed at a specific location. More...
class  RiskMap
 Translate risk to meta information. More...
class  DummyRiskMap
 Simplistic RiskMap subtype. More...
class  InvertRiskMap
 Simplel RiskMap subtype. More...
class  sdeque
class  Sprite
 Utility for holding a relocatable set of vertices, like a computer graphics sprite. More...
class  Upwind
 Upwind graph for tracing propagation order. More...
class  array
 Simple 2D-array with "self destroying" underlying data. More...

Typedefs

typedef boost::vecS cspace_OutEdgeListS
 C-space graph out-edge list type selector.
typedef boost::vecS cspace_VertexListS
 C-space graph vertex list type selector.
typedef boost::undirectedS cspace_DirectedS
 C-space graph edge directedness selector.
typedef boost::adjacency_list_traits<
cspace_OutEdgeListS, cspace_VertexListS,
cspace_DirectedS
cspace_traits
 Traits class of C-space graph.
typedef cspace_traits::vertex_descriptor vertex_t
 Vertex (node) descriptor of C-space graph.
typedef boost::property< value_p,
double, boost::property<
meta_p, double, boost::property<
rhs_p, double, boost::property<
flag_p, flag_t > > > > 
cspace_vertex_property
 Properties attached to a C-space node.
typedef boost::adjacency_list<
cspace_OutEdgeListS, cspace_VertexListS,
cspace_DirectedS, cspace_vertex_property
cspace_t
 Type describing the C-space graph.
typedef boost::graph_traits<
cspace_t >::adjacency_iterator 
adjacency_it
 Iterator over neighboring nodes.
typedef boost::graph_traits<
cspace_t >::vertex_iterator 
vertex_it
 Iterator over C-space nodes.
typedef boost::property_map<
cspace_t, boost::vertex_index_t
>::type 
vertexid_map_t
 Node ID map, for adding custom node properties.
typedef boost::property_map<
cspace_t, value_p >::type 
value_map_t
 Value property map.
typedef boost::property_map<
cspace_t, meta_p >::type 
meta_map_t
 Meta information property map.
typedef boost::property_map<
cspace_t, rhs_p >::type 
rhs_map_t
 "Right-hand-side" property map.
typedef boost::property_map<
cspace_t, flag_p >::type 
flag_map_t
 Flag property map.
typedef std::vector< carrot_itemcarrot_trace
typedef fakeos vdebugos
typedef fakeos debugos
typedef std::multimap< double,
vertex_t
queue_t
typedef queue_t::iterator queue_it
typedef queue_t::const_iterator const_queue_it
typedef std::map< vertex_t,
double > 
queue_map_t

Enumerations

enum  flag_t { NONE, OPEN, GOAL, OPNG }
 Node flags. More...

Functions

const char * flag_name (flag_t p)
 Debug utility.
bool check_queue (const Algorithm &algo, const GridCSpace *grid_cspace, const char *prefix, std::ostream &os)
 
Note:
If grid is null it will be ignored.

bool check_cspace (const cspace_t &cspace, const char *prefix, std::ostream &os)
void dump_probabilities (const array< double > &prob, size_t x0, size_t y0, size_t x1, size_t y1, FILE *stream)
 Write an array out to a stream, with formatting appropriate for values that lie in the range 0.
void dump_gnuplottable (const array< double > &data, size_t x0, size_t y0, size_t x1, size_t y1, FILE *stream)
void dump_raw (const array< double > &data,double replace_infinity, size_t x0, size_t y0, size_t x1, size_t y1, FILE *stream)
 Similar to dump_probabilities(), but uses a raw format useful eg for gnuplot.
void dump_raw_value (const Grid &grid, ssize_t x0, ssize_t y0, ssize_t x1, ssize_t y1, double infinity_replacement, FILE *stream)
 Similar to dump_raw(), but specifically for a Grid's values.
void dump_raw_meta (const Grid &grid, ssize_t x0, ssize_t y0, ssize_t x1, ssize_t y1, FILE *stream)
 Similar to dump_raw(), but specifically for a Grid's meta information.
void dump_raw (const FacadeReadInterface &facade, FILE *value_stream, FILE *meta_stream)
 Similar to eg dump_raw_value(), but writes all values and meta data through a facade instance to two streams (writes sequentially, so things will not get mixed up if you provide the same stream twice).
void dump_queue (const Algorithm &algo, const Grid *grid, size_t limit, FILE *stream)
 if grid is null it is ignored, if limit is > 0 it isn't
void dump_queue (const FacadeReadInterface &facade, size_t limit, FILE *stream)
void dump_grid (const Grid &grid, FILE *stream)
void dump_grid_range (const Grid &grid, ssize_t ix0, ssize_t iy0, ssize_t ix1, ssize_t iy1, FILE *stream)
void dump_facade_range_highlight (const FacadeReadInterface &facade, ssize_t ix0, ssize_t iy0, ssize_t ix1, ssize_t iy1, ssize_t ixhigh, ssize_t iyhigh, FILE *stream)
void dump_grid_range_highlight (const Grid &grid, ssize_t ix0, ssize_t iy0, ssize_t ix1, ssize_t iy1, ssize_t ixhigh, ssize_t iyhigh, FILE *stream)
void dump_upwind (const Algorithm &algo, const Grid *grid, FILE *stream)
int QuadraticEquation (double a, double b, double c, double &x1, double &x2)
 Solves the quadratic equation "a * x ^ 2 + b * x + c == 0".
template<typename T>
minval (T a, T b)
 Evaluates to the minimum of it's two arguments.
template<typename T>
maxval (T a, T b)
 Evaluates to the maximum of it's two arguments.
template<typename T>
boundval (T lower_bound, T value, T upper_bound)
 Evaluates to the middle argument or one of the bounds if the value is too great or too small.
template<typename T>
absval (const T &a)
 Evaluates to the absolute value of it's argument.
template<typename T>
square (T x)
 Calculates the square of its argument.
double mod2pi (double x)
 Set an angle to the range -pi < angle <= +pi.
void set_cleanup (void(*function)())
 Set the function for cleaning up after your program.


Typedef Documentation

typedef boost::graph_traits<cspace_t>::adjacency_iterator estar::adjacency_it

Iterator over neighboring nodes.

typedef std::vector<carrot_item> estar::carrot_trace

typedef queue_t::const_iterator estar::const_queue_it

typedef boost::undirectedS estar::cspace_DirectedS

C-space graph edge directedness selector.

typedef boost::vecS estar::cspace_OutEdgeListS

C-space graph out-edge list type selector.

typedef boost::adjacency_list<cspace_OutEdgeListS, cspace_VertexListS, cspace_DirectedS, cspace_vertex_property> estar::cspace_t

Type describing the C-space graph.

typedef boost::adjacency_list_traits<cspace_OutEdgeListS, cspace_VertexListS, cspace_DirectedS> estar::cspace_traits

Traits class of C-space graph.

typedef boost::property<value_p, double, boost::property<meta_p, double, boost::property<rhs_p, double, boost::property<flag_p, flag_t > > > > estar::cspace_vertex_property

Properties attached to a C-space node.

typedef boost::vecS estar::cspace_VertexListS

C-space graph vertex list type selector.

typedef fakeos estar::debugos

typedef boost::property_map<cspace_t, flag_p>::type estar::flag_map_t

Flag property map.

typedef boost::property_map<cspace_t, meta_p>::type estar::meta_map_t

Meta information property map.

typedef queue_t::iterator estar::queue_it

typedef std::map<vertex_t, double> estar::queue_map_t

typedef std::multimap<double, vertex_t> estar::queue_t

typedef boost::property_map<cspace_t, rhs_p>::type estar::rhs_map_t

"Right-hand-side" property map.

typedef boost::property_map<cspace_t, value_p>::type estar::value_map_t

Value property map.

typedef fakeos estar::vdebugos

typedef boost::graph_traits<cspace_t>::vertex_iterator estar::vertex_it

Iterator over C-space nodes.

typedef cspace_traits::vertex_descriptor estar::vertex_t

Vertex (node) descriptor of C-space graph.

typedef boost::property_map<cspace_t, boost::vertex_index_t>::type estar::vertexid_map_t

Node ID map, for adding custom node properties.


Enumeration Type Documentation

enum estar::flag_t

Node flags.

Used to be "event priority" classes, now much simpler and lightweight.

Enumerator:
NONE  nothing special, node is (locally) consistent
OPEN  node is in the queue, but not a goal
GOAL  goal node, but not in queue
OPNG  goal node in queue


Function Documentation

template<typename T>
T estar::absval ( const T &  a  ) 

Evaluates to the absolute value of it's argument.

template<typename T>
T estar::boundval ( lower_bound,
value,
upper_bound 
)

Evaluates to the middle argument or one of the bounds if the value is too great or too small.

bool estar::check_cspace ( const cspace_t &  cspace,
const char *  prefix,
std::ostream &  os 
)

bool estar::check_queue ( const Algorithm &  algo,
const GridCSpace *  grid_cspace,
const char *  prefix,
std::ostream &  os 
)

Note:
If grid is null it will be ignored.

Todo:
Add "smart" Queue class checking.

void estar::dump_facade_range_highlight ( const FacadeReadInterface &  facade,
ssize_t  ix0,
ssize_t  iy0,
ssize_t  ix1,
ssize_t  iy1,
ssize_t  ixhigh,
ssize_t  iyhigh,
FILE *  stream 
)

void estar::dump_gnuplottable ( const array< double > &  data,
size_t  x0,
size_t  y0,
size_t  x1,
size_t  y1,
FILE *  stream 
)

void estar::dump_grid ( const Grid &  grid,
FILE *  stream 
)

void estar::dump_grid_range ( const Grid &  grid,
ssize_t  ix0,
ssize_t  iy0,
ssize_t  ix1,
ssize_t  iy1,
FILE *  stream 
)

void estar::dump_grid_range_highlight ( const Grid &  grid,
ssize_t  ix0,
ssize_t  iy0,
ssize_t  ix1,
ssize_t  iy1,
ssize_t  ixhigh,
ssize_t  iyhigh,
FILE *  stream 
)

void estar::dump_probabilities ( const array< double > &  prob,
size_t  x0,
size_t  y0,
size_t  x1,
size_t  y1,
FILE *  stream 
)

Write an array out to a stream, with formatting appropriate for values that lie in the range 0.

..1 (such as probabilities). A sub-array can be selected for dumping by choosing appropriate values for x0, y0, x1, y1 (all indices interpreted as inclusive).

Note:
BEWARE x1 and y1 are *inclusive*

void estar::dump_queue ( const FacadeReadInterface &  facade,
size_t  limit,
FILE *  stream 
)

void estar::dump_queue ( const Algorithm &  algo,
const Grid *  grid,
size_t  limit,
FILE *  stream 
)

if grid is null it is ignored, if limit is > 0 it isn't

void estar::dump_raw ( const FacadeReadInterface &  facade,
FILE *  value_stream,
FILE *  meta_stream 
)

Similar to eg dump_raw_value(), but writes all values and meta data through a facade instance to two streams (writes sequentially, so things will not get mixed up if you provide the same stream twice).

Set a stream to NULL if you're not interested in that part of the dump. Uses -1 as infinity_replacement for dump_raw_value().

void estar::dump_raw ( const array< double > &  data,
double  replace_infinity,
size_t  x0,
size_t  y0,
size_t  x1,
size_t  y1,
FILE *  stream 
)

Similar to dump_probabilities(), but uses a raw format useful eg for gnuplot.

Note:
BEWARE x1 and y1 are *inclusive*
Parameters:
replace_infinity  use this instead of infinite values

void estar::dump_raw_meta ( const Grid &  grid,
ssize_t  x0,
ssize_t  y0,
ssize_t  x1,
ssize_t  y1,
FILE *  stream 
)

Similar to dump_raw(), but specifically for a Grid's meta information.

Note:
BEWARE x1 and y1 are *inclusive*

void estar::dump_raw_value ( const Grid &  grid,
ssize_t  x0,
ssize_t  y0,
ssize_t  x1,
ssize_t  y1,
double  infinity_replacement,
FILE *  stream 
)

Similar to dump_raw(), but specifically for a Grid's values.

Note:
BEWARE x1 and y1 are *inclusive*

void estar::dump_upwind ( const Algorithm &  algo,
const Grid *  grid,
FILE *  stream 
)

const char * estar::flag_name ( flag_t  p  ) 

Debug utility.

Returns:
name of a flag, or "<invalid>"

template<typename T>
T estar::maxval ( a,
b 
)

Evaluates to the maximum of it's two arguments.

template<typename T>
T estar::minval ( a,
b 
)

Evaluates to the minimum of it's two arguments.

Note:
Would have liked to use const references instead of values, but that creates problems for comparing against constants (e.g. things defined as "static const double"). This doesn't really matter for builtin-types, but comparing more complex types entails constructor and destructor calls...

double estar::mod2pi ( double  x  )  [inline]

Set an angle to the range -pi < angle <= +pi.

int estar::QuadraticEquation ( double  a,
double  b,
double  c,
double &  x1,
double &  x2 
)

Solves the quadratic equation "a * x ^ 2 + b * x + c == 0".

Note:
Handles special cases "gracefully" based on the properties (absval(a) < epsilon), (absval(b) < epsilon), (absval(c) < epsilon), and (absval(b*b-4*a*c) < epsilon*epsilon).
Returns:
The number of solutions (0, 1, or 2), it only sets x1 / x2 for the returned number of solutions (e.g. if it returns 1, only x1 contains a useful number).

void estar::set_cleanup ( void(*)()  function  ) 

Set the function for cleaning up after your program.

Also sets up signal handlers for SIGINT, SIGHUP, and SIGTERM to call that ceanup function.

Note:
If you use this function, you should put your cleanup all into the function passed as argument and NOT call that function yourself. It is automatically called upon calls to exit() or return from main.

template<typename T>
T estar::square ( x  ) 

Calculates the square of its argument.


doxygen SourceForge.net Logo
E* Interpolated Graph Replanner Wed Dec 12 18:55:49 2007