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.
T | The scalar type, which must be one of the default scalars. |
#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_parameter_groups () 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 AbstractValue & | get_abstract_parameter (int index) const |
Returns the abstract-valued parameter at index . More... | |
AbstractValue & | get_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 AbstractValues & | get_abstract_parameters () const |
void | set_abstract_parameters (std::unique_ptr< AbstractValues > abstract_params) |
std::unique_ptr< Parameters< T > > | Clone () const |
Returns a deep copy of the Parameters. More... | |
template<typename U > | |
void | SetFrom (const Parameters< U > &other) |
Initializes this object from other . More... | |
Does not allow copy, move, or assignment | |
Parameters (const Parameters &)=delete | |
Parameters & | operator= (const Parameters &)=delete |
Parameters (Parameters &&)=delete | |
Parameters & | operator= (Parameters &&)=delete |
System compatibility | |
See System Compatibility. | |
internal::SystemId | get_system_id () const |
(Internal use only) Gets the id of the subsystem that created this object. More... | |
void | set_system_id (internal::SystemId id) |
(Internal use only) Records the id of the subsystem that created this object. More... | |
|
delete |
|
delete |
Parameters | ( | ) |
Constructs an empty Parameters.
Parameters | ( | std::vector< std::unique_ptr< BasicVector< T >>> && | numeric, |
std::vector< std::unique_ptr< AbstractValue >> && | abstract | ||
) |
Constructs Parameters both numeric
and abstract
.
|
explicit |
Constructs Parameters that are purely numeric
.
|
explicit |
Constructs Parameters that are purely abstract
.
|
explicit |
Constructs Parameters in the common case where the parameters consist of exactly one numeric vector.
|
explicit |
Constructs Parameters in the common case where the parameters consist of exactly one abstract value.
|
virtual |
std::unique_ptr<Parameters<T> > Clone | ( | ) | const |
Returns a deep copy of the Parameters.
const AbstractValue& get_abstract_parameter | ( | int | index | ) | const |
Returns the abstract-valued parameter at index
.
Asserts if the index is out of bounds.
const V& get_abstract_parameter | ( | int | index | ) | const |
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 |
AbstractValue& get_mutable_abstract_parameter | ( | int | index | ) |
Returns the abstract-valued parameter at index
.
Asserts if the index is out of bounds.
V& get_mutable_abstract_parameter | ( | int | index | ) |
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 | ) |
Returns the vector-valued parameter at index
.
Asserts if the index is out of bounds.
const BasicVector<T>& get_numeric_parameter | ( | int | index | ) | const |
Returns the vector-valued parameter at index
.
Asserts if the index is out of bounds.
const DiscreteValues<T>& get_numeric_parameters | ( | ) | const |
internal::SystemId get_system_id | ( | ) | const |
(Internal use only) Gets the id of the subsystem that created this object.
int num_abstract_parameters | ( | ) | const |
int num_numeric_parameter_groups | ( | ) | const |
|
delete |
|
delete |
void set_abstract_parameters | ( | std::unique_ptr< AbstractValues > | abstract_params | ) |
void set_numeric_parameters | ( | std::unique_ptr< DiscreteValues< T >> | numeric_params | ) |
void set_system_id | ( | internal::SystemId | id | ) |
(Internal use only) Records the id of the subsystem that created this object.
void SetFrom | ( | const Parameters< U > & | other | ) |
Initializes this object from other
.