Simbody
Public Member Functions

SimTK::RowVector_< ELT > Class Template Reference

RowVectors are much less common than Vectors. More...

#include <BigMatrix.h>

Inheritance diagram for SimTK::RowVector_< ELT >:

List of all members.

Public Member Functions

 RowVector_ ()
 RowVector_ (const RowVector_ &src)
 RowVector_ (const Base &src)
 RowVector_ (const BaseNeg &src)
RowVector_operator= (const RowVector_ &src)
 RowVector_ (int n)
 RowVector_ (int n, const ELT *cppInitialValues)
 RowVector_ (int n, const ELT &initialValue)
 RowVector_ (int n, const S *cppData, bool)
 Construct a Vector which uses borrowed space with assumed element-to-element stride equal to the C++ element spacing.
 RowVector_ (int n, S *cppData, bool)
 RowVector_ (int n, int stride, const S *data, bool)
 Borrowed-space construction with explicit stride supplied as "number of scalars between elements".
 RowVector_ (int n, int stride, S *data, bool)
template<int M>
 RowVector_ (const Row< M, ELT > &v)
 Convert a Row to a RowVector_.
RowVector_operator= (const ELT &v)
 Fill current allocation with copies of element.
template<class EE >
RowVector_operator= (const RowVectorBase< EE > &b)
template<class EE >
RowVector_operator+= (const RowVectorBase< EE > &b)
template<class EE >
RowVector_operator-= (const RowVectorBase< EE > &b)
RowVector_operator*= (const StdNumber &t)
RowVector_operator/= (const StdNumber &t)
RowVector_operator+= (const ELT &b)
RowVector_operator-= (const ELT &b)

Related Functions

(Note that these are not member functions.)
Matrix_<T> serialization and I/O

These methods are at namespace scope but are logically part of the Vector classes.

These deal with reading and writing Vectors from and to streams, which places an additional requirement on the element type T: the element must support the same operation you are trying to do on the Vector as a whole.

template<class T >
std::ostream & operator<< (std::ostream &o, const RowVectorBase< T > &v)
 Output a human readable representation of a RowVector to an std::ostream (like std::cout).

Detailed Description

template<class ELT>
class SimTK::RowVector_< ELT >

RowVectors are much less common than Vectors.

However, if a Simmatrix user wants one, this is the class intended to appear in user code. It can be a fixed-size view of someone else's data, or can be a resizable data owner itself, although of course it will always have just one row.


Constructor & Destructor Documentation

template<class ELT>
SimTK::RowVector_< ELT >::RowVector_ ( ) [inline]
template<class ELT>
SimTK::RowVector_< ELT >::RowVector_ ( const RowVector_< ELT > &  src) [inline]
template<class ELT>
SimTK::RowVector_< ELT >::RowVector_ ( const Base src) [inline]
template<class ELT>
SimTK::RowVector_< ELT >::RowVector_ ( const BaseNeg src) [inline]
template<class ELT>
SimTK::RowVector_< ELT >::RowVector_ ( int  n) [inline, explicit]
template<class ELT>
SimTK::RowVector_< ELT >::RowVector_ ( int  n,
const ELT *  cppInitialValues 
) [inline]
template<class ELT>
SimTK::RowVector_< ELT >::RowVector_ ( int  n,
const ELT &  initialValue 
) [inline]
template<class ELT>
SimTK::RowVector_< ELT >::RowVector_ ( int  n,
const S *  cppData,
bool   
) [inline]

Construct a Vector which uses borrowed space with assumed element-to-element stride equal to the C++ element spacing.

Last parameter is a dummy to avoid overload conflicts when ELT=S; pass it as "true".

template<class ELT>
SimTK::RowVector_< ELT >::RowVector_ ( int  n,
S *  cppData,
bool   
) [inline]
template<class ELT>
SimTK::RowVector_< ELT >::RowVector_ ( int  n,
int  stride,
const S *  data,
bool   
) [inline]

Borrowed-space construction with explicit stride supplied as "number of scalars between elements".

Last parameter is a dummy to avoid overload conflicts; pass it as "true".

template<class ELT>
SimTK::RowVector_< ELT >::RowVector_ ( int  n,
int  stride,
S *  data,
bool   
) [inline]
template<class ELT>
template<int M>
SimTK::RowVector_< ELT >::RowVector_ ( const Row< M, ELT > &  v) [inline, explicit]

Convert a Row to a RowVector_.


Member Function Documentation

template<class ELT>
RowVector_& SimTK::RowVector_< ELT >::operator= ( const RowVector_< ELT > &  src) [inline]
template<class ELT>
RowVector_& SimTK::RowVector_< ELT >::operator= ( const ELT &  t) [inline]

Fill current allocation with copies of element.

Note that this is not the same behavior as assignment for Matrices, where only the diagonal is set (and everything else is set to zero.)

Reimplemented from SimTK::RowVectorBase< ELT >.

template<class ELT>
template<class EE >
RowVector_& SimTK::RowVector_< ELT >::operator= ( const RowVectorBase< EE > &  b) [inline]

Reimplemented from SimTK::RowVectorBase< ELT >.

template<class ELT>
template<class EE >
RowVector_& SimTK::RowVector_< ELT >::operator+= ( const RowVectorBase< EE > &  b) [inline]

Reimplemented from SimTK::RowVectorBase< ELT >.

template<class ELT>
template<class EE >
RowVector_& SimTK::RowVector_< ELT >::operator-= ( const RowVectorBase< EE > &  b) [inline]

Reimplemented from SimTK::RowVectorBase< ELT >.

template<class ELT>
RowVector_& SimTK::RowVector_< ELT >::operator*= ( const StdNumber t) [inline]

Reimplemented from SimTK::RowVectorBase< ELT >.

template<class ELT>
RowVector_& SimTK::RowVector_< ELT >::operator/= ( const StdNumber t) [inline]

Reimplemented from SimTK::RowVectorBase< ELT >.

template<class ELT>
RowVector_& SimTK::RowVector_< ELT >::operator+= ( const ELT &  b) [inline]
template<class ELT>
RowVector_& SimTK::RowVector_< ELT >::operator-= ( const ELT &  b) [inline]

Friends And Related Function Documentation

template<class T >
std::ostream & operator<< ( std::ostream &  o,
const RowVectorBase< T > &  v 
) [related]

Output a human readable representation of a RowVector to an std::ostream (like std::cout).

The format is [ elements ] where elements is a space-separated list of the RowVector's contents output by invoking the "<<" operator on the elements. This function will not compile if the element type does not support the "<<" operator. No newline is issued before or after the output.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines