Free Electron
Public Member Functions | Public Attributes | Related Functions | List of all members
fe::Vector< N, T > Class Template Reference

Dense vector - size fixed by template. More...

#include <Vector.h>

Inheritance diagram for fe::Vector< N, T >:
Inheritance graph
[legend]

Public Member Functions

 Vector (const Vector< N, T > &other)
 
template<typename U >
 Vector (const Vector< N, U > &other)
 
template<typename U >
 Vector (const Vector< N+1, U > &other)
 
template<typename U >
 Vector (const Vector< N+2, U > &other)
 
template<typename U >
 Vector (const Vector< N-1, U > &other)
 
template<typename U >
 Vector (const Vector< N-2, U > &other)
 
 Vector (const T *array)
 
 Vector (T x, T y, T z, T w, T v, T u)
 
 Vector (T x, T y, T z, T w, T v)
 
 Vector (T x, T y, T z, T w)
 
 Vector (T x, T y, T z)
 
 Vector (T x, T y)
 
 Vector (T x)
 
const T & operator[] (unsigned int index) const
 
T & operator[] (unsigned int index)
 
T * raw (void)
 
const T * raw (void) const
 
const T * temp (void) const
 
Vector< N, T > & operator= (const T *array)
 
Vector< N, T > & operator= (const Vector< N, T > &other)
 
template<typename U >
Vector< N, T > & operator= (const Vector< N, U > &other)
 
Vector< N, T > & operator= (const Vector< N+1, T > &other)
 
template<typename U >
Vector< N, T > & operator= (const Vector< N+1, U > &other)
 
template<typename U >
Vector< N, T > & operator= (const Vector< N+2, U > &other)
 
template<typename U >
Vector< N, T > & operator= (const Vector< N-1, U > &other)
 
template<typename U >
Vector< N, T > & operator= (const Vector< N-2, U > &other)
 
bool operator== (const Vector< N, T > &other) const
 
bool operator!= (const Vector< N, T > &other) const
 
template<>
 Vector (const Vector< 2, U > &other)
 

Public Attributes

m_data [N]
 

Related Functions

(Note that these are not member functions.)

template<int M, int N, class T , class U >
Vector< M, T > & multiply (Vector< M, T > &b, const Matrix< M, N, T > &A, const Vector< N, U > &x)
 Matrix Vector multiply. More...
 
template<int M, int N, class T , class U >
Vector< M, T > multiply (const Matrix< M, N, T > &A, const Vector< N, U > &x)
 Matrix Vector multiply. More...
 
template<int M, int N, class T >
Vector< M, T > transposeMultiply (const Matrix< M, N, T > &A, const Vector< N, T > &x)
 Matrix Vector multiply with the matrix transposed. More...
 
template<int M, int N, class T , class U >
Vector< M, U > operator* (const Matrix< M, N, T > &lhs, const Vector< N, U > &rhs)
 Matrix Vector multiply. More...
 
template<class T , class U >
bool equivalent (const Matrix< 3, 4, T > &lhs, const Matrix< 3, 4, T > &rhs, U margin)
 Equivalence test within the given tolerance margin. More...
 
template<int N, class T >
Vector< N, T > & set (Vector< N, T > &lhs)
 Set all the elements to zero. More...
 
template<int N, class T , class U >
Vector< N, T > & setAll (Vector< N, T > &lhs, const U value)
 Set all the elements to the given value. More...
 
template<int N, class T , class U >
Vector< N, T > & setAt (Vector< N, T > &lhs, U32 index, const U value)
 Set the value at the index. More...
 
template<int N, class T >
U32 size (const Vector< N, T > &lhs)
 Return the number of elements. More...
 
template<int N, class T >
Vector< N, T > & operator+= (Vector< N, T > &lhs, const Vector< N, T > &rhs)
 In place add operator. More...
 
template<int M, int N, class T >
Vector< N, T > & operator+= (Vector< N, T > &lhs, const Vector< M, T > &rhs)
 In place add operator. More...
 
template<int N, class T >
Vector< N, T > & operator-= (Vector< N, T > &lhs, const Vector< N, T > &rhs)
 In place subtract operator. More...
 
template<int M, int N, class T >
Vector< N, T > & operator-= (Vector< N, T > &lhs, const Vector< M, T > &rhs)
 In place subtract operator. More...
 
template<int N, class T >
Vector< N, T > operator- (const Vector< N, T > &rhs)
 Negate operation. More...
 
template<int N, class T >
Vector< N, T > & operator*= (Vector< N, T > &lhs, const Vector< N, T > &rhs)
 In place piecewise multiply operator. More...
 
template<int M, int N, class T >
Vector< N, T > & operator*= (Vector< N, T > &lhs, const Vector< M, T > &rhs)
 In place piecewise multiply operator. More...
 
template<int N, class T , class U >
Vector< N, T > & operator*= (Vector< N, T > &lhs, U scale)
 In place piecewise scale operator. More...
 
template<int N, class T >
dot (const Vector< N, T > &lhs, const Vector< N, T > &rhs)
 Dot (inner) product. More...
 
template<int N, class T >
magnitude (const Vector< N, T > &rhs)
 Frobenius norm operation. More...
 
template<int N, class T >
magnitudeSquared (const Vector< N, T > &rhs)
 Square of the length. More...
 
template<int N, class T >
Vector< N, T > unit (const Vector< N, T > &vec)
 Return vector scaled to unit length. More...
 
template<int N, class T >
Vector< N, T > unitSafe (const Vector< N, T > &vec)
 Return vector scaled to unit length with zero check. More...
 
template<int N, class T >
Vector< N, T > & normalize (Vector< N, T > &vec)
 In place normalize operator. More...
 
template<int N, class T >
Vector< N, T > & normalizeSafe (Vector< N, T > &vec)
 In place normalize operator with zero length check. More...
 
template<int N, class T >
String print (const Vector< N, T > &vec)
 Print to a string. More...
 
template<int N, class T >
Vector< N, T > operator+ (const Vector< N, T > &lhs, const Vector< N, T > &rhs)
 add operation More...
 
template<int N, int M, class T >
Vector< N, T > operator+ (const Vector< N, T > &lhs, const Vector< M, T > &rhs)
 add operation More...
 
template<int N, class T >
Vector< N, T > operator- (const Vector< N, T > &lhs, const Vector< N, T > &rhs)
 subtract operation More...
 
template<int N, int M, class T >
Vector< N, T > operator- (const Vector< N, T > &lhs, const Vector< M, T > &rhs)
 subtract operation More...
 
template<int N, class T >
bool operator== (const Vector< N, T > &lhs, const Vector< N, T > &rhs)
 equality test More...
 
template<int N, class T , class U >
bool equivalent (const Vector< N, T > &lhs, const Vector< N, T > &rhs, U margin)
 Equivalence test within the given tolerance margin. More...
 
template<int N, class T >
Vector< N, T > operator* (const Vector< N, T > &lhs, const Vector< N, T > &rhs)
 Piecewise multiply operation. More...
 
template<int N, class T , class U >
Vector< N, T > operator* (const U lhs, const Vector< N, T > &rhs)
 Scale operation. More...
 
template<int N, class T , class U >
Vector< N, T > operator* (const Vector< N, T > &lhs, const U &rhs)
 Scale operation. More...
 
template<int N, class T , class U >
Vector< N, T > operator/ (const Vector< N, T > &lhs, const U &rhs)
 Inverse Scale operation. More...
 
template<int N, class T , class U >
Vector< N, T > & addScaled (Vector< N, T > &lhs, U scalar, const Vector< N, T > &rhs)
 Add with scaling. More...
 
template<int N, class T , class U >
Vector< N, T > & scaleAndAdd (Vector< N, T > &lhs, U scalar, const Vector< N, T > &rhs)
 Scale then add. More...
 
template<typename T >
Vector< 4, T > & set (Vector< 4, T > &r)
 Set components. More...
 
template<typename T , typename U >
Vector< 4, T > & set (Vector< 4, T > &r, U x)
 Set components. More...
 
template<typename T , typename U , typename V >
Vector< 4, T > & set (Vector< 4, T > &r, U x, V y)
 Set components. More...
 
template<typename T , typename U , typename V , typename W >
Vector< 4, T > & set (Vector< 4, T > &r, U x, V y, W z)
 Set components. More...
 
template<typename T , typename U , typename V , typename W , typename X >
Vector< 4, T > & set (Vector< 4, T > &r, U x, V y, W z, X w)
 Set components. More...
 
template<typename T , typename U >
Vector< 4, T > & setAt (Vector< 4, T > &lhs, U32 index, U value)
 Set indexed component. More...
 
template<typename T >
U32 size (const Vector< 4, T > &lhs)
 Return the number of elements. More...
 
template<typename T >
Vector< 4, T > & operator+= (Vector< 4, T > &lhs, const Vector< 4, T > &rhs)
 Add to Vector in place. More...
 
template<typename T >
Vector< 4, T > & operator-= (Vector< 4, T > &lhs, const Vector< 4, T > &rhs)
 Subtract from Vector in place. More...
 
template<typename T >
Vector< 4, T > operator- (const Vector< 4, T > &rhs)
 Negate the Vector. More...
 
