MADNESS  0.10.1
Public Member Functions | Public Attributes | Private Member Functions | 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 void destroy (T &) const
 Any special instructions to be executed when a vector is no longer needed. More...
 
virtual Tgaxpy (T &x, const scalar_type &a, const T &y, const scalar_type &b) const =0
 Standard bilinear gaxpy. More...
 
virtual scalar_type inner (const T &, const T &) const =0
 The inner product between two vectors. More...
 
virtual real_type norm (const T &) const =0
 The norm of a vector. More...
 
virtual Tscale (T &, const scalar_type &) const =0
 Scales the vector (in-place) by a constant. More...
 

Public Attributes

Worldworld
 The world. More...
 

Private Member Functions

 AbstractVectorSpace ()
 Bury the default constructor to prevent its use. 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

◆ AbstractVectorSpace() [1/2]

template<typename T , typename real_type , typename scalar_type >
madness::AbstractVectorSpace< T, real_type, scalar_type >::AbstractVectorSpace ( )
private

Bury the default constructor to prevent its use.

◆ AbstractVectorSpace() [2/2]

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.

◆ ~AbstractVectorSpace()

template<typename T , typename real_type , typename scalar_type >
virtual madness::AbstractVectorSpace< T, real_type, scalar_type >::~AbstractVectorSpace ( )
inlinevirtual

Member Function Documentation

◆ destroy()

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().

◆ gaxpy()

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::VectorSpace< T, NDIM >, madness::VectorOfFunctionsSpace< T, VDIM, FDIM >, and madness::FunctionSpace< T, NDIM >.

Referenced by madness::GMRES().

◆ inner()

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

◆ norm()

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

◆ scale()

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::VectorSpace< T, NDIM >, madness::VectorOfFunctionsSpace< T, VDIM, FDIM >, and madness::FunctionSpace< T, NDIM >.

Referenced by madness::GMRES().

Member Data Documentation

◆ world

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: