namespace ewalena  0.2.15
ewalena is not an acronym
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Attributes
ewalena::VectorBasis< ValueType > Class Template Reference

#include <include/ewalena/lac/vector_basis.h>

List of all members.

Public Member Functions

void make_orthonormal_basis ()
unsigned int n_rows () const
ValueType & operator() (const unsigned int i, const unsigned int j)
const ValueType & operator() (const unsigned int i, const unsigned int j) const
const ValueType * operator* () const
ValueType * operator* ()
void operator+= (const VectorBasis< ValueType > &v)
void operator-= (const VectorBasis< ValueType > &v)
bool operator== (const VectorBasis< ValueType > &v) const
void reinit (const unsigned int m, const unsigned int n, const bool fast=false)
void reinit ()
unsigned int size () const
 VectorBasis ()
 VectorBasis (const unsigned int n_vecs, const unsigned int m, const bool zero=true)
 VectorBasis (const VectorBasis &V)
 ~VectorBasis ()

Private Attributes

unsigned int __n_rows
ValueType * data
unsigned int n_vecs

Detailed Description

template<typename ValueType = double>
class ewalena::VectorBasis< ValueType >

A class that denotes a simple vector basis with no special qualities, ie. no special symmetries, data access, etc. The main purpose of a VectorBasis is to store and perform global operations on an entire (or, potentially a partial) set of vectors that together form a complete basis set.

Access operators are enabled to access individual vectors of the basis, as well as the basis state as a whole in terms of matrix indexing.

Author:
Toby D. Young 2012.

Constructor & Destructor Documentation

template<typename ValueType = double>
ewalena::VectorBasis< ValueType >::VectorBasis ( )

Constructor.

template<typename ValueType = double>
ewalena::VectorBasis< ValueType >::~VectorBasis ( )

Destructor.

template<typename ValueType = double>
ewalena::VectorBasis< ValueType >::VectorBasis ( const unsigned int  n_vecs,
const unsigned int  m,
const bool  zero = true 
) [explicit]

Initialize a square vector basis that has n_vecs vectors, each with $m rows. Vector elements are set to zero by default, unless zero=true, in which case vector elements are left in an unspecified state.

template<typename ValueType = double>
ewalena::VectorBasis< ValueType >::VectorBasis ( const VectorBasis< ValueType > &  V)

Initialize a vector basis with another vector basis V with a memory copy.


Member Function Documentation

template<typename ValueType >
void ewalena::VectorBasis< ValueType >::make_orthonormal_basis ( ) [inline]

Make this vector basis a set of vectors that are unit form and mutually orthogonal (all previous data is overwritten). In a "matrix-view" of the vector basis, this is the identity matrix.

template<typename ValueType >
unsigned int ewalena::VectorBasis< ValueType >::n_rows ( ) const [inline]

Return the number of rows this vector basis has, ie. the number of rows each vector has.

template<typename ValueType >
ValueType & ewalena::VectorBasis< ValueType >::operator() ( const unsigned int  i,
const unsigned int  j 
) [inline]

Read-write access to the jth index of the ith vector of this vector basis.

template<typename ValueType >
const ValueType & ewalena::VectorBasis< ValueType >::operator() ( const unsigned int  i,
const unsigned int  j 
) const [inline]

Read only access to the jth index of the ith vector of this vector basis.

template<typename ValueType = double>
const ValueType* ewalena::VectorBasis< ValueType >::operator* ( ) const [inline]

Read only access operator to the underlying C array structure associated with this vector basis.

template<typename ValueType = double>
ValueType* ewalena::VectorBasis< ValueType >::operator* ( ) [inline]

Read-write access operator to the underlying C array structure associated with this vector basis.

template<typename ValueType >
void ewalena::VectorBasis< ValueType >::operator+= ( const VectorBasis< ValueType > &  v) [inline]

Inline addition operator. Add v to this vector basis.

template<typename ValueType >
void ewalena::VectorBasis< ValueType >::operator-= ( const VectorBasis< ValueType > &  v) [inline]

Inline subtraction operator. Subtract v from this vector basis.

template<typename ValueType >
bool ewalena::VectorBasis< ValueType >::operator== ( const VectorBasis< ValueType > &  v) const [inline]

Equivalence operator. Return true if this vector basis is an identical copy of the vector basis v.

template<typename ValueType = double>
void ewalena::VectorBasis< ValueType >::reinit ( const unsigned int  m,
const unsigned int  n,
const bool  fast = false 
)

Reinitialise this vector basis to size m.

template<typename ValueType = double>
void ewalena::VectorBasis< ValueType >::reinit ( )

Reinitialise the contents of this vector basis to nothing (zero).

template<typename ValueType >
unsigned int ewalena::VectorBasis< ValueType >::size ( ) const [inline]

Return the number of vectors this basis set has. In a "matrix-view", this is the number of columns this vector basis has.


Member Data Documentation

template<typename ValueType = double>
unsigned int ewalena::VectorBasis< ValueType >::__n_rows [private]

Internal reference to the number of rows each vector has in this vector basis.

template<typename ValueType = double>
ValueType* ewalena::VectorBasis< ValueType >::data [private]

Internal object denoting this vector basis data.

template<typename ValueType = double>
unsigned int ewalena::VectorBasis< ValueType >::n_vecs [private]

Internal reference to the number of vectors this vector basis has.


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