template<typename T >
Vector< 4, T > & operator*= (Vector< 4, T > &lhs, const Vector< 4, T > &rhs)
 Independently scale components in place. More...
 
template<typename T , typename U >
Vector< 4, T > & operator*= (Vector< 4, T > &lhs, U scale)
 Uniformly scale components in place. More...
 
template<typename T >
dot (const Vector< 4, T > &lhs, const Vector< 4, T > &rhs)
 Return dot product. More...
 
template<typename T >
magnitudeSquared (const Vector< 4, T > &rhs)
 Return square of the Vector length. More...
 
template<typename T >
magnitude (const Vector< 4, T > &rhs)
 Return the Vector length. More...
 
template<typename T >
Vector< 4, T > unit (const Vector< 4, T > &vector)
 Return the Vector direction scaled to unit length. More...
 
template<typename T >
Vector< 4, T > unitSafe (const Vector< 4, T > &vector)
 Return the Vector direction scaled to unit length with zero check. More...
 
template<typename T >
Vector< 4, T > & normalize (Vector< 4, T > &vector)
 Scale Vector to unit length. More...
 
template<typename T >
Vector< 4, T > & normalizeSafe (Vector< 4, T > &vector)
 Scale Vector to unit length with zero check. More...
 
template<typename T >
String print (const Vector< 4, T > &vector)
 Return text describing the Vector's state. More...
 
template<typename T >
Vector< 4, T > operator+ (const Vector< 4, T > &lhs, const Vector< 4, T > &rhs)
 Return sum of Vectors. More...
 
template<typename T >
Vector< 4, T > operator- (const Vector< 4, T > &lhs, const Vector< 4, T > &rhs)
 Return difference of Vectors. More...
 
template<typename T >
Vector< 4, T > operator* (const Vector< 4, T > &lhs, const Vector< 4, T > &rhs)
 Return a Vector of products of each component. More...
 
template<typename T , typename U >
boost::enable_if< boost::is_arithmetic< U >, Vector< 4, T > >::type operator* (const U lhs, const Vector< 4, T > &rhs)
 Return a uniformly scale Vector (pre) More...
 
template<typename T , typename U >
boost::enable_if< boost::is_arithmetic< U >, Vector< 4, T > >::type operator* (const Vector< 4, T > &lhs, const U rhs)
 Return a uniformly scale Vector (post) More...
 
template<typename T >
Vector< 4, T > & cross3 (Vector< 4, T > &r, const Vector< 4, T > &lhs, const Vector< 4, T > &rhs)
 Return a cross product of Vectors. More...
 
template<typename T >
Vector< 4, T > cross3 (const Vector< 4, T > &lhs, const Vector< 4, T > &rhs)
 Set the Vector as a cross product of Vectors. More...
 
String print (const Vector< FE_VDIM, F32 > &rhs)
 Return text describing the Vector's state. More...
 
Vector< FE_VDIM, F32 > & set (Vector< FE_VDIM, F32 > &r)
 Set components. More...
 
template<typename T >
Vector< FE_VDIM, F32 > & set (Vector< FE_VDIM, F32 > &r, T x)
 Set components. More...
 
template<typename T , typename U >
Vector< FE_VDIM, F32 > & set (Vector< FE_VDIM, F32 > &r, T x, U y)
 Set components. More...
 
template<typename T , typename U , typename V >
Vector< FE_VDIM, F32 > & set (Vector< FE_VDIM, F32 > &r, T x, U y, V z)
 Set components. More...
 
template<typename T , typename U , typename V , typename W >
Vector< FE_VDIM, F32 > & set (Vector< FE_VDIM, F32 > &r, T x, U y, V z, W w)
 Set components. More...
 
template<typename T >
Vector< FE_VDIM, F32 > & setAll (Vector< FE_VDIM, F32 > &lhs, T value)
 Set all components to the same value. More...
 
template<typename T >
Vector< FE_VDIM, F32 > & setAt (Vector< FE_VDIM, F32 > &lhs, U32 index, T value)
 Set indexed component. More...
 
template<typename T >
U32 size (const Vector< FE_VDIM, F32 > &lhs)
 Return the number of elements. More...
 
Vector< FE_VDIM, F32 > & operator+= (Vector< FE_VDIM, F32 > &lhs, const Vector< FE_VDIM, F32 > &rhs)
 Add to Vector in place. More...
 
Vector< FE_VDIM, F32 > & operator-= (Vector< FE_VDIM, F32 > &lhs, const Vector< FE_VDIM, F32 > &rhs)
 Subtract from Vector in place. More...
 
Vector< FE_VDIM, F32 > operator- (const Vector< FE_VDIM, F32 > &rhs)
 Negate the Vector. More...
 
