Intrepid
Public Member Functions | Private Attributes
Intrepid::Vector< T > Class Template Reference

#include <Intrepid_MiniTensor_Vector.h>

List of all members.

Public Member Functions

 Vector ()
 Vector (Index const N)
 Vector (Index const N, T const &s)
 Vector (T const &s0, T const &s1)
 Vector (T const &s0, T const &s1, T const &s2)
 Vector (Index const N, T const *data_ptr)
 Vector (Vector< T > const &v)
 ~Vector ()
T const & operator() (Index const i) const
T & operator() (Index const i)
Index get_dimension () const
void set_dimension (Index const N)
void fill (T const *data_ptr)
Vector< T > & operator= (Vector< T > const &v)
Vector< T > & operator+= (Vector< T > const &v)
Vector< T > & operator-= (Vector< T > const &v)
void clear ()

Private Attributes

Index dimension
T * e

Detailed Description

template<typename T>
class Intrepid::Vector< T >

Vector in R^N.

Definition at line 59 of file Intrepid_MiniTensor_Vector.h.


Constructor & Destructor Documentation

template<typename T >
Intrepid::Vector< T >::Vector ( ) [inline]

Default constructor

Definition at line 123 of file Intrepid_MiniTensor_Vector.i.h.

template<typename T >
Intrepid::Vector< T >::Vector ( Index const  N) [inline, explicit]

Constructor that initializes to NaNs

Parameters:
Ndimension

Definition at line 135 of file Intrepid_MiniTensor_Vector.i.h.

References Intrepid::Vector< T >::e, and Intrepid::Vector< T >::set_dimension().

template<typename T >
Intrepid::Vector< T >::Vector ( Index const  N,
T const &  s 
) [inline, explicit]

Create vector from a scalar

Parameters:
Ndimension
sall components are set equal to this value

Definition at line 171 of file Intrepid_MiniTensor_Vector.i.h.

References Intrepid::Vector< T >::e, and Intrepid::Vector< T >::set_dimension().

template<typename T >
Intrepid::Vector< T >::Vector ( T const &  s0,
T const &  s1 
) [inline]

Create vector specifying components

Parameters:
s0,s1are the vector components in the R^2 canonical basis

Definition at line 208 of file Intrepid_MiniTensor_Vector.i.h.

References Intrepid::Vector< T >::e, and Intrepid::Vector< T >::set_dimension().

template<typename T >
Intrepid::Vector< T >::Vector ( T const &  s0,
T const &  s1,
T const &  s2 
) [inline]

Create vector specifying components the vector components in the R^3 canonical basis

Parameters:
s0
s1
s2

Definition at line 227 of file Intrepid_MiniTensor_Vector.i.h.

References Intrepid::Vector< T >::e, and Intrepid::Vector< T >::set_dimension().

template<typename T >
Intrepid::Vector< T >::Vector ( Index const  N,
T const *  data_ptr 
) [inline]

Create vector from array - const version

Parameters:
Ndimension
data_ptrpointer into the array

Definition at line 247 of file Intrepid_MiniTensor_Vector.i.h.

References Intrepid::Vector< T >::fill(), and Intrepid::Vector< T >::set_dimension().

template<typename T >
Intrepid::Vector< T >::Vector ( Vector< T > const &  v) [inline]

Copy constructor

Parameters:
vthe values of its components are copied to the new vector

Definition at line 266 of file Intrepid_MiniTensor_Vector.i.h.

References Intrepid::Vector< T >::e, Intrepid::Vector< T >::get_dimension(), and Intrepid::Vector< T >::set_dimension().

template<typename T >
Intrepid::Vector< T >::~Vector ( ) [inline]

Simple destructor

Definition at line 304 of file Intrepid_MiniTensor_Vector.i.h.


Member Function Documentation

template<typename T >
void Intrepid::Vector< T >::clear ( ) [inline]

Fill with zeros

Definition at line 460 of file Intrepid_MiniTensor_Vector.i.h.

template<typename T >
void Intrepid::Vector< T >::fill ( T const *  data_ptr) [inline]

Fill components from array defined by pointer.

Parameters:
data_ptrpointer into array for filling components

Definition at line 87 of file Intrepid_MiniTensor_Vector.i.h.

Referenced by Intrepid::Vector< T >::Vector().

template<typename T >
Index Intrepid::Vector< T >::get_dimension ( ) const [inline]
template<typename T >
T & Intrepid::Vector< T >::operator() ( Index const  i) [inline]

Vector indexing

Parameters:
ithe index

Definition at line 332 of file Intrepid_MiniTensor_Vector.i.h.

template<typename T >
T const & Intrepid::Vector< T >::operator() ( Index const  i) const [inline]

Indexing for constant vector

Parameters:
ithe index

Definition at line 319 of file Intrepid_MiniTensor_Vector.i.h.

template<typename T >
Vector< T > & Intrepid::Vector< T >::operator+= ( Vector< T > const &  v) [inline]

Vector increment

Parameters:
vadded to currrent vector

Definition at line 385 of file Intrepid_MiniTensor_Vector.i.h.

References Intrepid::Vector< T >::e, and Intrepid::Vector< T >::get_dimension().

template<typename T >
Vector< T > & Intrepid::Vector< T >::operator-= ( Vector< T > const &  v) [inline]

Vector decrement

Parameters:
vsubstracted from current vector

Definition at line 423 of file Intrepid_MiniTensor_Vector.i.h.

References Intrepid::Vector< T >::e, and Intrepid::Vector< T >::get_dimension().

template<typename T >
Vector< T > & Intrepid::Vector< T >::operator= ( Vector< T > const &  v) [inline]

Copy assignment

Parameters:
vthe values of its components are copied to this vector

Definition at line 345 of file Intrepid_MiniTensor_Vector.i.h.

References Intrepid::Vector< T >::e, and Intrepid::Vector< T >::get_dimension().

template<typename T >
void Intrepid::Vector< T >::set_dimension ( Index const  N) [inline]
Parameters:
Ndimension of vector

Definition at line 65 of file Intrepid_MiniTensor_Vector.i.h.

Referenced by Intrepid::Vector< T >::Vector().


Member Data Documentation

template<typename T>
Index Intrepid::Vector< T >::dimension [private]

Vector dimension

Definition at line 182 of file Intrepid_MiniTensor_Vector.h.

template<typename T>
T* Intrepid::Vector< T >::e [private]

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