Control Libraries 7.4.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
dynamical_systems::IDynamicalSystem< S > Class Template Referenceabstract

Abstract class for a dynamical system. More...

#include <IDynamicalSystem.hpp>

Inheritance diagram for dynamical_systems::IDynamicalSystem< S >:
state_representation::ParameterMap dynamical_systems::DefaultDynamicalSystem< S > dynamical_systems::PointAttractor< S >

Public Member Functions

 IDynamicalSystem ()=default
 Empty constructor.
 
virtual bool is_compatible (const S &state) const
 Check compatibility between a state and the dynamical system.
 
evaluate (const S &state) const
 Evaluate the value of the dynamical system at a given state.
 
get_base_frame () const
 Return the base frame of the dynamical system.
 
virtual void set_base_frame (const S &base_frame)
 Set the base frame of the dynamical system.
 
- Public Member Functions inherited from state_representation::ParameterMap
 ParameterMap ()=default
 Empty constructor.
 
 ParameterMap (const ParameterInterfaceList &parameters)
 Construct the parameter map with an initial list of parameters.
 
 ParameterMap (const ParameterInterfaceMap &parameters)
 Construct the parameter map with an initial map of parameters.
 
std::shared_ptr< ParameterInterfaceget_parameter (const std::string &name) const
 Get a parameter by its name.
 
ParameterInterfaceMap get_parameters () const
 Get a map of all the <name, parameter> pairs.
 
template<typename T >
get_parameter_value (const std::string &name) const
 Get a parameter value by its name.
 
ParameterInterfaceList get_parameter_list () const
 Get a list of all the parameters.
 
void set_parameter (const std::shared_ptr< ParameterInterface > &parameter)
 Set a parameter.
 
void set_parameters (const ParameterInterfaceList &parameters)
 Set parameters from a list of parameters.
 
void set_parameters (const ParameterInterfaceMap &parameters)
 Set parameters from a map with <name, parameter> pairs.
 
template<typename T >
void set_parameter_value (const std::string &name, const T &value)
 Set a parameter value by its name.
 
void remove_parameter (const std::string &name)
 Remove a parameter from the parameter map.
 

Protected Member Functions

virtual S compute_dynamics (const S &state) const =0
 Compute the dynamics of the input state. Internal function, to be redefined based on the type of dynamical system, called by the evaluate function.
 
- Protected Member Functions inherited from state_representation::ParameterMap
virtual void validate_and_set_parameter (const std::shared_ptr< ParameterInterface > &parameter)
 Validate and set a parameter in the map.
 
void assert_parameter_valid (const std::shared_ptr< ParameterInterface > &parameter)
 Check if a parameter exists and has the expected type, throw an exception otherwise.
 

Additional Inherited Members

- Protected Attributes inherited from state_representation::ParameterMap
ParameterInterfaceMap parameters_
 map of parameters by name
 

Detailed Description

template<class S>
class dynamical_systems::IDynamicalSystem< S >

Abstract class for a dynamical system.

Template Parameters
SUnderlying state type of the dynamical system

Definition at line 21 of file IDynamicalSystem.hpp.

Member Function Documentation

◆ compute_dynamics()

template<class S >
virtual S dynamical_systems::IDynamicalSystem< S >::compute_dynamics ( const S &  state) const
protectedpure virtual

Compute the dynamics of the input state. Internal function, to be redefined based on the type of dynamical system, called by the evaluate function.

Parameters
stateThe input state
Returns
The output state

Implemented in dynamical_systems::DefaultDynamicalSystem< S >, dynamical_systems::PointAttractor< S >, dynamical_systems::Circular, and dynamical_systems::Ring.

◆ evaluate()

template<class S >
S IDynamicalSystem::evaluate ( const S &  state) const

Evaluate the value of the dynamical system at a given state.

Parameters
stateState at which to perform the evaluation
Returns
The resulting state (velocity) of the dynamical system

Definition at line 31 of file IDynamicalSystem.cpp.

◆ get_base_frame()

template<class S >
S IDynamicalSystem::get_base_frame ( ) const

Return the base frame of the dynamical system.

Returns
The base frame

Definition at line 69 of file IDynamicalSystem.hpp.

◆ is_compatible()

template<class S >
bool IDynamicalSystem::is_compatible ( const S &  state) const
virtual

Check compatibility between a state and the dynamical system.

Parameters
stateThe state to check for compatibility
Returns
True if the state is compatible with the dynamical system

Reimplemented in dynamical_systems::PointAttractor< S >.

Definition at line 15 of file IDynamicalSystem.cpp.

◆ set_base_frame()

template<class S >
void IDynamicalSystem::set_base_frame ( const S &  base_frame)
virtual

Set the base frame of the dynamical system.

Parameters
base_frameThe new base frame

Reimplemented in dynamical_systems::PointAttractor< S >.

Definition at line 74 of file IDynamicalSystem.hpp.


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