colarray::Vector< T > Class Template Reference

#include <vector.h>

Inheritance diagram for colarray::Vector< T >:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Vector ()
 Vector (int_t n)
 Vector (const Vector &x, int_t start, int_t end)
 Vector (const Vector &a)
 ~Vector ()
const T & operator() (int_t i) const
T & operator() (int_t i)
const T & operator[] (int i) const
T & operator[] (int i)
Vectoroperator= (const Vector &)
operator= (const T v)
void inject (const Vector< T > &x)

Public Attributes

int_t _n
int_t _inc
T * _v

Protected Member Functions

 Vector (T *v, int_t n, int_t inc, T *data, int *refCount)

Protected Attributes

T * _data
int * _refCount

Friends

std::ostream & operator (std::ostream &, const Vector< T > &)

Detailed Description

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

Vector class template
Author:
Roman Geus

Definition at line 39 of file vector.h.


Constructor & Destructor Documentation

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

Default constructor creating an "empty" Vector.

Definition at line 58 of file vector.h.

template<typename T>
colarray::Vector< T >::Vector ( int_t  n  ) 

Creates a Vector of length n.

Definition at line 212 of file vector.h.

References colarray::Vector< T >::_data, colarray::Vector< T >::_inc, colarray::Vector< T >::_n, colarray::Vector< T >::_refCount, and colarray::Vector< T >::_v.

template<typename T>
colarray::Vector< T >::Vector ( const Vector< T > &  x,
int_t  start,
int_t  end 
) [inline]

Creates a new Vector that references a sub-vector of Vector x starting from index start and ending at (but not including) index end.

Definition at line 68 of file vector.h.

template<typename T>
colarray::Vector< T >::Vector ( const Vector< T > &  a  )  [inline]

Copy constructor: creates a vector that shares the data with vector a.

Definition at line 76 of file vector.h.

template<typename T>
colarray::Vector< T >::Vector ( T *  v,
int_t  n,
int_t  inc,
T *  data,
int *  refCount 
) [inline, protected]

Definition at line 83 of file vector.h.

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

Definition at line 223 of file vector.h.

References colarray::Vector< T >::_data, and colarray::Vector< T >::_refCount.


Member Function Documentation

template<typename T>
void colarray::Vector< T >::inject ( const Vector< T > &  x  ) 

Copy the contents of Vector x to "myself".

Definition at line 263 of file vector.h.

References colarray::Vector< T >::_n, and x.

Referenced by mesh::Tet::cartesian_to_simplex(), and NedelecElement::surface_integral_curl().

template<typename T>
T& colarray::Vector< T >::operator() ( int_t  i  )  [inline]

Reimplemented in colarray::ColumnVector< T >.

Definition at line 94 of file vector.h.

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

Reimplemented in colarray::ColumnVector< T >.

Definition at line 92 of file vector.h.

template<typename T>
T colarray::Vector< T >::operator= ( const T  v  ) 

Reimplemented in colarray::ColumnVector< T >, and colarray::RowVector< T >.

Definition at line 234 of file vector.h.

References colarray::Vector< T >::_n.

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

template<typename T>
T& colarray::Vector< T >::operator[] ( int  i  )  [inline]

Reimplemented in colarray::ColumnVector< T >.

Definition at line 98 of file vector.h.

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

Reimplemented in colarray::ColumnVector< T >.

Definition at line 96 of file vector.h.


Friends And Related Function Documentation

template<typename T>
std::ostream& operator ( std::ostream &  ,
const Vector< T > &   
) [friend]

Referenced by postprocess::VtkExport::get_eigenpair().


Member Data Documentation

template<typename T>
T* colarray::Vector< T >::_data [protected]

pointer to data array

Definition at line 49 of file vector.h.

Referenced by colarray::Vector< T >::Vector(), and colarray::Vector< T >::~Vector().

template<typename T>
int_t colarray::Vector< T >::_inc

stride

Definition at line 44 of file vector.h.

Referenced by colarray::Vector< double >::operator()(), colarray::Vector< double >::operator[](), and colarray::Vector< T >::Vector().

template<typename T>
int_t colarray::Vector< T >::_n

number of elements

Definition at line 42 of file vector.h.

Referenced by postprocess::VtkExport::get_eigenpair(), blas::getrf(), colarray::Vector< T >::inject(), colarray::Vector< T >::operator=(), NedelecElement::surface_integral_curl(), and colarray::Vector< T >::Vector().

template<typename T>
int* colarray::Vector< T >::_refCount [protected]

pointer to reference counter. Can be 0, in which case no reference counting is perfomed.

Definition at line 52 of file vector.h.

Referenced by colarray::Vector< T >::Vector(), colarray::Vector< double >::Vector(), and colarray::Vector< T >::~Vector().

template<typename T>
T* colarray::Vector< T >::_v

pointer to 1st vector element

Definition at line 46 of file vector.h.

Referenced by blas::gesv(), blas::getrf(), colarray::Vector< double >::operator()(), colarray::Vector< double >::operator[](), q_factor(), blas::syev(), and colarray::Vector< T >::Vector().


The documentation for this class was generated from the following file:
Generated on Fri Oct 26 13:35:17 2007 for FEMAXX (Finite Element Maxwell Eigensolver) by  doxygen 1.4.7