Drake
Parameters< T > Class Template Reference

Parameters is a container for variables that parameterize a System so that it can represent a family of related models. More...

#include <drake/systems/framework/parameters.h>

Public Member Functions

 Parameters ()
 Constructs an empty Parameters. More...
 
 Parameters (std::vector< std::unique_ptr< BasicVector< T >>> &&numeric, std::vector< std::unique_ptr< AbstractValue >> &&abstract)
 Constructs Parameters both numeric and abstract. More...
 
 Parameters (std::vector< std::unique_ptr< BasicVector< T >>> &&numeric)
 Constructs Parameters that are purely numeric. More...
 
 Parameters (std::vector< std::unique_ptr< AbstractValue >> &&abstract)
 Constructs Parameters that are purely abstract. More...
 
 Parameters (std::unique_ptr< BasicVector< T >> vec)
 Constructs Parameters in the common case where the parameters consist of exactly one numeric vector. More...
 
 Parameters (std::unique_ptr< AbstractValue > value)
 Constructs Parameters in the common case where the parameters consist of exactly one abstract value. More...
 
virtual ~Parameters ()
 
int num_numeric_parameters () const
 
int num_abstract_parameters () const
 
const BasicVector< T > * get_numeric_parameter (int index) const
 Returns the vector-valued parameter at index. More...
 
BasicVector< T > * get_mutable_numeric_parameter (int index)
 Returns the vector-valued parameter at index. More...
 
const DiscreteValues< T > & get_numeric_parameters () const
 
void set_numeric_parameters (std::unique_ptr< DiscreteValues< T >> numeric_params)
 
const AbstractValueget_abstract_parameter (int index) const
 Returns the abstract-valued parameter at index. More...
 
AbstractValueget_mutable_abstract_parameter (int index)
 Returns the abstract-valued parameter at index. More...
 
template<typename V >
const V & get_abstract_parameter (int index) const
 Returns the abstract-valued parameter at index. More...
 
template<typename V >
V & get_mutable_abstract_parameter (int index)
 Returns the abstract-valued parameter at index. More...
 
const AbstractValuesget_abstract_parameters () const
 
void set_abstract_parameters (std::unique_ptr< AbstractValues > abstract_params)
 
std::unique_ptr< Parameters< T > > Clone ()
 Returns a deep copy of the Parameters. More...
 
void SetFrom (const Parameters< double > &other)
 Initializes this state (regardless of scalar type) from a Parameters<double>. More...
 
Does not allow copy, move, or assignment
 Parameters (const Parameters &)=delete
 
Parametersoperator= (const Parameters &)=delete
 
 Parameters (Parameters &&)=delete
 
Parametersoperator= (Parameters &&)=delete
 

Detailed Description

template<typename T>
class drake::systems::Parameters< T >

Parameters is a container for variables that parameterize a System so that it can represent a family of related models.

Parameters are members of the Context. Parameters are not Inputs because they do not flow from upstream Systems, and they are not State because the System does not define update functions for them. If Parameters are modified, they are modified by application-specific logic, extrinsic to the System framework and to the flow of simulation time.

The Parameters include both vector-valued and abstract-valued elements.

Template Parameters
TA mathematical type compatible with Eigen's Scalar.

Constructor & Destructor Documentation

Parameters ( const Parameters< T > &  )
delete
Parameters ( Parameters< T > &&  )
delete
Parameters ( )
inline

Constructs an empty Parameters.

Parameters ( std::vector< std::unique_ptr< BasicVector< T >>> &&  numeric,
std::vector< std::unique_ptr< AbstractValue >> &&  abstract 
)
inline

Constructs Parameters both numeric and abstract.

Parameters ( std::vector< std::unique_ptr< BasicVector< T >>> &&  numeric)
inlineexplicit

Constructs Parameters that are purely numeric.

Parameters ( std::vector< std::unique_ptr< AbstractValue >> &&  abstract)
inlineexplicit

Constructs Parameters that are purely abstract.

Parameters ( std::unique_ptr< BasicVector< T >>  vec)
inlineexplicit

Constructs Parameters in the common case where the parameters consist of exactly one numeric vector.

Parameters ( std::unique_ptr< AbstractValue value)
inlineexplicit

Constructs Parameters in the common case where the parameters consist of exactly one abstract value.

virtual ~Parameters ( )
inlinevirtual

Member Function Documentation

std::unique_ptr<Parameters<T> > Clone ( )
inline

Returns a deep copy of the Parameters.

const AbstractValue& get_abstract_parameter ( int  index) const
inline

Returns the abstract-valued parameter at index.

Asserts if the index is out of bounds.

Here is the caller graph for this function:

const V& get_abstract_parameter ( int  index) const
inline

Returns the abstract-valued parameter at index.

Asserts if the index is out of bounds, and throws if the parameter is not of type V.

const AbstractValues& get_abstract_parameters ( ) const
inline

Here is the caller graph for this function:

AbstractValue& get_mutable_abstract_parameter ( int  index)
inline

Returns the abstract-valued parameter at index.

Asserts if the index is out of bounds.

Here is the caller graph for this function:

V& get_mutable_abstract_parameter ( int  index)
inline

Returns the abstract-valued parameter at index.

Asserts if the index is out of bounds, and throws if the parameter is not of type V.

BasicVector<T>* get_mutable_numeric_parameter ( int  index)
inline

Returns the vector-valued parameter at index.

Asserts if the index is out of bounds.

Here is the caller graph for this function:

const BasicVector<T>* get_numeric_parameter ( int  index) const
inline

Returns the vector-valued parameter at index.

Asserts if the index is out of bounds.

const DiscreteValues<T>& get_numeric_parameters ( ) const
inline

Here is the caller graph for this function:

int num_abstract_parameters ( ) const
inline

Here is the caller graph for this function:

int num_numeric_parameters ( ) const
inline

Here is the caller graph for this function:

Parameters& operator= ( Parameters< T > &&  )
delete
Parameters& operator= ( const Parameters< T > &  )
delete
void set_abstract_parameters ( std::unique_ptr< AbstractValues abstract_params)
inline
void set_numeric_parameters ( std::unique_ptr< DiscreteValues< T >>  numeric_params)
inline
void SetFrom ( const Parameters< double > &  other)
inline

Initializes this state (regardless of scalar type) from a Parameters<double>.

All scalar types in Drake must support initialization from doubles.


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