ug4
ug::MathVector< N, T > Class Template Reference

a mathematical Vector with N entries. More...

#include <math_vector.h>

Public Types

typedef std::size_t size_type
 
typedef T value_type
 

Public Member Functions

value_typecoord (size_t index)
 
value_type coord (size_t index) const
 
 MathVector ()
 
 MathVector (const MathVector &v)
 
 MathVector (const value_type &val)
 
value_type operator* (const MathVector &v) const
 
MathVectoroperator*= (const value_type &val)
 
MathVectoroperator+= (const MathVector &v)
 
MathVectoroperator+= (const value_type &val)
 
MathVector operator- () const
 
MathVectoroperator-= (const MathVector &v)
 
MathVectoroperator-= (const value_type &val)
 
MathVectoroperator/= (const value_type &val)
 
MathVectoroperator= (const MathVector &v)
 
MathVectoroperator= (const value_type &val)
 
value_typeoperator[] (size_t index)
 
const value_typeoperator[] (size_t index) const
 
void set_coord (std::size_t index, value_type v)
 
std::size_t size () const
 

Static Public Member Functions

template<std::size_t fromN>
static MathVector from (const MathVector< fromN, T > &v)
 

Static Public Attributes

static const std::size_t Size = N
 

Protected Member Functions

void assign (const MathVector< N > &v)
 

Protected Attributes

value_type m_data [N]
 

Detailed Description

template<std::size_t N, typename T>
class ug::MathVector< N, T >

a mathematical Vector with N entries.

A mathematical Vector with N entries and static storage

Member Typedef Documentation

◆ size_type

template<std::size_t N, typename T >
typedef std::size_t ug::MathVector< N, T >::size_type

◆ value_type

template<std::size_t N, typename T >
typedef T ug::MathVector< N, T >::value_type

Constructor & Destructor Documentation

◆ MathVector() [1/3]

◆ MathVector() [2/3]

template<std::size_t N, typename T >
ug::MathVector< N, T >::MathVector ( const value_type val)
inline

◆ MathVector() [3/3]

template<std::size_t N, typename T >
ug::MathVector< N, T >::MathVector ( const MathVector< N, T > &  v)
inline

Member Function Documentation

◆ assign()

◆ coord() [1/2]

◆ coord() [2/2]

template<std::size_t N, typename T >
value_type ug::MathVector< N, T >::coord ( size_t  index) const
inline

◆ from()

template<std::size_t N, typename T >
template<std::size_t fromN>
static MathVector ug::MathVector< N, T >::from ( const MathVector< fromN, T > &  v)
inlinestatic

◆ operator*()

template<std::size_t N, typename T >
value_type ug::MathVector< N, T >::operator* ( const MathVector< N, T > &  v) const
inline

◆ operator*=()

template<std::size_t N, typename T >
MathVector& ug::MathVector< N, T >::operator*= ( const value_type val)
inline

◆ operator+=() [1/2]

template<std::size_t N, typename T >
MathVector& ug::MathVector< N, T >::operator+= ( const MathVector< N, T > &  v)
inline

◆ operator+=() [2/2]

template<std::size_t N, typename T >
MathVector& ug::MathVector< N, T >::operator+= ( const value_type val)
inline

◆ operator-()

template<std::size_t N, typename T >
MathVector ug::MathVector< N, T >::operator- ( ) const
inline

◆ operator-=() [1/2]

template<std::size_t N, typename T >
MathVector& ug::MathVector< N, T >::operator-= ( const MathVector< N, T > &  v)
inline

◆ operator-=() [2/2]

template<std::size_t N, typename T >
MathVector& ug::MathVector< N, T >::operator-= ( const value_type val)
inline

◆ operator/=()

template<std::size_t N, typename T >
MathVector& ug::MathVector< N, T >::operator/= ( const value_type val)
inline

◆ operator=() [1/2]

template<std::size_t N, typename T >
MathVector& ug::MathVector< N, T >::operator= ( const MathVector< N, T > &  v)
inline

◆ operator=() [2/2]

template<std::size_t N, typename T >
MathVector& ug::MathVector< N, T >::operator= ( const value_type val)
inline

◆ operator[]() [1/2]

template<std::size_t N, typename T >
value_type& ug::MathVector< N, T >::operator[] ( size_t  index)
inline

◆ operator[]() [2/2]

template<std::size_t N, typename T >
const value_type& ug::MathVector< N, T >::operator[] ( size_t  index) const
inline

