Free Electron
Public Member Functions | Private Member Functions | Private Attributes | Related Functions | List of all members
fe::ext::DenseVector< T > Class Template Reference

Dense vector - size fixed at construction or reset. More...

#include <DenseVector.h>

Inheritance diagram for fe::ext::DenseVector< T >:
Inheritance graph
[legend]

Public Member Functions

 DenseVector (U32 size=0)
 
 DenseVector (const DenseVector< T > &other)
 
void reset (U32 size)
 
void clear (void)
 
T & operator[] (U32 index)
 
operator[] (U32 index) const
 
U32 size (void) const
 
DenseVector< T > & operator= (const DenseVector< T > &other)
 
template<>
void clear (void)
 
template<>
void clear (void)
 

Private Member Functions

void initialize (U32 size)
 

Private Attributes

U32 m_size
 
T * m_pData
 

Related Functions

(Note that these are not member functions.)

template<class T >
DenseVector< T > & set (DenseVector< T > &lhs)
 Set all the elements to zero. More...
 
template<class T >
DenseVector< T > & setAll (DenseVector< T > &lhs, const T value)
 Set all the elements to the given value. More...
 
template<class T >
DenseVector< T > & setAt (DenseVector< T > &lhs, U32 index, const T value)
 Set the value at the index. More...
 
template<class T , class U >
DenseVector< T > & addScaled (DenseVector< T > &lhs, U scalar, const DenseVector< T > &rhs)
 Add with scaling. More...
 
template<class T , class U >
DenseVector< T > & scaleAndAdd (DenseVector< T > &lhs, U scalar, const DenseVector< T > &rhs)
 Scale then add. More...
 
template<class T >
DenseVector< T > & operator+= (DenseVector< T > &lhs, const DenseVector< T > &rhs)
 In place add operator. More...
 
template<class T >
DenseVector< T > & operator-= (DenseVector< T > &lhs, const DenseVector< T > &rhs)
 In place subtract operator. More...
 
template<class T >
DenseVector< T > operator- (const DenseVector< T > &rhs)
 Negate operation. More...
 
template<class T >
DenseVector< T > & operator*= (DenseVector< T > &lhs, const DenseVector< T > &rhs)
 In place piecewise multiply operator. More...
 
template<class T , class U >
DenseVector< T > & operator*= (DenseVector< T > &lhs, U scale)
 In place piecewise scale operator. More...
 
template<class T >
dot (const DenseVector< T > &lhs, const DenseVector< T > &rhs)
 Dot (inner) product. More...
 
template<class T >
magnitude (const DenseVector< T > &rhs)
 Frobenius norm operation. More...
 
template<class T >
magnitudeSquared (const DenseVector< T > &rhs)
 Square of the length. More...
 
template<class T >
DenseVector< T > normal (const DenseVector< T > &rhs)
 Return normal. More...
 
template<class T >
DenseVector< T > & normalize (DenseVector< T > &lhs)
 In place normalize operator. More...
 
template<class T >
DenseVector< T > operator+ (const DenseVector< T > &lhs, const DenseVector< T > &rhs)
 add operation More...
 
template<class T >
DenseVector< T > operator- (const DenseVector< T > &lhs, const DenseVector< T > &rhs)
 subtractoperation More...
 
template<class T >
bool operator== (const DenseVector< T > &lhs, const DenseVector< T > &rhs)
 equality test More...
 
template<class T >
bool equivalent (const DenseVector< T > &lhs, const DenseVector< T > &rhs, T margin)
 Equivalence test within the given tolerance margin. More...
 
template<class T >
DenseVector< T > operator* (const DenseVector< T > &lhs, const DenseVector< T > &rhs)
 Piecewise multiply operation. More...
 
template<class T , class U >
DenseVector< T > operator* (const U lhs, const DenseVector< T > &rhs)
 Scale operation. More...
 
template<class T , class U >
DenseVector< T > operator* (const DenseVector< T > &lhs, const U rhs)
 Scale operation. More...
 
template<class T , class U >
DenseVector< T > operator/ (const DenseVector< T > &lhs, const U rhs)
 Inverse Scale operation. More...
 
template<class T >
U32 size (const DenseVector< T > &lhs)
 Return number of elements. More...
 
template<class T >
DenseVector< T > & componentMultiply (DenseVector< T > &result, const DenseVector< T > &lhs, const DenseVector< T > &rhs)
 Multiply each pair of components. More...
 

Detailed Description

template<class T>
class fe::ext::DenseVector< T >

Dense vector - size fixed at construction or reset.

Friends And Related Function Documentation

◆ addScaled()

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

Add with scaling.

lhs = lhs + rhs * scalar

◆ componentMultiply()

template<class T >
DenseVector< T > & componentMultiply ( DenseVector< T > &  result,
const DenseVector< T > &  lhs,
const DenseVector< T > &  rhs 
)
related

Multiply each pair of components.

◆ dot()

template<class T >
T dot ( const DenseVector< T > &  lhs,
const DenseVector< T > &  rhs 
)
related

Dot (inner) product.

◆ equivalent()

template<class T >
bool equivalent ( const DenseVector< T > &  lhs,
const DenseVector< T > &  rhs,
margin 
)
related

Equivalence test within the given tolerance margin.

◆ magnitude()

template<class T >
T magnitude ( const DenseVector< T > &  rhs)
related

◆ magnitudeSquared()

template<class T >
T magnitudeSquared ( const DenseVector< T > &  rhs)
related

Square of the length.

◆ normal()

template<class T >
DenseVector< T > normal ( const DenseVector< T > &  rhs)
related

Return normal.

◆ normalize()

template<class T >
DenseVector< T > & normalize ( DenseVector< T > &  lhs)
related

In place normalize operator.

◆ operator*() [1/3]

template<class T >
DenseVector< T > operator* ( const DenseVector< T > &  lhs,
const DenseVector< T > &  rhs 
)
related

Piecewise multiply operation.

◆ operator*() [2/3]

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

Scale operation.

◆ operator*() [3/3]

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

Scale operation.

◆ operator*=() [1/2]

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

In place piecewise multiply operator.

◆ operator*=() [2/2]

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

In place piecewise scale operator.

◆ operator+()

template<class T >
DenseVector< T > operator+ ( const DenseVector< T > &  lhs,
const DenseVector< T > &  rhs 
)
related

add operation

◆ operator+=()

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

In place add operator.

◆ operator-() [1/2]

template<class T >
DenseVector< T > operator- ( const DenseVector< T > &  rhs)
related

Negate operation.

◆ operator-() [2/2]

template<class T >
DenseVector< T > operator- ( const DenseVector< T > &  lhs,
const DenseVector< T > &  rhs 
)
related

subtractoperation

◆ operator-=()

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

In place subtract operator.

◆ operator/()

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

Inverse Scale operation.

◆ operator==()

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

equality test

◆ scaleAndAdd()

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

Scale then add.

lhs = lhs * scalar + rhs

◆ set()

template<class T >
DenseVector< T > & set ( DenseVector< T > &  lhs)
related

Set all the elements to zero.

◆ setAll()

template<class T >
DenseVector< T > & setAll ( DenseVector< T > &  lhs,
const T  value 
)
related

Set all the elements to the given value.

◆ setAt()

template<class T >
DenseVector< T > & setAt ( DenseVector< T > &  lhs,
U32  index,
const T  value 
)
related

Set the value at the index.

◆ size()

template<class T >
U32 size ( const DenseVector< T > &  lhs)
related

Return number of elements.


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