MADNESS  version 0.9
Public Member Functions | Public Attributes | List of all members
madness::AbstractVectorSpace< T, real_type, scalar_type > Class Template Referenceabstract

A generic vector space which provides common operations needed by linear algebra routines (norm, inner product, etc.) More...

#include <gmres.h>

Collaboration diagram for madness::AbstractVectorSpace< T, real_type, scalar_type >:
Collaboration graph
[legend]

Public Member Functions

 AbstractVectorSpace (World &world)
 Make a vector space. More...
 
virtual ~AbstractVectorSpace ()
 
virtual real_type norm (const T &) const =0
 The norm of a vector. More...
 
virtual T & scale (T &, const scalar_type &) const =0
 Scales the vector (in-place) by a constant

\[ \vec{x} \leftarrow c \vec{x} \]

. More...

 
virtual T & gaxpy (T &x, const scalar_type &a, const T &y, const scalar_type &b) const =0
 Standard bilinear gaxpy

\[ \vec{x} \leftarrow a \vec{x} + b \vec{y} \]

. More...

 
virtual scalar_type inner (const T &, const T &) const =0
 The inner product between two vectors. More...
 
virtual void destroy (T &) const
 Any special instructions to be executed when a vector is no longer needed. More...
 

Public Attributes

Worldworld
 The world. More...
 

Detailed Description

template<typename T, typename real_type, typename scalar_type>
class madness::AbstractVectorSpace< T, real_type, scalar_type >

A generic vector space which provides common operations needed by linear algebra routines (norm, inner product, etc.)

Most of these routines will presumedly be defined, but the names may not be the same (i.e. madness:Function uses norm2, madness::Tensor uses normf)

When implementing a child class, real_type and scalar_type will probably be obtained from TensorTypeData<T> (see the VectorSpace and FunctionSpace classes below).

Constructor & Destructor Documentation

template<typename T, typename real_type, typename scalar_type>
madness::AbstractVectorSpace< T, real_type, scalar_type >::AbstractVectorSpace ( World world)
inline

Make a vector space.

The World is needed to limit output, and may be needed for spaces working with MADNESS functions.

Parameters
[in]worldThe world.
template<typename T, typename real_type, typename scalar_type>
virtual madness::AbstractVectorSpace< T, real_type, scalar_type >::~AbstractVectorSpace ( )
inlinevirtual

Member Function Documentation

template<typename T, typename real_type, typename scalar_type>
virtual void madness::AbstractVectorSpace< T, real_type, scalar_type >::destroy ( T &  ) const
inlinevirtual

Any special instructions to be executed when a vector is no longer needed.

Unless otherwise specified, do nothing.

Reimplemented in madness::VectorOfFunctionsSpace< T, VDIM, FDIM >, and madness::FunctionSpace< T, NDIM >.

Referenced by madness::GMRES().

template<typename T, typename real_type, typename scalar_type>
virtual T& madness::AbstractVectorSpace< T, real_type, scalar_type >::gaxpy ( T &  x,
const scalar_type &  a,
const T &  y,
const scalar_type &  b 
) const
pure virtual

Standard bilinear gaxpy

\[ \vec{x} \leftarrow a \vec{x} + b \vec{y} \]

.

Returns
The new vector, $\vec{x}$

Implemented in madness::VectorOfFunctionsSpace< T, VDIM, FDIM >, madness::FunctionSpace< T, NDIM >, and madness::VectorSpace< T, NDIM >.

Referenced by madness::GMRES().

template<typename T, typename real_type, typename scalar_type>
virtual scalar_type madness::AbstractVectorSpace< T, real_type, scalar_type >::inner ( const T &  ,
const T &   
) const
pure virtual
template<typename T, typename real_type, typename scalar_type>
virtual real_type madness::AbstractVectorSpace< T, real_type, scalar_type >::norm ( const T &  ) const
pure virtual
template<typename T, typename real_type, typename scalar_type>
virtual T& madness::AbstractVectorSpace< T, real_type, scalar_type >::scale ( T &  ,
const scalar_type &   
) const
pure virtual

Scales the vector (in-place) by a constant

\[ \vec{x} \leftarrow c \vec{x} \]

.

Returns
The scaled vector

Implemented in madness::VectorOfFunctionsSpace< T, VDIM, FDIM >, madness::FunctionSpace< T, NDIM >, and madness::VectorSpace< T, NDIM >.

Referenced by madness::GMRES().

Member Data Documentation

template<typename T, typename real_type, typename scalar_type>
World& madness::AbstractVectorSpace< T, real_type, scalar_type >::world

The world.

Referenced by madness::GMRES().


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