RVL::CartesianPowerSpace< Scalar > Class Template Reference

This space implements the Cartesian power of a space. More...

#include <productspace.hh>

Inheritance diagram for RVL::CartesianPowerSpace< Scalar >:

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

Public Member Functions

 CartesianPowerSpace (size_t _size, const Space< Scalar > &_subspc)
 CartesianPowerSpace (const CartesianPowerSpace< Scalar > &s)
virtual ~CartesianPowerSpace ()
size_t getSize () const
 returns number of components
Space< Scalar > const & operator[] (size_t i) const
 returns ith component space
bool isCompatible (DataContainer const &dc) const
bool operator== (const Space< Scalar > &sp) 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
DataContainerbuildDataContainer () const
 implements virtual DataContainer constructor via StdProductDataContainer class.
ostream & write (ostream &str) const

Protected Member Functions

Space< Scalar > * clone () const

Protected Attributes

size_t size
const Space< Scalar > & subspc

Detailed Description

template<class Scalar>
class RVL::CartesianPowerSpace< Scalar >

This space implements the Cartesian power of a space.

It requires the base space and the power as input, then implements all the Space methods.

This is a child of ProductSpace, since it makes logical sense to be so, and it can be compared to other ProductSpaces. However, the methods have been reimplemented from ProductSpace in order to avoid inefficiency.

Definition at line 339 of file productspace.hh.


Constructor & Destructor Documentation

template<class Scalar>
RVL::CartesianPowerSpace< Scalar >::CartesianPowerSpace ( size_t  _size,
const Space< Scalar > &  _subspc 
)

Definition at line 353 of file productspace.hh.

template<class Scalar>
RVL::CartesianPowerSpace< Scalar >::CartesianPowerSpace ( const CartesianPowerSpace< Scalar > &  s  ) 

Definition at line 356 of file productspace.hh.

template<class Scalar>
virtual RVL::CartesianPowerSpace< Scalar >::~CartesianPowerSpace (  )  [virtual]

Definition at line 359 of file productspace.hh.


Member Function Documentation

template<class Scalar>
Space<Scalar>* RVL::CartesianPowerSpace< Scalar >::clone (  )  const [protected, virtual]

Implements RVL::Space< Scalar >.

Definition at line 350 of file productspace.hh.

template<class Scalar>
size_t RVL::CartesianPowerSpace< Scalar >::getSize (  )  const [virtual]

returns number of components

Implements RVL::ROProduct< T >.

Definition at line 362 of file productspace.hh.

References RVL::CartesianPowerSpace< Scalar >::size.

Referenced by RVL::CartesianPowerSpace< Scalar >::buildDataContainer(), RVL::CartesianPowerSpace< Scalar >::inner(), RVL::CartesianPowerSpace< Scalar >::isCompatible(), RVL::CartesianPowerSpace< Scalar >::linComb(), RVL::CartesianPowerSpace< Scalar >::operator==(), RVL::CartesianPowerSpace< Scalar >::write(), and RVL::CartesianPowerSpace< Scalar >::zero().

template<class Scalar>
Space<Scalar> const& RVL::CartesianPowerSpace< Scalar >::operator[] ( size_t  i  )  const [virtual]

returns ith component space

Implements RVL::ROProduct< T >.

Definition at line 365 of file productspace.hh.

References RVL::CartesianPowerSpace< Scalar >::subspc.

template<class Scalar>
bool RVL::CartesianPowerSpace< Scalar >::isCompatible ( DataContainer const &  dc  )  const [virtual]

Reimplemented from RVL::ProductSpace< Scalar >.

Definition at line 369 of file productspace.hh.

References RVL::CartesianPowerSpace< Scalar >::getSize(), RVL::Product< T >::getSize(), and RVL::CartesianPowerSpace< Scalar >::subspc.

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

Reimplemented from RVL::ProductSpace< Scalar >.

Definition at line 384 of file productspace.hh.

References RVL::ROProduct< T >::getSize(), RVL::CartesianPowerSpace< Scalar >::getSize(), and RVL::CartesianPowerSpace< Scalar >::subspc.

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

Reimplemented from RVL::ProductSpace< Scalar >.

Definition at line 410 of file productspace.hh.

References RVL::CartesianPowerSpace< Scalar >::getSize(), RVL::Product< T >::getSize(), and RVL::CartesianPowerSpace< Scalar >::subspc.

template<class Scalar>
void RVL::CartesianPowerSpace< Scalar >::zero ( DataContainer x  )  const [virtual]

Reimplemented from RVL::ProductSpace< Scalar >.

Definition at line 442 of file productspace.hh.

References RVL::CartesianPowerSpace< Scalar >::getSize(), RVL::Product< T >::getSize(), and RVL::CartesianPowerSpace< Scalar >::subspc.

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

Reimplemented from RVL::ProductSpace< Scalar >.

Definition at line 467 of file productspace.hh.

References RVL::CartesianPowerSpace< Scalar >::getSize(), RVL::Product< T >::getSize(), and RVL::CartesianPowerSpace< Scalar >::subspc.

template<class Scalar>
DataContainer* RVL::CartesianPowerSpace< Scalar >::buildDataContainer (  )  const [virtual]

implements virtual DataContainer constructor via StdProductDataContainer class.

Implements RVL::Space< Scalar >.

Definition at line 497 of file productspace.hh.

References RVL::CartesianPowerSpace< Scalar >::getSize(), RVL::StdProductDataContainer::push(), and RVL::CartesianPowerSpace< Scalar >::subspc.

template<class Scalar>
ostream& RVL::CartesianPowerSpace< Scalar >::write ( ostream &  str  )  const [virtual]

Reimplemented from RVL::ProductSpace< Scalar >.

Definition at line 505 of file productspace.hh.

References RVL::CartesianPowerSpace< Scalar >::getSize(), and RVL::CartesianPowerSpace< Scalar >::subspc.


Member Data Documentation

template<class Scalar>
size_t RVL::CartesianPowerSpace< Scalar >::size [protected]

Definition at line 347 of file productspace.hh.

Referenced by RVL::CartesianPowerSpace< Scalar >::getSize().

template<class Scalar>
const Space<Scalar>& RVL::CartesianPowerSpace< Scalar >::subspc [protected]

Definition at line 348 of file productspace.hh.

Referenced by RVL::CartesianPowerSpace< Scalar >::buildDataContainer(), RVL::CartesianPowerSpace< Scalar >::inner(), RVL::CartesianPowerSpace< Scalar >::isCompatible(), RVL::CartesianPowerSpace< Scalar >::linComb(), RVL::CartesianPowerSpace< Scalar >::operator==(), RVL::CartesianPowerSpace< Scalar >::operator[](), RVL::CartesianPowerSpace< Scalar >::write(), and RVL::CartesianPowerSpace< Scalar >::zero().


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