◆ set_coord()

template<std::size_t N, typename T >
void ug::MathVector< N, T >::set_coord ( std::size_t  index,
value_type  v 
)
inline

◆ size()

Member Data Documentation

◆ m_data

template<std::size_t N, typename T >
value_type ug::MathVector< N, T >::m_data[N]
protected

Referenced by ug::MathVector< 0, T >::assign(), ug::MathVector< 1, T >::assign(), ug::MathVector< 2, T >::assign(), ug::MathVector< 3, T >::assign(), ug::MathVector< 4, T >::assign(), ug::MathVector< N, T >::assign(), ug::MathVector< N, T >::coord(), ug::MathVector< 0, T >::coord(), ug::MathVector< 1, T >::coord(), ug::MathVector< 2, T >::coord(), ug::MathVector< 3, T >::coord(), ug::MathVector< 4, T >::coord(), ug::Deserialize(), ug::MathVector< N, T >::MathVector(), ug::MathVector< 1, T >::MathVector(), ug::MathVector< 2, T >::MathVector(), ug::MathVector< 3, T >::MathVector(), ug::MathVector< 4, T >::MathVector(), ug::MathVector< 0, T >::MathVector(), ug::MathVector< N, T >::operator*(), ug::MathVector< 0, T >::operator*(), ug::MathVector< 1, T >::operator*(), ug::MathVector< 2, T >::operator*(), ug::MathVector< 3, T >::operator*(), ug::MathVector< 4, T >::operator*(), ug::MathVector< N, T >::operator*=(), ug::MathVector< 0, T >::operator*=(), ug::MathVector< 1, T >::operator*=(), ug::MathVector< 2, T >::operator*=(), ug::MathVector< 3, T >::operator*=(), ug::MathVector< 4, T >::operator*=(), ug::MathVector< N, T >::operator+=(), ug::MathVector< 0, T >::operator+=(), ug::MathVector< 1, T >::operator+=(), ug::MathVector< 2, T >::operator+=(), ug::MathVector< 3, T >::operator+=(), ug::MathVector< 4, T >::operator+=(), ug::MathVector< 0, T >::operator-(), ug::MathVector< N, T >::operator-(), ug::MathVector< 1, T >::operator-(), ug::MathVector< 2, T >::operator-(), ug::MathVector< 3, T >::operator-(), ug::MathVector< 4, T >::operator-(), ug::MathVector< N, T >::operator-=(), ug::MathVector< 0, T >::operator-=(), ug::MathVector< 1, T >::operator-=(), ug::MathVector< 2, T >::operator-=(), ug::MathVector< 3, T >::operator-=(), ug::MathVector< 4, T >::operator-=(), ug::MathVector< N, T >::operator/=(), ug::MathVector< 0, T >::operator/=(), ug::MathVector< 1, T >::operator/=(), ug::MathVector< 2, T >::operator/=(), ug::MathVector< 3, T >::operator/=(), ug::MathVector< 4, T >::operator/=(), ug::MathVector< N, T >::operator=(), ug::MathVector< 0, T >::operator=(), ug::MathVector< 1, T >::operator=(), ug::MathVector< 2, T >::operator=(), ug::MathVector< 3, T >::operator=(), ug::MathVector< 4, T >::operator=(), ug::MathVector< N, T >::operator[](), ug::MathVector< 0, T >::operator[](), ug::MathVector< 1, T >::operator[](), ug::MathVector< 2, T >::operator[](), ug::MathVector< 3, T >::operator[](), ug::MathVector< 4, T >::operator[](), ug::Serialize(), ug::MathVector< N, T >::set_coord(), ug::MathVector< 0, T >::set_coord(), ug::MathVector< 1, T >::set_coord(), ug::MathVector< 2, T >::set_coord(), ug::MathVector< 3, T >::set_coord(), ug::MathVector< 4, T >::set_coord(), ug::MathVector< 4, T >::w(), ug::MathVector< 0, T >::x(), ug::MathVector< 1, T >::x(), ug::MathVector< 2, T >::x(), ug::MathVector< 3, T >::x(), ug::MathVector< 4, T >::x(), ug::MathVector< 2, T >::y(), ug::MathVector< 3, T >::y(), ug::MathVector< 4, T >::y(), ug::MathVector< 3, T >::z(), and ug::MathVector< 4, T >::z().

◆ Size

template<std::size_t N, typename T >
const std::size_t ug::MathVector< N, T >::Size = N
static

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