#include <Vec.h>
Inherited by UnitVec< Real, 1 >.
Classes | |
struct | EltResult |
struct | Result |
struct | Substitute |
Public Types | |
enum | { NRows = M, NCols = 1, NPackedElements = M, NActualElements = M * STRIDE, NActualScalars = CNT<E>::NActualScalars * NActualElements, RowSpacing = STRIDE, ColSpacing = NActualElements, ImagOffset = NTraits<ENumber>::ImagOffset, RealStrideFactor = 1, ArgDepth, IsScalar = 0, IsULessScalar = 0, IsNumber = 0, IsStdNumber = 0, IsPrecision = 0, SignInterpretation = CNT<E>::SignInterpretation } |
typedef Vec< M, E, STRIDE > | T |
typedef Vec< M, ENeg, STRIDE > | TNeg |
typedef Vec< M, EWithoutNegator, STRIDE > | TWithoutNegator |
typedef Vec< M, EReal, STRIDE *CNT< E >::RealStrideFactor > | TReal |
typedef Vec< M, EImag, STRIDE *CNT< E >::RealStrideFactor > | TImag |
typedef Vec< M, EComplex, STRIDE > | TComplex |
typedef Row< M, EHerm, STRIDE > | THerm |
typedef Row< M, E, STRIDE > | TPosTrans |
typedef E | TElement |
typedef E | TRow |
typedef Vec | TCol |
typedef Vec< M, ESqrt, 1 > | TSqrt |
typedef Vec< M, EAbs, 1 > | TAbs |
typedef Vec< M, EStandard, 1 > | TStandard |
typedef Row< M, EInvert, 1 > | TInvert |
typedef Vec< M, ENormalize, 1 > | TNormalize |
typedef ESqHermT | TSqHermT |
typedef SymMat< M, ESqTHerm > | TSqTHerm |
typedef EScalar | Scalar |
typedef EULessScalar | ULessScalar |
typedef ENumber | Number |
typedef EStdNumber | StdNumber |
typedef EPrecision | Precision |
typedef EScalarNormSq | ScalarNormSq |
Public Member Functions | |
int | size () const |
int | nrow () const |
int | ncol () const |
ScalarNormSq | scalarNormSqr () const |
TSqrt | sqrt () const |
TAbs | abs () const |
TStandard | standardize () const |
EStandard | sum () const |
Vec () | |
Vec (const Vec &src) | |
Vec & | operator= (const Vec &src) |
template<int SS> | |
Vec (const Vec< M, E, SS > &src) | |
template<int SS> | |
Vec (const Vec< M, ENeg, SS > &src) | |
template<class EE , int SS> | |
Vec (const Vec< M, EE, SS > &vv) | |
Vec (const E &e) | |
Vec (const ENeg &ne) | |
Vec (int i) | |
Vec (const E &e0, const E &e1) | |
Vec (const E &e0, const E &e1, const E &e2) | |
Vec (const E &e0, const E &e1, const E &e2, const E &e3) | |
Vec (const E &e0, const E &e1, const E &e2, const E &e3, const E &e4) | |
Vec (const E &e0, const E &e1, const E &e2, const E &e3, const E &e4, const E &e5) | |
Vec (const E &e0, const E &e1, const E &e2, const E &e3, const E &e4, const E &e5, const E &e6) | |
Vec (const E &e0, const E &e1, const E &e2, const E &e3, const E &e4, const E &e5, const E &e6, const E &e7) | |
Vec (const E &e0, const E &e1, const E &e2, const E &e3, const E &e4, const E &e5, const E &e6, const E &e7, const E &e8) | |
template<class EE > | |
Vec (const EE *p) | |
template<class EE > | |
Vec & | operator= (const EE *p) |
template<class EE , int SS> | |
Vec & | operator= (const Vec< M, EE, SS > &vv) |
template<class EE , int SS> | |
Vec & | operator+= (const Vec< M, EE, SS > &r) |
template<class EE , int SS> | |
Vec & | operator+= (const Vec< M, negator< EE >, SS > &r) |
template<class EE , int SS> | |
Vec & | operator-= (const Vec< M, EE, SS > &r) |
template<class EE , int SS> | |
Vec & | operator-= (const Vec< M, negator< EE >, SS > &r) |
template<class EE , int SS> | |
Vec< M, typename CNT< E > ::template Result< EE >::Add > | conformingAdd (const Vec< M, EE, SS > &r) const |
template<class EE , int SS> | |
Vec< M, typename CNT< E > ::template Result< EE >::Sub > | conformingSubtract (const Vec< M, EE, SS > &r) const |
template<class EE , int SS> | |
Mat< M, M, typename CNT< E > ::template Result< EE >::Mul > | conformingMultiply (const Row< M, EE, SS > &r) const |
const E & | operator[] (int i) const |
E & | operator[] (int i) |
const E & | operator() (int i) const |
E & | operator() (int i) |
ScalarNormSq | normSqr () const |
CNT< ScalarNormSq >::TSqrt | norm () const |
TNormalize | normalize () const |
TInvert | invert () const |
const Vec & | operator+ () const |
const TNeg & | operator- () const |
TNeg & | operator- () |
const THerm & | operator~ () const |
THerm & | operator~ () |
const TNeg & | negate () const |
TNeg & | updNegate () |
const THerm & | transpose () const |
THerm & | updTranspose () |
const TPosTrans & | positionalTranspose () const |
TPosTrans & | updPositionalTranspose () |
const TReal & | real () const |
TReal & | real () |
const TImag & | imag () const |
TImag & | imag () |
const TWithoutNegator & | castAwayNegatorIfAny () const |
TWithoutNegator & | updCastAwayNegatorIfAny () |
template<class EE > | |
Vec< M, typename CNT< E > ::template Result< EE >::Mul > | scalarMultiply (const EE &e) const |
template<class EE > | |
Vec< M, typename CNT< EE > ::template Result< E >::Mul > | scalarMultiplyFromLeft (const EE &e) const |
template<class EE > | |
Vec< M, typename CNT< E > ::template Result< EE >::Dvd > | scalarDivide (const EE &e) const |
template<class EE > | |
Vec< M, typename CNT< EE > ::template Result< E >::Dvd > | scalarDivideFromLeft (const EE &e) const |
template<class EE > | |
Vec< M, typename CNT< E > ::template Result< EE >::Add > | scalarAdd (const EE &e) const |
template<class EE > | |
Vec< M, typename CNT< E > ::template Result< EE >::Sub > | scalarSubtract (const EE &e) const |
template<class EE > | |
Vec< M, typename CNT< EE > ::template Result< E >::Sub > | scalarSubtractFromLeft (const EE &e) const |
template<class EE > | |
Vec & | operator= (const EE &e) |
template<class EE > | |
Vec & | operator+= (const EE &e) |
template<class EE > | |
Vec & | operator-= (const EE &e) |
template<class EE > | |
Vec & | operator*= (const EE &e) |
template<class EE > | |
Vec & | operator/= (const EE &e) |
template<class EE > | |
Vec & | scalarEq (const EE &ee) |
template<class EE > | |
Vec & | scalarPlusEq (const EE &ee) |
template<class EE > | |
Vec & | scalarMinusEq (const EE &ee) |
template<class EE > | |
Vec & | scalarMinusEqFromLeft (const EE &ee) |
template<class EE > | |
Vec & | scalarTimesEq (const EE &ee) |
template<class EE > | |
Vec & | scalarTimesEqFromLeft (const EE &ee) |
template<class EE > | |
Vec & | scalarDivideEq (const EE &ee) |
template<class EE > | |
Vec & | scalarDivideEqFromLeft (const EE &ee) |
void | setToNaN () |
void | setToZero () |
template<int MM> | |
const Vec< MM, ELT, STRIDE > & | getSubVec (int i) const |
template<int MM> | |
Vec< MM, ELT, STRIDE > & | updSubVec (int i) |
Vec< M-1, ELT, 1 > | drop1 (int p) const |
template<class EE > | |
Vec< M+1, ELT, 1 > | append1 (const EE &v) const |
template<class EE > | |
Vec< M+1, ELT, 1 > | insert1 (int p, const EE &v) const |
bool | isNaN () const |
Return true if any element of this Vec contains a NaN anywhere. | |
bool | isInf () const |
Return true if any element of this Vec contains a +Inf or -Inf somewhere but no element contains a NaN anywhere. | |
bool | isFinite () const |
Return true if no element contains an Infinity or a NaN. | |
template<class E2 , int RS2> | |
bool | isNumericallyEqual (const Vec< M, E2, RS2 > &v, double tol) const |
Test whether this vector is numerically equal to some other vector with the same shape, using a specified tolerance. | |
template<class E2 , int RS2> | |
bool | isNumericallyEqual (const Vec< M, E2, RS2 > &v) const |
Test whether this vector is numerically equal to some other vector with the same shape, using a default tolerance which is the looser of the default tolerances of the two objects being compared. | |
bool | isNumericallyEqual (const ELT &e, double tol=getDefaultTolerance()) const |
Test whether every element of this vector is numerically equal to the given element, using either a specified tolerance or the vector's default tolerance (which is always the same or looser than the default tolerance for one of its elements). | |
Static Public Member Functions | |
static const Vec & | getAs (const ELT *p) |
static Vec & | updAs (ELT *p) |
template<int MM> | |
static const Vec & | getSubVec (const Vec< MM, ELT, STRIDE > &v, int i) |
template<int MM> | |
static Vec & | updSubVec (Vec< MM, ELT, STRIDE > &v, int i) |
static Vec< M, ELT, 1 > | getNaN () |
static double | getDefaultTolerance () |
For approximate comparisions, the default tolerance to use for a vector is the same as its elements' default tolerance. |
Generic Vec.
typedef ENumber Number |
typedef EPrecision Precision |
typedef EScalar Scalar |
typedef EScalarNormSq ScalarNormSq |
typedef EStdNumber StdNumber |
typedef E TElement |
typedef Vec<M,ENormalize,1> TNormalize |
typedef E TRow |
typedef ESqHermT TSqHermT |
typedef Vec<M,EWithoutNegator,STRIDE> TWithoutNegator |
typedef EULessScalar ULessScalar |
anonymous enum |
Vec | ( | ) | [inline] |
Vec | ( | const E & | e | ) | [inline, explicit] |
Vec | ( | const ENeg & | ne | ) | [inline, explicit] |
Vec | ( | int | i | ) | [inline, explicit] |
Referenced by Vec< 3, P, S >::Vec().
Vec | ( | const E & | e0, | |
const E & | e1 | |||
) | [inline] |
Vec | ( | const E & | e0, | |
const E & | e1, | |||
const E & | e2 | |||
) | [inline] |
Vec | ( | const E & | e0, | |
const E & | e1, | |||
const E & | e2, | |||
const E & | e3 | |||
) | [inline] |
Vec | ( | const E & | e0, | |
const E & | e1, | |||
const E & | e2, | |||
const E & | e3, | |||
const E & | e4 | |||
) | [inline] |
Vec | ( | const E & | e0, | |
const E & | e1, | |||
const E & | e2, | |||
const E & | e3, | |||
const E & | e4, | |||
const E & | e5 | |||
) | [inline] |
Vec | ( | const E & | e0, | |
const E & | e1, | |||
const E & | e2, | |||
const E & | e3, | |||
const E & | e4, | |||
const E & | e5, | |||
const E & | e6 | |||
) | [inline] |
Vec | ( | const E & | e0, | |
const E & | e1, | |||
const E & | e2, | |||
const E & | e3, | |||
const E & | e4, | |||
const E & | e5, | |||
const E & | e6, | |||
const E & | e7 | |||
) | [inline] |
Vec | ( | const E & | e0, | |
const E & | e1, | |||
const E & | e2, | |||
const E & | e3, | |||
const E & | e4, | |||
const E & | e5, | |||
const E & | e6, | |||
const E & | e7, | |||
const E & | e8 | |||
) | [inline] |
Vec | ( | const EE * | p | ) | [inline, explicit] |
TAbs abs | ( | ) | const [inline] |
Reimplemented in UnitVec< P, S >, and UnitVec< Real, 1 >.
Referenced by SimTK::abs(), and UnitVec< Real, 1 >::abs().
Vec<M+1,ELT,1> append1 | ( | const EE & | v | ) | const [inline] |
Referenced by Vec< 3, P, S >::insert1().
const TWithoutNegator& castAwayNegatorIfAny | ( | ) | const [inline] |
Referenced by Vec< 3, P, S >::normalize().
Vec<M,typename CNT<E>::template Result<EE>::Add> conformingAdd | ( | const Vec< M, EE, SS > & | r | ) | const [inline] |
Referenced by Vec< 3, P, S >::conformingAdd().
Mat<M,M,typename CNT<E>::template Result<EE>::Mul> conformingMultiply | ( | const Row< M, EE, SS > & | r | ) | const [inline] |
Vec<M,typename CNT<E>::template Result<EE>::Sub> conformingSubtract | ( | const Vec< M, EE, SS > & | r | ) | const [inline] |
Referenced by Vec< 3, P, S >::conformingSubtract().
Vec<M-1,ELT,1> drop1 | ( | int | p | ) | const [inline] |
static const Vec& getAs | ( | const ELT * | p | ) | [inline, static] |
Referenced by SymMat< 3, P >::getDiag(), Vec< 3, P, S >::getSubVec(), and SimTK::operator*().
static double getDefaultTolerance | ( | ) | [inline, static] |
For approximate comparisions, the default tolerance to use for a vector is the same as its elements' default tolerance.
Referenced by Vec< 3, P, S >::getDefaultTolerance(), and Vec< 3, P, S >::isNumericallyEqual().
static Vec<M,ELT,1> getNaN | ( | ) | [inline, static] |
Referenced by Vec< 3, P, S >::getNaN(), and Vec< 3, P, S >::setToNaN().
const Vec<MM,ELT,STRIDE>& getSubVec | ( | int | i | ) | const [inline] |
TImag& imag | ( | ) | [inline] |
const TImag& imag | ( | ) | const [inline] |
Vec<M+1,ELT,1> insert1 | ( | int | p, | |
const EE & | v | |||
) | const [inline] |
TInvert invert | ( | ) | const [inline] |
bool isFinite | ( | ) | const [inline] |
Return true if no element contains an Infinity or a NaN.
Referenced by Markers::findCurrentMarkerErrorSquared().
bool isInf | ( | ) | const [inline] |
Return true if any element of this Vec contains a +Inf or -Inf somewhere but no element contains a NaN anywhere.
bool isNaN | ( | ) | const [inline] |
Return true if any element of this Vec contains a NaN anywhere.
bool isNumericallyEqual | ( | const ELT & | e, | |
double | tol = getDefaultTolerance() | |||
) | const [inline] |
Test whether every element of this vector is numerically equal to the given element, using either a specified tolerance or the vector's default tolerance (which is always the same or looser than the default tolerance for one of its elements).
bool isNumericallyEqual | ( | const Vec< M, E2, RS2 > & | v | ) | const [inline] |
Test whether this vector is numerically equal to some other vector with the same shape, using a default tolerance which is the looser of the default tolerances of the two objects being compared.
bool isNumericallyEqual | ( | const Vec< M, E2, RS2 > & | v, | |
double | tol | |||
) | const [inline] |
Test whether this vector is numerically equal to some other vector with the same shape, using a specified tolerance.
Referenced by Vec< 3, P, S >::isNumericallyEqual().
int ncol | ( | ) | const [inline] |
const TNeg& negate | ( | ) | const [inline] |
Reimplemented in UnitVec< P, S >, and UnitVec< Real, 1 >.
Referenced by Vec< 3, P, S >::operator-().
CNT<ScalarNormSq>::TSqrt norm | ( | ) | const [inline] |
Referenced by VanDerWaalsForce::calcForce(), VanDerWaalsForce::calcPotentialEnergy(), RNA::calcRNABaseNormal(), MobilizedBody::calcStationToStationDistance(), MobilizedBody::calcStationToStationDistance2ndTimeDerivative(), MobilizedBody::calcStationToStationDistanceTimeDerivative(), and Vec< 3, P, S >::normalize().
TNormalize normalize | ( | ) | const [inline] |
Reimplemented in Quaternion_< P >.
ScalarNormSq normSqr | ( | ) | const [inline] |
int nrow | ( | ) | const [inline] |
E& operator() | ( | int | i | ) | [inline] |
const E& operator() | ( | int | i | ) | const [inline] |
Reimplemented in UnitVec< P, S >, and UnitVec< Real, 1 >.
Vec& operator*= | ( | const EE & | e | ) | [inline] |
const Vec& operator+ | ( | ) | const [inline] |
Vec& operator+= | ( | const EE & | e | ) | [inline] |
TNeg& operator- | ( | ) | [inline] |
const TNeg& operator- | ( | ) | const [inline] |
Reimplemented in UnitVec< P, S >, and UnitVec< Real, 1 >.
Vec& operator-= | ( | const EE & | e | ) | [inline] |
Vec& operator/= | ( | const EE & | e | ) | [inline] |
Vec& operator= | ( | const EE & | e | ) | [inline] |
Vec& operator= | ( | const EE * | p | ) | [inline] |
E& operator[] | ( | int | i | ) | [inline] |
const E& operator[] | ( | int | i | ) | const [inline] |
Reimplemented in UnitVec< P, S >, and UnitVec< Real, 1 >.
THerm& operator~ | ( | ) | [inline] |
Reimplemented in UnitVec< P, S >, and UnitVec< Real, 1 >.
const THerm& operator~ | ( | ) | const [inline] |
Reimplemented in UnitVec< P, S >, and UnitVec< Real, 1 >.
const TPosTrans& positionalTranspose | ( | ) | const [inline] |
TReal& real | ( | ) | [inline] |
const TReal& real | ( | ) | const [inline] |
Referenced by Mat< 3, 3, P >::scalarMinusEqFromLeft().
Vec& scalarDivideEq | ( | const EE & | ee | ) | [inline] |
Referenced by Vec< 3, P, S >::operator/=().
Vec& scalarDivideEqFromLeft | ( | const EE & | ee | ) | [inline] |
Vec<M, typename CNT<EE>::template Result<E>::Dvd> scalarDivideFromLeft | ( | const EE & | e | ) | const [inline] |
Vec& scalarEq | ( | const EE & | ee | ) | [inline] |
Referenced by Vec< 3, P, S >::operator=(), and Mat< 3, 3, P >::scalarEq().
Vec& scalarMinusEq | ( | const EE & | ee | ) | [inline] |
Referenced by Vec< 3, P, S >::operator-=(), and Mat< 3, 3, P >::scalarMinusEq().
Vec& scalarMinusEqFromLeft | ( | const EE & | ee | ) | [inline] |
Referenced by SymMat< 3, P >::scalarMinusEqFromLeft().
Referenced by Vec< 3, P, S >::conformingMultiply().
Vec<M, typename CNT<EE>::template Result<E>::Mul> scalarMultiplyFromLeft | ( | const EE & | e | ) | const [inline] |
ScalarNormSq scalarNormSqr | ( | ) | const [inline] |
Referenced by Vec< 3, P, S >::norm(), Vec< 3, P, S >::normSqr(), and SymMat< 3, P >::scalarNormSqr().
Vec& scalarPlusEq | ( | const EE & | ee | ) | [inline] |
Referenced by Vec< 3, P, S >::operator+=(), and Mat< 3, 3, P >::scalarPlusEq().
Vec<M, typename CNT<EE>::template Result<E>::Sub> scalarSubtractFromLeft | ( | const EE & | e | ) | const [inline] |
Vec& scalarTimesEq | ( | const EE & | ee | ) | [inline] |
Referenced by Vec< 3, P, S >::operator*=().
Vec& scalarTimesEqFromLeft | ( | const EE & | ee | ) | [inline] |
void setToNaN | ( | ) | [inline] |
Referenced by Transform_< Real >::setToNaN(), PhiMatrix::setToNaN(), and Vec< 3, P, S >::Vec().
void setToZero | ( | ) | [inline] |
int size | ( | ) | const [inline] |
TSqrt sqrt | ( | ) | const [inline] |
Referenced by Vec< 3, P, S >::norm().
TStandard standardize | ( | ) | const [inline] |
Referenced by Vec< 3, P, S >::sum().
EStandard sum | ( | ) | const [inline] |
const THerm& transpose | ( | ) | const [inline] |
Referenced by Vec< 3, P, S >::operator~().
static Vec& updAs | ( | ELT * | p | ) | [inline, static] |
Referenced by Vec< 3, P, S >::append1(), SimTK::operator*(), SymMat< 3, P >::updDiag(), and Vec< 3, P, S >::updSubVec().
TWithoutNegator& updCastAwayNegatorIfAny | ( | ) | [inline] |
TNeg& updNegate | ( | ) | [inline] |
Referenced by Vec< 3, P, S >::operator-().
TPosTrans& updPositionalTranspose | ( | ) | [inline] |
Vec<MM,ELT,STRIDE>& updSubVec | ( | int | i | ) | [inline] |
Referenced by SphericalCoords::setDefaultAngles(), and Planar::setDefaultTranslation().
THerm& updTranspose | ( | ) | [inline] |
Referenced by Vec< 3, P, S >::operator~().