RVL::StdSpace< Scalar, DataType > Class Template Reference

Standard modular RVL space class. More...

#include <space.hh>

Inheritance diagram for RVL::StdSpace< Scalar, DataType >:

RVL::Space< Scalar > RVL::Writeable List of all members.

Public Member Functions

 StdSpace ()
 StdSpace (const StdSpace< Scalar, DataType > &sp)
virtual ~StdSpace ()
virtual DataContainerFactory
const & 
getDCF () const =0
 access to DataContainerFactory
virtual LinearAlgebraPackage<
Scalar > const & 
getLAP () const =0
 access to LinearAlgebraPackage
DataContainerbuildDataContainer () const
bool operator== (const Space< Scalar > &sp) const
 comparison: first check for identity of addresses.
bool isCompatible (DataContainer const &dc) const
Scalar inner (DataContainer const &x, DataContainer const &y) const
void zero (DataContainer &x) const
void linComb (Scalar a, DataContainer const &x, Scalar b, DataContainer &y) const
ostream & write (ostream &str) const

Detailed Description

template<class Scalar, class DataType = Scalar>
class RVL::StdSpace< Scalar, DataType >

Standard modular RVL space class.

This construction implements Space by pairing a DataContainerFactory (access to vectors) and a LinearAlgebraPackage (access to ops), both defined abstractly through methods returning appropriate references. All other methods (expressing vector space behaviour) implemented in this base class.

A typical implementation will provide a LinAlgPack and a DataContainerFactory, either as arguments to the constructor or through some internal construction mechanism, and return references to these. Thus only two methods need be implemented.

We could provide a concrete subclass which takes the LAP and DCF as constructor args. However this class would hardly ever be used, as LAPs and DCFs are not natural data in most apps.

Note that the LinearAlgebraPackage needs a separate template parameter for the DataType in the LDCs. In most cases, this is the same as the Scalar type.

Definition at line 276 of file space.hh.


Constructor & Destructor Documentation

template<class Scalar, class DataType = Scalar>
RVL::StdSpace< Scalar, DataType >::StdSpace (  ) 

Definition at line 280 of file space.hh.

template<class Scalar, class DataType = Scalar>
RVL::StdSpace< Scalar, DataType >::StdSpace ( const StdSpace< Scalar, DataType > &  sp  ) 

Definition at line 281 of file space.hh.

template<class Scalar, class DataType = Scalar>
virtual RVL::StdSpace< Scalar, DataType >::~StdSpace (  )  [virtual]

Definition at line 282 of file space.hh.


Member Function Documentation

template<class Scalar, class DataType = Scalar>
virtual DataContainerFactory const& RVL::StdSpace< Scalar, DataType >::getDCF (  )  const [pure virtual]

access to DataContainerFactory

Referenced by RVL::StdSpace< Scalar, DataType >::buildDataContainer(), RVL::StdSpace< Scalar, DataType >::isCompatible(), RVL::StdSpace< Scalar, DataType >::operator==(), and RVL::StdSpace< Scalar, DataType >::write().

template<class Scalar, class DataType = Scalar>
virtual LinearAlgebraPackage<Scalar> const& RVL::StdSpace< Scalar, DataType >::getLAP (  )  const [pure virtual]

access to LinearAlgebraPackage

Referenced by RVL::StdSpace< Scalar, DataType >::inner(), RVL::StdSpace< Scalar, DataType >::linComb(), RVL::StdSpace< Scalar, DataType >::operator==(), RVL::StdSpace< Scalar, DataType >::write(), and RVL::StdSpace< Scalar, DataType >::zero().

template<class Scalar, class DataType = Scalar>
DataContainer* RVL::StdSpace< Scalar, DataType >::buildDataContainer (  )  const [virtual]

Implements RVL::Space< Scalar >.

Definition at line 291 of file space.hh.

References RVL::Factory< T >::build(), and RVL::StdSpace< Scalar, DataType >::getDCF().

template<class Scalar, class DataType = Scalar>
bool RVL::StdSpace< Scalar, DataType >::operator== ( const Space< Scalar > &  sp  )  const [virtual]

comparison: first check for identity of addresses.

If these are equal, a very low-cost comparison has succeeded. Otherwise, delegate the decision to the comparison methods of the DC factory and LA package.

Implements RVL::Space< Scalar >.

Definition at line 297 of file space.hh.

References RVL::StdSpace< Scalar, DataType >::getDCF(), and RVL::StdSpace< Scalar, DataType >::getLAP().

template<class Scalar, class DataType = Scalar>
bool RVL::StdSpace< Scalar, DataType >::isCompatible ( DataContainer const &  dc  )  const [virtual]

Implements RVL::Space< Scalar >.

Definition at line 311 of file space.hh.

References RVL::StdSpace< Scalar, DataType >::getDCF(), and RVL::DataContainerFactory::isCompatible().

template<class Scalar, class DataType = Scalar>
Scalar RVL::StdSpace< Scalar, DataType >::inner ( DataContainer const &  x,
DataContainer const &  y 
) const [virtual]

Implements RVL::Space< Scalar >.

Definition at line 316 of file space.hh.

References RVL::DataContainer::eval(), and RVL::StdSpace< Scalar, DataType >::getLAP().

template<class Scalar, class DataType = Scalar>
void RVL::StdSpace< Scalar, DataType >::zero ( DataContainer x  )  const [virtual]

Implements RVL::Space< Scalar >.

Definition at line 332 of file space.hh.

References RVL::DataContainer::eval(), and RVL::StdSpace< Scalar, DataType >::getLAP().

template<class Scalar, class DataType = Scalar>
void RVL::StdSpace< Scalar, DataType >::linComb ( Scalar  a,
DataContainer const &  x,
Scalar  b,
DataContainer y 
) const [virtual]

Implements RVL::Space< Scalar >.

Definition at line 344 of file space.hh.

References RVL::DataContainer::eval(), and RVL::StdSpace< Scalar, DataType >::getLAP().

template<class Scalar, class DataType = Scalar>
ostream& RVL::StdSpace< Scalar, DataType >::write ( ostream &  str  )  const [virtual]

Implements RVL::Writeable.

Definition at line 358 of file space.hh.

References RVL::StdSpace< Scalar, DataType >::getDCF(), RVL::StdSpace< Scalar, DataType >::getLAP(), and RVL::Writeable::write().


The documentation for this class was generated from the following file:
Generated on 5 Jan 2017 for RVL by  doxygen 1.4.7