Vector< FE_VDIM, F32 > & operator*= (Vector< FE_VDIM, F32 > &lhs, const Vector< FE_VDIM, F32 > &rhs)
 Independently scale components in place. More...
 
template<typename T >
Vector< FE_VDIM, F32 > & operator*= (Vector< FE_VDIM, F32 > &lhs, T rhs)
 Uniformly scale components in place. More...
 
F32 dot (const Vector< FE_VDIM, F32 > &lhs, const Vector< FE_VDIM, F32 > &rhs)
 Return dot product. More...
 
F32 magnitudeSquared (const Vector< FE_VDIM, F32 > &rhs)
 Return square of the Vector length. More...
 
F32 magnitude (const Vector< FE_VDIM, F32 > &rhs)
 Return the Vector length. More...
 
Vector< FE_VDIM, F32 > operator+ (const Vector< FE_VDIM, F32 > &lhs, const Vector< FE_VDIM, F32 > &rhs)
 Return sum of Vectors. More...
 
Vector< FE_VDIM, F32 > operator- (const Vector< FE_VDIM, F32 > &lhs, const Vector< FE_VDIM, F32 > &rhs)
 Return difference of Vectors. More...
 
Vector< FE_VDIM, F32 > operator* (const Vector< FE_VDIM, F32 > &lhs, const Vector< FE_VDIM, F32 > &rhs)
 Return a Vector of products of each component. More...
 
template<typename T >
boost::enable_if< boost::is_arithmetic< T >, Vector< FE_VDIM, F32 > >::type operator* (const T lhs, const Vector< FE_VDIM, F32 > &rhs)
 Return a uniformly scaled Vector (pre) More...
 
template<typename T >
boost::enable_if< boost::is_arithmetic< T >, Vector< FE_VDIM, F32 > >::type operator* (const Vector< FE_VDIM, F32 > &lhs, const T rhs)
 Return a uniformly scaled Vector (post) More...
 
Vector< FE_VDIM, F32 > unit (const Vector< FE_VDIM, F32 > &rhs)
 Return the Vector direction scaled to unit length. More...
 
Vector< FE_VDIM, F32 > unitSafe (const Vector< FE_VDIM, F32 > &rhs)
 Return the Vector direction scaled to unit length with zero check. More...
 
Vector< FE_VDIM, F32 > & normalize (Vector< FE_VDIM, F32 > &rhs)
 Scale Vector to unit length. More...
 
Vector< FE_VDIM, F32 > & normalizeSafe (Vector< FE_VDIM, F32 > &rhs)
 Scale Vector to unit length. More...
 
Vector< FE_VDIM, F32 > & cross3 (Vector< FE_VDIM, F32 > &r, const Vector< FE_VDIM, F32 > &lhs, const Vector< FE_VDIM, F32 > &rhs)
 Return a cross product of Vectors. More...
 
Vector< FE_VDIM, F32 > cross3 (const Vector< FE_VDIM, F32 > &lhs, const Vector< FE_VDIM, F32 > &rhs)
 Set the Vector as a cross product of Vectors. More...
 

Detailed Description

template<int N, class T>
class fe::Vector< N, T >

Dense vector - size fixed by template.

Friends And Related Function Documentation

◆ addScaled()

template<int N, class T , class U >
Vector< N, T > & addScaled ( Vector< N, T > &  lhs,
scalar,
const Vector< N, T > &  rhs 
)
related

Add with scaling.

lhs = lhs + rhs * scalar

Referenced by fe::Vector< 4, t_moa_real >::cross3().

◆ cross3() [1/4]

template<typename T >
Vector< 4, T > & cross3 ( Vector< 4, T > &  r,
const Vector< 4, T > &  lhs,
const Vector< 4, T > &  rhs 
)
related

Return a cross product of Vectors.

<4,T>

Referenced by fe::Vector< 4, t_moa_real >::cross3().

◆ cross3() [2/4]

template<typename T >
Vector< 4, T > cross3 ( const Vector< 4, T > &  lhs,
const Vector< 4, T > &  rhs 
)
related

Set the Vector as a cross product of Vectors.

<4,T>

◆ cross3() [3/4]

template<int N, class T>
Vector< FE_VDIM, F32 > & cross3 ( Vector< FE_VDIM, F32 > &  r,
const Vector< FE_VDIM, F32 > &  lhs,
const Vector< FE_VDIM, F32 > &  rhs 
)
related

Return a cross product of Vectors.

<4,F32>

◆ cross3() [4/4]

template<int N, class T>
Vector< FE_VDIM, F32 > cross3 ( const Vector< FE_VDIM, F32 > &  lhs,
const Vector< FE_VDIM, F32 > &  rhs 
)
related

Set the Vector as a cross product of Vectors.

<4,F32>

◆ dot() [1/3]

template<typename T >
T dot ( const Vector< 4, T > &  lhs,
const Vector< 4, T > &  rhs 
)
related

Return dot product.

<4,T>

◆ dot() [2/3]

template<int N, class T>
F32 dot ( const Vector< FE_VDIM, F32 > &  lhs,
const Vector< FE_VDIM, F32 > &  rhs 
)
related

Return dot product.

<4,F32>

◆ dot() [3/3]

template<int N, class T >
T dot ( const Vector< N, T > &  lhs,
const Vector< N, T > &  rhs 
)
related

Dot (inner) product.

Referenced by fe::Vector< 4, t_moa_real >::magnitudeSquared().

◆ equivalent() [1/2]

template<class T , class U >
bool equivalent ( const Matrix< 3, 4, T > &  lhs,
const Matrix< 3, 4, T > &  rhs,
margin 
)
related

Equivalence test within the given tolerance margin.

◆ equivalent() [2/2]

template<int N, class T , class U >
bool equivalent ( const Vector< N, T > &  lhs,
const Vector< N, T > &  rhs,
margin 
)
related

Equivalence test within the given tolerance margin.

◆ magnitude() [1/3]

template<typename T >
T magnitude ( const Vector< 4, T > &  rhs)
related

Return the Vector length.

<4,T>

◆ magnitude() [2/3]

template<int N, class T>
F32 magnitude ( const Vector< FE_VDIM, F32 > &  rhs)
related

Return the Vector length.

<4,F32>

◆ magnitude() [3/3]

template<int N, class T >
T magnitude ( const Vector< N, T > &  rhs)
related

◆ magnitudeSquared() [1/3]

template<typename T >
T magnitudeSquared ( const Vector< 4, T > &  rhs)
related

Return square of the Vector length.

<4,T>

◆ magnitudeSquared() [2/3]

template<int N, class T>
F32 magnitudeSquared ( const Vector< FE_VDIM, F32 > &  rhs)
related

Return square of the Vector length.

<4,F32>

◆ magnitudeSquared() [3/3]

template<int N, class T >
T magnitudeSquared ( const Vector< N, T > &  rhs)
related

Square of the length.

Referenced by fe::Vector< 4, t_moa_real >::magnitude().

◆ multiply() [1/2]

template<int M, int N, class T , class U >
Vector< M, T > & multiply ( Vector< M, T > &  b,
const Matrix< M, N, T > &  A,
const Vector< N, U > &  x 
)
related

Matrix Vector multiply.

◆ multiply() [2/2]

template<int M, int N, class T , class U >
Vector< M, T > multiply ( const Matrix< M, N, T > &  A,
const Vector< N, U > &  x 
)
related

Matrix Vector multiply.

◆ normalize() [1/3]

template<typename T >
Vector< 4, T > & normalize ( Vector< 4, T > &  vector)
related

Scale Vector to unit length.

<4,T>

◆ normalize() [2/3]

template<int N, class T>
Vector< FE_VDIM, F32 > & normalize ( Vector< FE_VDIM, F32 > &  rhs)
related

Scale Vector to unit length.

<4,F32>

◆ normalize() [3/3]

template<int N, class T >
Vector< N, T > & normalize ( Vector< N, T > &  vec)
related

In place normalize operator.

◆ normalizeSafe() [1/3]

template<typename T >
Vector< 4, T > & normalizeSafe ( Vector< 4, T > &  vector)
related

Scale Vector to unit length with zero check.

<4,T>

◆ normalizeSafe() [2/3]

template<int N, class T>
Vector< FE_VDIM, F32 > & normalizeSafe ( Vector< FE_VDIM, F32 > &  rhs)
related

Scale Vector to unit length.

<4,F32>

◆ normalizeSafe() [3/3]

template<int N, class T >
Vector< N, T > & normalizeSafe ( Vector< N, T > &  vec)
related

In place normalize operator with zero length check.

◆ operator*() [1/10]

template<typename T >
Vector< 4, T > operator* ( const Vector< 4, T > &  lhs,
const Vector< 4, T > &  rhs 
)
related

Return a Vector of products of each component.

<4,T>

◆ operator*() [2/10]

template<typename T , typename U >
boost::enable_if< boost::is_arithmetic< U >, Vector< 4, T > >::type operator* ( const U  lhs,
const Vector< 4, T > &  rhs 
)
related

Return a uniformly scale Vector (pre)

<4,T>

◆ operator*() [3/10]

template<typename T , typename U >
boost::enable_if< boost::is_arithmetic< U >, Vector< 4, T > >::type operator* ( const Vector< 4, T > &  lhs,
const U  rhs 
)
related

Return a uniformly scale Vector (post)

<4,T>

◆ operator*() [4/10]

template<int M, int N, class T , class U >
Vector< M, U > operator* ( const Matrix< M, N, T > &  lhs,
const Vector< N, U > &  rhs 
)
related

Matrix Vector multiply.

◆ operator*() [5/10]

template<int N, class T>
Vector< FE_VDIM, F32 > operator* ( const Vector< FE_VDIM, F32 > &  lhs,
const Vector< FE_VDIM, F32 > &  rhs 
)
related

Return a Vector of products of each component.

<4,F32>

◆ operator*() [6/10]

template<typename T >
boost::enable_if< boost::is_arithmetic< T >, Vector< FE_VDIM, F32 > >::type operator* ( const T  lhs,
const Vector< FE_VDIM, F32 > &  rhs 
)
related

Return a uniformly scaled Vector (pre)

<4,F32>

◆ operator*() [7/10]

template<typename T >
boost::enable_if< boost::is_arithmetic< T >, Vector< FE_VDIM, F32 > >::type operator* ( const Vector< FE_VDIM, F32 > &  lhs,
const T  rhs 
)
related

Return a uniformly scaled Vector (post)

<4,F32>

◆ operator*() [8/10]

template<int N, class T >
Vector< N, T > operator* ( const Vector< N, T > &  lhs,
const Vector< N, T > &  rhs 
)
related

Piecewise multiply operation.

◆ operator*() [9/10]

template<int N, class T , class U >
Vector< N, T > operator* ( const U  lhs,
const Vector< N, T > &  rhs 
)
related

Scale operation.

◆ operator*() [10/10]

template<int N, class T , class U >
Vector< N, T > operator* ( const Vector< N, T > &  lhs,
const U &  rhs 
)
related

Scale operation.

◆ operator*=() [1/7]

template<typename T >
Vector< 4, T > & operator*= ( Vector< 4, T > &  lhs,
const Vector< 4, T > &  rhs 
)
related

Independently scale components in place.

<4,T>

◆ operator*=() [2/7]

template<typename T , typename U >
Vector< 4, T > & operator*= ( Vector< 4, T > &  lhs,
scale 
)
related

Uniformly scale components in place.

<4,T>

◆ operator*=() [3/7]

template<int N, class T>
Vector< FE_VDIM, F32 > & operator*= ( Vector< FE_VDIM, F32 > &  lhs,
const Vector< FE_VDIM, F32 > &  rhs 
)
related

Independently scale components in place.

<4,F32>

◆ operator*=() [4/7]

template<typename T >
Vector< FE_VDIM, F32 > & operator*= ( Vector< FE_VDIM, F32 > &  lhs,
rhs 
)
related

Uniformly scale components in place.

<4,F32>

◆ operator*=() [5/7]

template<int N, class T >
Vector< N, T > & operator*= ( Vector< N, T > &  lhs,
const Vector< N, T > &  rhs 
)
related

In place piecewise multiply operator.

◆ operator*=() [6/7]

template<int M, int N, class T >
Vector< N, T > & operator*= ( Vector< N, T > &  lhs,
const Vector< M, T > &  rhs 
)
related

In place piecewise multiply operator.

◆ operator*=() [7/7]

template<int N, class T , class U >
Vector< N, T > & operator*= ( Vector< N, T > &  lhs,
scale 
)
related

In place piecewise scale operator.

◆ operator+() [1/4]

template<typename T >
Vector< 4, T > operator+ ( const Vector< 4, T > &  lhs,
const Vector< 4, T > &  rhs 
)
related

Return sum of Vectors.

<4,T>

◆ operator+() [2/4]

template<int N, class T>
Vector< FE_VDIM, F32 > operator+ ( const Vector< FE_VDIM, F32 > &  lhs,
const Vector< FE_VDIM, F32 > &  rhs 
)
related

Return sum of Vectors.

<4,F32>

◆ operator+() [3/4]

template<int N, class T >
Vector< N, T > operator+ ( const Vector< N, T > &  lhs,
const Vector< N, T > &  rhs 
)
related

add operation

◆ operator+() [4/4]

template<int N, int M, class T >
Vector< N, T > operator+ ( const Vector< N, T > &  lhs,
const Vector< M, T > &  rhs 
)
related

add operation

◆ operator+=() [1/4]

template<typename T >
Vector< 4, T > & operator+= ( Vector< 4, T > &  lhs,
const Vector< 4, T > &  rhs 
)
related

Add to Vector in place.

<4,T>

◆ operator+=() [2/4]

template<int N, class T>
Vector< FE_VDIM, F32 > & operator+= ( Vector< FE_VDIM, F32 > &  lhs,
const Vector< FE_VDIM, F32 > &  rhs 
)
related

Add to Vector in place.

<4,F32>

◆ operator+=() [3/4]

template<int N, class T >
Vector< N, T > & operator+= ( Vector< N, T > &  lhs,
const Vector< N, T > &  rhs 
)
related

In place add operator.

◆ operator+=() [4/4]

template<int M, int N, class T >
Vector< N, T > & operator+= ( Vector< N, T > &  lhs,
const Vector< M, T > &  rhs 
)
related

In place add operator.

◆ operator-() [1/7]

template<typename T >
Vector< 4, T > operator- ( const Vector< 4, T > &  rhs)
related

Negate the Vector.

<4,T>

◆ operator-() [2/7]

template<typename T >
Vector< 4, T > operator- ( const Vector< 4, T > &  lhs,
const Vector< 4, T > &  rhs 
)
related

Return difference of Vectors.

<4,T>

◆ operator-() [3/7]

template<int N, class T>
Vector< FE_VDIM, F32 > operator- ( const Vector< FE_VDIM, F32 > &  rhs)
related

Negate the Vector.

<4,F32>

◆ operator-() [4/7]

template<int N, class T>
Vector< FE_VDIM, F32 > operator- ( const Vector< FE_VDIM, F32 > &  lhs,
const Vector< FE_VDIM, F32 > &  rhs 
)
related

Return difference of Vectors.

<4,F32>

◆ operator-() [5/7]

template<int N, class T >
Vector< N, T > operator- ( const Vector< N, T > &  rhs)
related

Negate operation.

◆ operator-() [6/7]

template<int N, class T >
Vector< N, T > operator- ( const Vector< N, T > &  lhs,
const Vector< N, T > &  rhs 
)
related

subtract operation

◆ operator-() [7/7]

template<int N, int M, class T >
Vector< N, T > operator- ( const Vector< N, T > &  lhs,
const Vector< M, T > &  rhs 
)
related

subtract operation

◆ operator-=() [1/4]

template<typename T >
Vector< 4, T > & operator-= ( Vector< 4, T > &  lhs,
const Vector< 4, T > &  rhs 
)
related

Subtract from Vector in place.

<4,T>

◆ operator-=() [2/4]

template<int N, class T>
Vector< FE_VDIM, F32 > & operator-= ( Vector< FE_VDIM, F32 > &  lhs,
const Vector< FE_VDIM, F32 > &  rhs 
)
related

Subtract from Vector in place.

<4,F32>

◆ operator-=() [3/4]

template<int N, class T >
Vector< N, T > & operator-= ( Vector< N, T > &  lhs,
const Vector< N, T > &  rhs 
)
related

In place subtract operator.

◆ operator-=() [4/4]

template<int M, int N, class T >
Vector< N, T > & operator-= ( Vector< N, T > &  lhs,
const Vector< M, T > &  rhs 
)
related

In place subtract operator.

◆ operator/()

template<int N, class T , class U >
Vector< N, T > operator/ ( const Vector< N, T > &  lhs,
const U &  rhs 
)
related

Inverse Scale operation.

◆ operator==()

template<int N, class T >
bool operator== ( const Vector< N, T > &  lhs,
const Vector< N, T > &  rhs 
)
related

equality test

◆ print() [1/3]

template<int N, class T>
String print ( const Vector< FE_VDIM, F32 > &  rhs)
related

Return text describing the Vector's state.

<4,F32>

◆ print() [2/3]

template<typename T >
String print ( const Vector< 4, T > &  vector)
related

Return text describing the Vector's state.

<4,T>

◆ print() [3/3]

template<int N, class T >
String print ( const Vector< N, T > &  vec)
related

Print to a string.

Referenced by fe::Vector< 4, t_moa_real >::print().

◆ scaleAndAdd()

template<int N, class T , class U >
Vector< N, T > & scaleAndAdd ( Vector< N, T > &  lhs,
scalar,
const Vector< N, T > &  rhs 
)
related

Scale then add.

lhs = lhs * scalar + rhs

Referenced by fe::Vector< 4, t_moa_real >::cross3().

◆ set() [1/11]

template<typename T >
Vector< 4, T > & set ( Vector< 4, T > &  r)
related

Set components.

<4,T>

◆ set() [2/11]

template<typename T , typename U >
Vector< 4, T > & set ( Vector< 4, T > &  r,
x 
)
related

Set components.

<4,T>

◆ set() [3/11]

template<typename T , typename U , typename V >
Vector< 4, T > & set ( Vector< 4, T > &  r,
x,
y 
)
related

Set components.

<4,T>

