API  4.0
For C++ developers
OpenSim::StateVector Class Reference

A class which stores a vector of states or data at a specified time. More...

Public Member Functions

 StateVector ()=default
 
 StateVector (const StateVector &)=default
 
virtual ~StateVector ()
 
 StateVector (double aT)
 
 StateVector (double aT, const SimTK::Vector_< double > &data)
 
StateVectoroperator= (const StateVector &aStateVector)
 
bool operator== (const StateVector &aStateVector) const
 
bool operator< (const StateVector &aStateVector) const
 
void setStates (double aT, const SimTK::Vector_< double > &data)
 
int getSize () const
 
void setTime (double aT)
 
double getTime () const
 
int getDataValue (int aIndex, double &rValue)
 
void setDataValue (int aIndex, double &aValue)
 
Array< double > & getData ()
 
const Array< double > & getData () const
 
void shiftTime (double aValue)
 
void scaleTime (double aValue)
 
void add (double aValue)
 
void add (const SimTK::Vector_< double > &values)
 
void add (int aN, double aValue)
 
void add (StateVector *aStateVector)
 
void subtract (double aValue)
 
void subtract (const SimTK::Vector_< double > &values)
 
void subtract (StateVector *aStateVector)
 
void multiply (double aValue)
 
void multiply (const SimTK::Vector_< double > &values)
 
void multiply (StateVector *aStateVector)
 
void divide (double aValue)
 
void divide (const SimTK::Vector_< double > &values)
 
void divide (StateVector *aStateVector)
 
int print (FILE *fp) const
 

Friends

std::ostream & operator<< (std::ostream &aOut, const StateVector &aStateVector)
 

Detailed Description

A class which stores a vector of states or data at a specified time.

Generally, it is used to store the time histories of the states during an integration.

The format of the numerical output for this class is specified by the settings in IO.

Author
Frank C. Anderson
Version
1.0
See also
IO

Constructor & Destructor Documentation

◆ StateVector() [1/4]

OpenSim::StateVector::StateVector ( )
default

◆ StateVector() [2/4]

OpenSim::StateVector::StateVector ( const StateVector )
default

◆ ~StateVector()

virtual OpenSim::StateVector::~StateVector ( )
virtual

◆ StateVector() [3/4]

OpenSim::StateVector::StateVector ( double  aT)

◆ StateVector() [4/4]

OpenSim::StateVector::StateVector ( double  aT,
const SimTK::Vector_< double > &  data 
)

Member Function Documentation

◆ add() [1/4]

void OpenSim::StateVector::add ( double  aValue)

◆ add() [2/4]

void OpenSim::StateVector::add ( const SimTK::Vector_< double > &  values)

◆ add() [3/4]

void OpenSim::StateVector::add ( int  aN,
double  aValue 
)

◆ add() [4/4]

void OpenSim::StateVector::add ( StateVector aStateVector)

◆ divide() [1/3]

void OpenSim::StateVector::divide ( double  aValue)

◆ divide() [2/3]

void OpenSim::StateVector::divide ( const SimTK::Vector_< double > &  values)

◆ divide() [3/3]

void OpenSim::StateVector::divide ( StateVector aStateVector)

◆ getData() [1/2]

Array<double>& OpenSim::StateVector::getData ( )

◆ getData() [2/2]

const Array<double>& OpenSim::StateVector::getData ( ) const

◆ getDataValue()

int OpenSim::StateVector::getDataValue ( int  aIndex,
double &  rValue 
)

◆ getSize()

int OpenSim::StateVector::getSize ( ) const

◆ getTime()

double OpenSim::StateVector::getTime ( ) const

◆ multiply() [1/3]

void OpenSim::StateVector::multiply ( double  aValue)

◆ multiply() [2/3]

void OpenSim::StateVector::multiply ( const SimTK::Vector_< double > &  values)

◆ multiply() [3/3]

void OpenSim::StateVector::multiply ( StateVector aStateVector)

◆ operator<()

bool OpenSim::StateVector::operator< ( const StateVector aStateVector) const

◆ operator=()

StateVector& OpenSim::StateVector::operator= ( const StateVector aStateVector)

◆ operator==()

bool OpenSim::StateVector::operator== ( const StateVector aStateVector) const

◆ print()

int OpenSim::StateVector::print ( FILE *  fp) const

◆ scaleTime()

void OpenSim::StateVector::scaleTime ( double  aValue)

◆ setDataValue()

void OpenSim::StateVector::setDataValue ( int  aIndex,
double &  aValue 
)

◆ setStates()

void OpenSim::StateVector::setStates ( double  aT,
const SimTK::Vector_< double > &  data 
)

◆ setTime()

void OpenSim::StateVector::setTime ( double  aT)

◆ shiftTime()

void OpenSim::StateVector::shiftTime ( double  aValue)

◆ subtract() [1/3]

void OpenSim::StateVector::subtract ( double  aValue)

◆ subtract() [2/3]

void OpenSim::StateVector::subtract ( const SimTK::Vector_< double > &  values)

◆ subtract() [3/3]

void OpenSim::StateVector::subtract ( StateVector aStateVector)

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  aOut,
const StateVector aStateVector 
)
friend

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