SEP Solver Library  1.0
 All Classes Namespaces Files Functions Variables Typedefs Macros
Public Member Functions | Public Attributes | List of all members
SEP::MultiSpace Class Reference

#include <Space.h>

Inheritance diagram for SEP::MultiSpace:
SEP::Space SEP::Writeable

Public Member Functions

 MultiSpace ()
 
 MultiSpace (Space *s1, Space *s2)
 
virtual ~MultiSpace ()
 
SpacegetSpace1 () const
 
SpacegetSpace2 () const
 
virtual MultiDataContainerbuildDataContainer () const
 
virtual long long get_n123 ()
 
virtual void zeroElement (dataContainer *x) const
 
virtual void linearCombo (float a, dataContainer *x, float b, dataContainer *y) const
 
virtual double innerProd (dataContainer *x, dataContainer *y) const
 
virtual void addInv (dataContainer *x) const
 
virtual void addInv (dataContainer *x, dataContainer *xNeg) const
 
virtual void scale (float a, dataContainer *x) const
 
virtual void scale (float a, dataContainer *x, dataContainer *ax) const
 
virtual bool isCompatible (Space *otherSpace, bool makeSame=false) const
 
virtual bool isCompatible (dataContainer *otherContainer) const
 
virtual void random (dataContainer *x) const
 
- Public Member Functions inherited from SEP::Space
 Space ()
 
virtual ~Space ()
 
boost::shared_ptr< int > get_key () const
 
virtual void set_key (const boost::shared_ptr< int > &k)
 
virtual bool operator== (const Space &otherSpace) const
 
virtual void print_it ()
 

Public Attributes

Spacesp1
 
Spacesp2
 

Detailed Description

Definition at line 86 of file Space.h.

Constructor & Destructor Documentation

SEP::MultiSpace::MultiSpace ( )
inline

Definition at line 90 of file Space.h.

SEP::MultiSpace::MultiSpace ( Space s1,
Space s2 
)

Create a MultiSpace with pointers to the two input spaces.

Definition at line 119 of file Space.cpp.

virtual SEP::MultiSpace::~MultiSpace ( )
inlinevirtual

Definition at line 92 of file Space.h.

Member Function Documentation

void SEP::MultiSpace::addInv ( dataContainer x) const
virtual

Overwrite x with additive inverse x = -1*x

Implements SEP::Space.

Definition at line 22 of file Space.cpp.

void SEP::MultiSpace::addInv ( dataContainer x,
dataContainer xNeg 
) const
virtual

Write additive inverse of x, -1*x, into xNeg

Implements SEP::Space.

Definition at line 32 of file Space.cpp.

SEP::MultiDataContainer * SEP::MultiSpace::buildDataContainer ( ) const
virtual

Build a data container that is compatible with the multispace by building a multi data container.

Reimplemented from SEP::Space.

Definition at line 110 of file Space.cpp.

long long SEP::MultiSpace::get_n123 ( )
virtual

Return the total dimension of the multi-space assuming no overlap (so n123 is sum of n123 for spaces making up multispace)

Implements SEP::Space.

Definition at line 126 of file Space.cpp.

Space* SEP::MultiSpace::getSpace1 ( ) const
inline

Definition at line 93 of file Space.h.

Space* SEP::MultiSpace::getSpace2 ( ) const
inline

Definition at line 94 of file Space.h.

double SEP::MultiSpace::innerProd ( dataContainer x,
dataContainer y 
) const
virtual

Take the inner product (sum of element wise products) of two data containers compatible with the same space

Implements SEP::Space.

Definition at line 73 of file Space.cpp.

bool SEP::MultiSpace::isCompatible ( SEP::Space otherSpace,
bool  makeSame = false 
) const
virtual

Check whether this space and otherSpace are compatible, either because they are the same space or by a deep check. By default, compatible spaces are not given the same key, but if makeSame = true, the key of otherSpace is set to the key of this space.

Implements SEP::Space.

Definition at line 47 of file Space.cpp.

bool SEP::MultiSpace::isCompatible ( SEP::dataContainer x) const
virtual

Check if a data container, x, is compatible with this space.

Implements SEP::Space.

Definition at line 61 of file Space.cpp.

void SEP::MultiSpace::linearCombo ( float  a,
dataContainer x,
float  b,
dataContainer y 
) const
virtual

Calculate x = a*x + b*y

Implements SEP::Space.

Definition at line 85 of file Space.cpp.

void SEP::MultiSpace::random ( dataContainer x) const
virtual

Fill a data container x with random numbers.

Implements SEP::Space.

Definition at line 134 of file Space.cpp.

void SEP::MultiSpace::scale ( float  a,
dataContainer x 
) const
virtual

Scale x by a and overwrite x with a*x

Implements SEP::Space.

Definition at line 13 of file Space.cpp.

void SEP::MultiSpace::scale ( float  a,
dataContainer x,
dataContainer ax 
) const
virtual

Scale x by a and write it into ax

Implements SEP::Space.

Definition at line 4 of file Space.cpp.

void SEP::MultiSpace::zeroElement ( dataContainer x) const
virtual

Zero out any vector in the MultiSpace by zeroing it out in the two spaces making up the multispace.

Implements SEP::Space.

Definition at line 95 of file Space.cpp.

Member Data Documentation

Space* SEP::MultiSpace::sp1

Definition at line 88 of file Space.h.

Space * SEP::MultiSpace::sp2

Definition at line 88 of file Space.h.


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