◆ set() [4/11]

template<typename T , typename U , typename V , typename W >
Vector< 4, T > & set ( Vector< 4, T > &  r,
x,
y,
z 
)
related

Set components.

<4,T>

◆ set() [5/11]

template<typename T , typename U , typename V , typename W , typename X >
Vector< 4, T > & set ( Vector< 4, T > &  r,
x,
y,
z,
w 
)
related

Set components.

<4,T>

◆ set() [6/11]

template<int N, class T>
Vector< FE_VDIM, F32 > & set ( Vector< FE_VDIM, F32 > &  r)
related

Set components.

<4,F32>

◆ set() [7/11]

template<typename T >
Vector< FE_VDIM, F32 > & set ( Vector< FE_VDIM, F32 > &  r,
x 
)
related

Set components.

<4,F32>

◆ set() [8/11]

template<typename T , typename U >
Vector< FE_VDIM, F32 > & set ( Vector< FE_VDIM, F32 > &  r,
x,
y 
)
related

Set components.

<4,F32>

◆ set() [9/11]

template<typename T , typename U , typename V >
Vector< FE_VDIM, F32 > & set ( Vector< FE_VDIM, F32 > &  r,
x,
y,
z 
)
related

Set components.

<4,F32>

◆ set() [10/11]

template<typename T , typename U , typename V , typename W >
Vector< FE_VDIM, F32 > & set ( Vector< FE_VDIM, F32 > &  r,
x,
y,
z,
w 
)
related

Set components.

<4,F32>

◆ set() [11/11]

template<int N, class T >
Vector< N, T > & set ( Vector< N, T > &  lhs)
related

Set all the elements to zero.

◆ setAll() [1/2]

template<typename T >
Vector< FE_VDIM, F32 > & setAll ( Vector< FE_VDIM, F32 > &  lhs,
value 
)
related

Set all components to the same value.

<4,F32>

◆ setAll() [2/2]

template<int N, class T , class U >
Vector< N, T > & setAll ( Vector< N, T > &  lhs,
const U  value 
)
related

Set all the elements to the given value.

◆ setAt() [1/3]

template<typename T , typename U >
Vector< 4, T > & setAt ( Vector< 4, T > &  lhs,
U32  index,
value 
)
related

Set indexed component.

<4,T>

◆ setAt() [2/3]

template<typename T >
Vector< FE_VDIM, F32 > & setAt ( Vector< FE_VDIM, F32 > &  lhs,
U32  index,
value 
)
related

Set indexed component.

<4,F32>

◆ setAt() [3/3]

template<int N, class T , class U >
Vector< N, T > & setAt ( Vector< N, T > &  lhs,
U32  index,
const U  value 
)
related

Set the value at the index.

◆ size() [1/3]

template<typename T >
U32 size ( const Vector< 4, T > &  lhs)
related

Return the number of elements.

<4,T>

◆ size() [2/3]

template<typename T >
U32 size ( const Vector< FE_VDIM, F32 > &  lhs)
related

Return the number of elements.

<4,F32>

◆ size() [3/3]

template<int N, class T >
U32 size ( const Vector< N, T > &  lhs)
related

Return the number of elements.

Referenced by fe::Box< 2, I32 >::print().

◆ transposeMultiply()

template<int M, int N, class T >
Vector< M, T > transposeMultiply ( const Matrix< M, N, T > &  A,
const Vector< N, T > &  x 
)
related

Matrix Vector multiply with the matrix transposed.

◆ unit() [1/3]

template<typename T >
Vector< 4, T > unit ( const Vector< 4, T > &  vector)
related

Return the Vector direction scaled to unit length.

<4,T>

◆ unit() [2/3]

template<int N, class T>
Vector< FE_VDIM, F32 > unit ( const Vector< FE_VDIM, F32 > &  rhs)
related

Return the Vector direction scaled to unit length.

<4,F32>

◆ unit() [3/3]

template<int N, class T >
Vector< N, T > unit ( const Vector< N, T > &  vec)
related

Return vector scaled to unit length.

◆ unitSafe() [1/3]

template<typename T >
Vector< 4, T > unitSafe ( const Vector< 4, T > &  vector)
related

Return the Vector direction scaled to unit length with zero check.

<4,T>

◆ unitSafe() [2/3]

template<int N, class T>
Vector< FE_VDIM, F32 > unitSafe ( const Vector< FE_VDIM, F32 > &  rhs)
related

Return the Vector direction scaled to unit length with zero check.

<4,F32>

◆ unitSafe() [3/3]

template<int N, class T >
Vector< N, T > unitSafe ( const Vector< N, T > &  vec)
related

Return vector scaled to unit length with zero check.


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