1 #ifndef SimTK_SIMMATRIX_VECTOR_H_ 
    2 #define SimTK_SIMMATRIX_VECTOR_H_ 
   92     Vector_(
int m, 
const ELT* cppInitialValues) : 
Base(m, cppInitialValues) {}
 
   95     Vector_(
int m, 
const ELT& initialValue) : 
Base(m, initialValue) {}
 
  101         for (
int i = 0; i < M; ++i)
 
  102             this->
updElt(i, 0) = v(i);
 
  129     Vector_(
int m, 
int stride, 
const S* data, 
bool)
 
  130         : 
Base(m, stride, data) {}
 
  135         : 
Base(m, stride, data) {}
 
  192         std::stringstream stream;
 
  197     const ELT& 
get(
int i)
 const { 
return (*
this)[i]; }
 
  199     void set(
int i, 
const ELT& value)  { (*this)[i]=value; }
 
K::StdNumber StdNumber
Definition: CompositeNumericalTypes.h:163
 
K::TNeg TNeg
Definition: CompositeNumericalTypes.h:139
 
K::Scalar Scalar
Definition: CompositeNumericalTypes.h:160
 
K::Number Number
Definition: CompositeNumericalTypes.h:162
 
@ CppNScalarsPerElement
Definition: MatrixBase.h:154
 
CNT< E >::TNeg ENeg
Definition: MatrixBase.h:76
 
ELT & updElt(int i, int j)
Definition: MatrixBase.h:656
 
ENumber Number
Definition: MatrixBase.h:98
 
MatrixBase & elementwiseSubtractScalarInPlace(const S &s)
Set M(i,j)-=s for every element of M and some value s.
 
MatrixBase & elementwiseAddScalarInPlace(const S &s)
Set M(i,j)+=s for every element of M and some value s.
 
EStdNumber StdNumber
Definition: MatrixBase.h:99
 
This is a fixed-length column vector designed for no-overhead inline computation.
Definition: Vec.h:184
 
This is a dataless rehash of the MatrixBase class to specialize it for Vectors.
Definition: VectorBase.h:42
 
VectorBase & operator+=(const VectorBase &r)
Definition: VectorBase.h:147
 
VectorBase & operator/=(const StdNumber &t)
Definition: VectorBase.h:146
 
VectorBase & operator*=(const StdNumber &t)
Definition: VectorBase.h:145
 
VectorBase & operator=(const VectorBase &b)
Copy assignment is deep copy but behavior depends on type of lhs: if view, rhs must match.
Definition: VectorBase.h:138
 
VectorBase & operator-=(const VectorBase &r)
Definition: VectorBase.h:148
 
This is the vector class intended to appear in user code for large, variable size column vectors.
Definition: Vector_.h:50
 
Vector_()
Default constructor creates a 0x1, reallocatable vector.
Definition: Vector_.h:67
 
Vector_(int m, const ELT *cppInitialValues)
Construct an owner Vector_ of a given size m and initialize it from a C++ array of m ELT values point...
Definition: Vector_.h:92
 
const ELT & get(int i) const
Variant of operator[] that's scripting friendly to get ith element.
Definition: Vector_.h:197
 
Vector_(int m)
Construct a Vector_ with a given preallocated size, but with uninitialized values.
Definition: Vector_.h:87
 
Vector_ & operator+=(const VectorBase< EE > &m)
Add in a conforming vector of the base type even if it has a different element type EE,...
Definition: Vector_.h:157
 
Vector_ & operator*=(const StdNumber &t)
In-place multiply of each element of this Vector_ by a scalar t.
Definition: Vector_.h:168
 
Vector_(int m, int stride, S *data, bool)
Borrowed-space writable construction with explicit stride supplied as "number of scalars between elem...
Definition: Vector_.h:134
 
Vector_ & operator=(const Vector_ &src)
Copy assignment is deep and can be reallocating if this Vector_ is an owner.
Definition: Vector_.h:142
 
Vector_ & operator+=(const ELT &b)
In-place add to each element of this Vector_ the same given value b.
Definition: Vector_.h:176
 
Vector_(int m, const S *cppData, bool)
Construct a Vector_ which shares read-only, borrowed space with assumed element-to-element stride equ...
Definition: Vector_.h:117
 
Vector_(int m, int stride, const S *data, bool)
Borrowed-space read-only construction with explicit stride supplied as "number of scalars between ele...
Definition: Vector_.h:129
 
Vector_(const Base &src)
This copy constructor serves as an implicit conversion from objects of the base class type (for examp...
Definition: Vector_.h:77
 
std::string toString() const
toString() returns a string representation of the Vector_.
Definition: Vector_.h:191
 
Vector_ & operator-=(const VectorBase< EE > &m)
In-place subtract of a conforming vector of the base type even if it has a different element type EE,...
Definition: Vector_.h:163
 
Vector_(const Vec< M, ELT > &v)
This constructor creates a new owner Vector_ that is the same length and has a copy of the contents o...
Definition: Vector_.h:100
 
Vector_ & operator-=(const ELT &b)
In-place subtract from each element of this Vector_ the same given value b.
Definition: Vector_.h:181
 
Vector_ & operator=(const VectorBase< EE > &src)
Like copy assignment but the source can be any object of the base type, even with a different element...
Definition: Vector_.h:148
 
void set(int i, const ELT &value)
Variant of operator[] that's scripting friendly to set ith element.
Definition: Vector_.h:199
 
Vector_(const BaseNeg &src)
This copy constructor serves as an implicit conversion from objects of the base class but with negate...
Definition: Vector_.h:81
 
Vector_ & operator/=(const StdNumber &t)
In-place divide of each element of this Vector_ by a scalar t.
Definition: Vector_.h:171
 
Vector_ & operator=(const ELT &v)
Set all elements of this Vector_ to the same value v.
Definition: Vector_.h:152
 
Vector_(const Vector_ &src)
Copy constructor is deep, that is the source Vector_ is copied, not referenced.
Definition: Vector_.h:71
 
Vector_(int m, S *cppData, bool)
Construct a Vector_ which shares writable, borrowed space with assumed element-to-element stride equa...
Definition: Vector_.h:123
 
Vector_(int m, const ELT &initialValue)
Construct an owner Vector_ of a given size m and initialize all the elements to the given ELT value i...
Definition: Vector_.h:95
 
This is the top-level SimTK namespace into which all SimTK names are placed to avoid collision with o...
Definition: Assembler.h:37