Drake
|
An adder for arbitrarily many inputs of equal length. More...
#include <drake/systems/framework/primitives/adder.h>
Public Member Functions | |
Adder (int num_inputs, int length) | |
std::unique_ptr< Context< T > > | CreateDefaultContext () const override |
Allocates the number of input ports specified in the constructor. More... | |
std::unique_ptr< SystemOutput< T > > | AllocateOutput () const override |
Allocates one output port of the width specified in the constructor. More... | |
void | EvalOutput (const Context< T > &context, SystemOutput< T > *output) const override |
Sums the input ports into the output port. More... | |
std::string | get_name () const override |
TODO(david-german-tri): Make this configurable in the constructor. More... | |
Public Member Functions inherited from SystemInterface< T > | |
virtual T | EvalPotentialEnergy (const Context< T > &context) const |
Return the potential energy currently stored in the configuration provided in the given Context. More... | |
virtual T | EvalKineticEnergy (const Context< T > &context) const |
Return the kinetic energy currently present in the motion provided in the given Context. More... | |
Public Member Functions inherited from AbstractSystemInterface | |
virtual | ~AbstractSystemInterface () |
Additional Inherited Members | |
Protected Member Functions inherited from SystemInterface< T > | |
SystemInterface () | |
Protected Member Functions inherited from AbstractSystemInterface | |
AbstractSystemInterface () | |
An adder for arbitrarily many inputs of equal length.
T | The type of mathematical object being added. |
Adder | ( | int | num_inputs, |
int | length | ||
) |
num_inputs | is the number of input ports to be added. |
length | is the size of each input port. |
|
overridevirtual |
Allocates one output port of the width specified in the constructor.
Implements SystemInterface< T >.
|
overridevirtual |
Allocates the number of input ports specified in the constructor.
Allocates no state.
Implements SystemInterface< T >.
|
overridevirtual |
Sums the input ports into the output port.
If the input ports are not of number num_inputs_ or size length_, std::runtime_error will be thrown.
Implements SystemInterface< T >.
|
inlineoverridevirtual |
TODO(david-german-tri): Make this configurable in the constructor.
Implements AbstractSystemInterface.