Warning: this documentation for the development version is under construction.

Seldon::Vector_Base< T, Allocator > Class Template Reference

Base structure for all vectors. More...

#include <Vector.hxx>

Inheritance diagram for Seldon::Vector_Base< T, Allocator >:
Seldon::PETScVector< T, Allocator > Seldon::Vector< T, Collection, Allocator > Seldon::Vector< T, VectFull, Allocator > Seldon::Vector< T, PETScPar, Allocator > Seldon::Vector< T, PETScSeq, Allocator > Seldon::Vector< T, VectSparse, Allocator >

List of all members.

Public Types

typedef Allocator::value_type value_type
typedef Allocator::pointer pointer
typedef Allocator::const_pointer const_pointer
typedef Allocator::reference reference
typedef Allocator::const_reference const_reference

Public Member Functions

 Vector_Base ()
 Default constructor.
 Vector_Base (int i)
 Main constructor.
 Vector_Base (const Vector_Base< T, Allocator > &A)
 Copy constructor.
 ~Vector_Base ()
 Destructor.
int GetM () const
 Returns the number of elements.
int GetLength () const
 Returns the number of elements.
int GetSize () const
 Returns the number of elements stored.
pointer GetData () const
 Returns a pointer to data_ (stored data).
const_pointer GetDataConst () const
 Returns a const pointer to data_ (stored data).
void * GetDataVoid () const
 Returns a pointer of type "void*" to the data array (data_).
const void * GetDataConstVoid () const
 Returns a pointer of type "const void*" to the data array (data_).

Protected Attributes

int m_
pointer data_

Static Protected Attributes

static Allocator vect_allocator_

Detailed Description

template<class T, class Allocator = SELDON_DEFAULT_ALLOCATOR<T>>
class Seldon::Vector_Base< T, Allocator >

Base structure for all vectors.

It stores data and the vector size. It defines basic methods as well.

Definition at line 38 of file Vector.hxx.


Constructor & Destructor Documentation

template<class T , class Allocator >
Seldon::Vector_Base< T, Allocator >::Vector_Base (  )  [inline]

Default constructor.

Nothing is allocated. Vector length is set to zero.

Definition at line 44 of file Vector.cxx.

template<class T , class Allocator >
Seldon::Vector_Base< T, Allocator >::Vector_Base ( int  i  )  [inline, explicit]

Main constructor.

Parameters:
i length.
Warning:
Nothing is allocated.

Definition at line 57 of file Vector.cxx.

template<class T, class Allocator>
Seldon::Vector_Base< T, Allocator >::Vector_Base ( const Vector_Base< T, Allocator > &  A  )  [inline]

Copy constructor.

Parameters:
A base vector to be copied.
Warning:
Only the length is copied.

Definition at line 71 of file Vector.cxx.


Member Function Documentation

template<class T , class Allocator >
Vector_Base< T, Allocator >::pointer Seldon::Vector_Base< T, Allocator >::GetData (  )  const

Returns a pointer to data_ (stored data).

Returns:
A pointer to the data_, i.e. the data array.

Definition at line 156 of file Vector.cxx.

template<class T , class Allocator >
Vector_Base< T, Allocator >::const_pointer Seldon::Vector_Base< T, Allocator >::GetDataConst (  )  const

Returns a const pointer to data_ (stored data).

Returns:
A const pointer to the data_, i.e. the data array.

Definition at line 168 of file Vector.cxx.

template<class T , class Allocator >
const void * Seldon::Vector_Base< T, Allocator >::GetDataConstVoid (  )  const

Returns a pointer of type "const void*" to the data array (data_).

Returns:
A pointer of type "const void*" to the data array.

Definition at line 191 of file Vector.cxx.

template<class T , class Allocator >
void * Seldon::Vector_Base< T, Allocator >::GetDataVoid (  )  const

Returns a pointer of type "void*" to the data array (data_).

Returns:
A pointer of type "void*" to the data array.

Definition at line 180 of file Vector.cxx.

template<class T , class Allocator >
int Seldon::Vector_Base< T, Allocator >::GetLength (  )  const

Returns the number of elements.

Returns:
The length of the vector.

Reimplemented in Seldon::Vector< FloatDouble, DenseSparseCollection, Allocator< T > >, and Seldon::Vector< T, Collection, Allocator >.

Definition at line 133 of file Vector.cxx.

template<class T , class Allocator >
int Seldon::Vector_Base< T, Allocator >::GetM (  )  const

Returns the number of elements.

Returns:
The length of the vector.

Reimplemented in Seldon::Vector< FloatDouble, DenseSparseCollection, Allocator< T > >, and Seldon::Vector< T, Collection, Allocator >.

Definition at line 122 of file Vector.cxx.

template<class T , class Allocator >
int Seldon::Vector_Base< T, Allocator >::GetSize (  )  const

Returns the number of elements stored.

Returns:
The length of the vector stored.

Definition at line 144 of file Vector.cxx.


The documentation for this class was generated from the following files:
  • /home/vivien/public_html/.src_seldon/vector/Vector.hxx
  • /home/vivien/public_html/.src_seldon/vector/Vector.cxx