Rosetta 3.3
Public Member Functions | Protected Member Functions
numeric::MathVector< T > Class Template Reference

#include <MathVector.hh>

Collaboration diagram for numeric::MathVector< T >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MathVector ()
 default constructor
 MathVector (const core::Size SIZE, const T &FILL_VALUE=T(0))
 construct from size and possible filler
 MathVector (const core::Size SIZE, const T *DATA)
 construct from length and pointer to data
 MathVector (const MathVector< T > &VECTOR)
 copy constructor
MathVector< T > * clone () const
 Clone function.
 ~MathVector ()
 @ brief destructor
core::Size size () const
 size of vector
const T * begin () const
 pointer to First Element
T * begin ()
 pointer to First Element
const T * end () const
 pointer to end of range
T * end ()
 pointer to end of range
norm () const
 norm = length of vector
square_norm () const
 square norm = square length of vector
sum () const
 sum up all elements
MathVector< T > MakeVector (const T &X)
 construct vector from one element
MathVector< T > MakeVector (const T &X, const T &Y)
 construct vector from two elements
MathVector< T > MakeVector (const T &X, const T &Y, const T &Z)
 construct vector from three elements
T & operator() (const core::Size POS)
 return reference to changeable element ( POS)
const T & operator() (const core::Size POS) const
 return copy of element ( POS)
MathVector< T > & operator= (const MathVector< T > &VECTOR)
 equal operator
MathVector< T > & operator= (const T &VALUE)
 equal operator
MathVector< T > & operator+= (const T &VALUE)
 operator += VALUE
MathVector< T > & operator-= (const T &VALUE)
 operator -= VALUE
MathVector< T > & operator*= (const T &VALUE)
 operator *= VALUE
MathVector< T > & operator/= (const T &VALUE)
 operator /= VALUE
MathVector< T > & operator-= (const MathVector< T > &BASE)
 operator -= BASE
MathVector< T > & operator+= (const MathVector< T > &BASE)
 operator += BASE

Protected Member Functions

bool assert_valid_position (const core::Size POS) const
 check whether position is valid

template<typename T>
class numeric::MathVector< T >


Constructor & Destructor Documentation

template<typename T>
numeric::MathVector< T >::MathVector ( ) [inline]

default constructor

template<typename T>
numeric::MathVector< T >::MathVector ( const core::Size  SIZE,
const T &  FILL_VALUE = T( 0) 
) [inline, explicit]

construct from size and possible filler

Parameters:
SIZEnumber fo elements in Vector
FILL_VALUEassign every element to that value
template<typename T>
numeric::MathVector< T >::MathVector ( const core::Size  SIZE,
const T *  DATA 
) [inline]

construct from length and pointer to data

template<typename T>
numeric::MathVector< T >::MathVector ( const MathVector< T > &  VECTOR) [inline]

copy constructor

Parameters:
VECTORcopy the given Vector
template<typename T>
numeric::MathVector< T >::~MathVector ( ) [inline]

@ brief destructor


Member Function Documentation

template<typename T>
bool numeric::MathVector< T >::assert_valid_position ( const core::Size  POS) const [inline, protected]

check whether position is valid

Referenced by numeric::MathVector< core::Real >::operator()().

template<typename T>
const T* numeric::MathVector< T >::begin ( ) const [inline]
template<typename T>
T* numeric::MathVector< T >::begin ( ) [inline]

pointer to First Element

Returns:
pointer to first element in range containing all elements of Vector
template<typename T>
MathVector< T>* numeric::MathVector< T >::clone ( ) const [inline]

Clone function.

Returns:
pointer to new Vector< T>
template<typename T>
const T* numeric::MathVector< T >::end ( ) const [inline]
template<typename T>
T* numeric::MathVector< T >::end ( ) [inline]

pointer to end of range

Returns:
pointer to address one after last element in Vector
template<typename T>
MathVector< T> numeric::MathVector< T >::MakeVector ( const T &  X) [inline]

construct vector from one element

template<typename T>
MathVector< T> numeric::MathVector< T >::MakeVector ( const T &  X,
const T &  Y 
) [inline]

construct vector from two elements

template<typename T>
MathVector< T> numeric::MathVector< T >::MakeVector ( const T &  X,
const T &  Y,
const T &  Z 
) [inline]

construct vector from three elements

template<typename T>
T numeric::MathVector< T >::norm ( ) const [inline]

norm = length of vector

Returns:
length of vector

Referenced by numeric::proj_angl().

template<typename T>
T& numeric::MathVector< T >::operator() ( const core::Size  POS) [inline]

return reference to changeable element ( POS)

template<typename T>
const T& numeric::MathVector< T >::operator() ( const core::Size  POS) const [inline]

return copy of element ( POS)

template<typename T>
MathVector< T>& numeric::MathVector< T >::operator*= ( const T &  VALUE) [inline]

operator *= VALUE

template<typename T>
MathVector<T>& numeric::MathVector< T >::operator+= ( const T &  VALUE) [inline]

operator += VALUE

template<typename T>
MathVector< T>& numeric::MathVector< T >::operator+= ( const MathVector< T > &  BASE) [inline]

operator += BASE

template<typename T>
MathVector< T>& numeric::MathVector< T >::operator-= ( const T &  VALUE) [inline]

operator -= VALUE

template<typename T>
MathVector< T>& numeric::MathVector< T >::operator-= ( const MathVector< T > &  BASE) [inline]

operator -= BASE

template<typename T>
MathVector< T>& numeric::MathVector< T >::operator/= ( const T &  VALUE) [inline]

operator /= VALUE

template<typename T>
MathVector< T>& numeric::MathVector< T >::operator= ( const MathVector< T > &  VECTOR) [inline]

equal operator

Parameters:
VECTORsource vector
Returns:
reference to this assigned Vector
template<typename T>
MathVector< T>& numeric::MathVector< T >::operator= ( const T &  VALUE) [inline]

equal operator

Parameters:
VALUEall elements are set to that value
Returns:
reference to this assigned Vector
template<typename T>
core::Size numeric::MathVector< T >::size ( ) const [inline]
template<typename T>
T numeric::MathVector< T >::square_norm ( ) const [inline]

square norm = square length of vector

Returns:
square length of vector

Referenced by numeric::MathVector< core::Real >::norm().

template<typename T>
T numeric::MathVector< T >::sum ( ) const [inline]

sum up all elements

Returns:
sum of all elements

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines