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

#include <math_vector.h>

Public Types

typedef std::size_t size_type
 
typedef T value_type
 

Public Member Functions

value_typecoord (std::size_t index)
 
value_type coord (std::size_t index) const
 
 MathVector ()
 
 MathVector (const MathVector< 3, T > &v)
 
 MathVector (const value_type &val)
 
 MathVector (value_type x, value_type y, value_type z)
 
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[] (std::size_t index)
 
const value_typeoperator[] (std::size_t index) const
 
void set_coord (std::size_t index, value_type v)
 
std::size_t size () const
 
value_typex ()
 
const value_typex () const
 
value_typey ()
 
const value_typey () const
 
value_typez ()
 
const value_typez () const
 

Static Public Member Functions

static MathVector from (const MathVector< 0, T > &v)
 
static MathVector from (const MathVector< 1, T > &v)
 
static MathVector from (const MathVector< 2, T > &v)
 
static MathVector from (const MathVector< 3, T > &v)
 
static MathVector from (const MathVector< 4, T > &v)
 
template<std::size_t fromN>
static MathVector from (const MathVector< fromN, T > &v)
 

Public Attributes

value_type m_data [3]
 

Static Public Attributes

static const std::size_t Size = 3
 

Protected Member Functions

void assign (const MathVector< 3, T > &v)
 

Detailed Description

template<typename T>
class ug::MathVector< 3, T >

A mathematical Vector with 3 entries and static storage

Member Typedef Documentation

◆ size_type

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

◆ value_type

template<typename T >
typedef T ug::MathVector< 3, T >::value_type

Constructor & Destructor Documentation

◆ MathVector() [1/4]

template<typename T >
ug::MathVector< 3, T >::MathVector ( )
inline

◆ MathVector() [2/4]

template<typename T >
ug::MathVector< 3, T >::MathVector ( const value_type val)
inline

◆ MathVector() [3/4]

template<typename T >
ug::MathVector< 3, T >::MathVector ( value_type  x,
value_type  y,
value_type  z 
)
inline

◆ MathVector() [4/4]

template<typename T >
ug::MathVector< 3, T >::MathVector ( const MathVector< 3, T > &  v)
inline

Member Function Documentation

◆ assign()

template<typename T >
void ug::MathVector< 3, T >::assign ( const MathVector< 3, T > &  v)
inlineprotected

◆ coord() [1/2]

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

◆ coord() [2/2]

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

◆ from() [1/6]

template<typename T >
static MathVector ug::MathVector< 3, T >::from ( const MathVector< 0, T > &  v)
inlinestatic

◆ from() [2/6]

template<typename T >
static MathVector ug::MathVector< 3, T >::from ( const MathVector< 1, T > &  v)
inlinestatic

◆ from() [3/6]

template<typename T >
static MathVector ug::MathVector< 3, T >::from ( const MathVector< 2, T > &  v)
inlinestatic

◆ from() [4/6]

template<typename T >
static MathVector ug::MathVector< 3, T >::from ( const MathVector< 3, T > &  v)
inlinestatic

◆ from() [5/6]

template<typename T >
static MathVector ug::MathVector< 3, T >::from ( const MathVector< 4, T > &  v)
inlinestatic

◆ from() [6/6]

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

◆ operator*()

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

◆ operator*=()

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

◆ operator+=() [1/2]

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

◆ operator+=() [2/2]

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

◆ operator-()

template<typename T >
MathVector ug::MathVector< 3, T >::operator- ( ) const
inline

◆ operator-=() [1/2]

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

◆ operator-=() [2/2]

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

◆ operator/=()

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

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ operator[]() [1/2]

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

◆ operator[]() [2/2]

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

◆ set_coord()

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

◆ size()

template<typename T >
std::size_t ug::MathVector< 3, T >::size ( ) const
inline

◆ x() [1/2]

template<typename T >
value_type& ug::MathVector< 3, T >::x ( )
inline

◆ x() [2/2]

template<typename T >
const value_type& ug::MathVector< 3, T >::x ( ) const
inline

◆ y() [1/2]

template<typename T >
value_type& ug::MathVector< 3, T >::y ( )
inline

◆ y() [2/2]

template<typename T >
const value_type& ug::MathVector< 3, T >::y ( ) const
inline

◆ z() [1/2]

template<typename T >
value_type& ug::MathVector< 3, T >::z ( )
inline

◆ z() [2/2]

template<typename T >
const value_type& ug::MathVector< 3, T >::z ( ) const
inline

Member Data Documentation

◆ m_data

template<typename T >
value_type ug::MathVector< 3, T >::m_data[3]

Referenced by assign().

◆ Size

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

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