KrisLibrary  1.0.0
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
StateCostControlSpace Class Reference

A control space that adapts a state-space control space to a state-cost space. The new state space is (x,c) where c is accumulated cost. More...

#include <CostSpace.h>

Inheritance diagram for StateCostControlSpace:
ControlSpace

Public Member Functions

 StateCostControlSpace (const std::shared_ptr< ControlSpace > &base, const std::shared_ptr< ObjectiveFunctionalBase > &objective)
 
virtual std::string VariableName (int i)
 Returns an identifier for the i'th control variable.
 
virtual std::shared_ptr< CSetGetControlSet (const State &x)
 
virtual std::shared_ptr< SteeringFunctionGetSteeringFunction ()
 Returns this space's steering function, if available.
 
virtual InterpolatorPtr Simulate (const State &x0, const ControlInput &u)
 
virtual void Successor (const State &x0, const ControlInput &u, State &x1)
 
- Public Member Functions inherited from ControlSpace
virtual Math::VectorFieldFunctionSuccessorNumeric ()
 
virtual void SampleControl (const State &x, ControlInput &u)
 
virtual bool IsValidControl (const State &x, const ControlInput &u)
 

Static Public Member Functions

static void Split (const State &xc, State &x, Real &cost)
 
static void SplitRef (const State &xc, State &x, Real &cost)
 
static void Join (const State &x, Real cost, State &xc)
 
static Real Cost (const State &xc)
 

Public Attributes

std::shared_ptr< ControlSpacebase
 
std::shared_ptr< ObjectiveFunctionalBaseobjective
 
- Public Attributes inherited from ControlSpace
std::shared_ptr< CSetmyControlSet
 Dynamically overridable default control set (Note: state independent)
 
std::shared_ptr< SteeringFunctionmySteeringFunction
 Dynamically overridable default steering function.
 

Detailed Description

A control space that adapts a state-space control space to a state-cost space. The new state space is (x,c) where c is accumulated cost.

Member Function Documentation

std::shared_ptr< CSet > StateCostControlSpace::GetControlSet ( const State x)
virtual

Returns this space's control set at the given state. By default returns myControlSet.

Reimplemented from ControlSpace.

InterpolatorPtr StateCostControlSpace::Simulate ( const State x0,
const ControlInput u 
)
virtual

Executes the simulation function f(x0,u) and records its trace in p. The trace is an interpolator between x0 and the successor state

Implements ControlSpace.

void StateCostControlSpace::Successor ( const State x0,
const ControlInput u,
State x1 
)
virtual

Executes the simulation function x1 = f(x0,u). By default, uses the result from Simulate().

Reimplemented from ControlSpace.


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