Base classe for space definitions. More...
#include <ASpace.hpp>
Base classe for space definitions.
If the space instance is a sub-space from a parent SpaceComposit _offset is used. Otherwise it is set to 0. Example : if I am RN(1) in RN(2)+RN(1), offset is 2
Public Member Functions | |
virtual | ~ASpace () |
String | toString (const AStringFormat *strfmt=nullptr) const final |
Interface for AStringable. | |
virtual ESpaceType | getType () const =0 |
Return the concrete space type. | |
virtual void | setOrigin (const 1 &origin) |
Update the origin of the space. | |
virtual size_t | getNDim (Id ispace=-1) const |
Get the number of dimensions. | |
virtual size_t | getOffset (Id ispace=-1) const |
Get the offset index for coordinates. | |
virtual const & | getOrigin (Id ispace=-1) const |
Return the space origin coordinates. | |
virtual size_t | getNComponents () const |
Get the number of space components. | |
virtual std::shared_ptr< const ASpace > | getComponent (Id ispace=-1) const |
Return the space component at index ispace. | |
virtual String | toString (const AStringFormat *strfmt, Id ispace) const |
Dump a space in a string (given the space index) | |
virtual bool | isEqual (const ASpace *space) const |
Return true if the given space is equal to me (same dimension and space definition) | |
virtual | getDistances (const SpacePoint &p1, const SpacePoint &p2) const |
Return all the distances (one by space component) between two space points. | |
virtual void | getDistancePointVectInPlace (const SpacePoint &p1, const std::vector< SpacePoint > &p2, 1 &res, const 1 &ranks) const |
void | move (SpacePoint &p1, const 1 &vec) const |
Not to be overriden. | |
double | getDistance (const SpacePoint &p1, const SpacePoint &p2, Id ispace=-1) const |
Return the distance between two space points. | |
double | getDistance (const SpacePoint &p1, const SpacePoint &p2, const Tensor &tensor, Id ispace=-1) const |
Return the distance between two space points with the given tensor. | |
double | getFrequentialDistance (const SpacePoint &p1, const SpacePoint &p2, const Tensor &tensor, Id ispace=-1) const |
Return the distance in frequential domain between two space points with the given tensor. | |
getIncrement (const SpacePoint &p1, const SpacePoint &p2, Id ispace=-1) const | |
Return the increment vector between two space points. | |
void | getIncrementInPlace (const SpacePoint &p1, const SpacePoint &p2, 1 &ptemp, Id ispace=-1) const |
getUnitaryVector () const | |
virtual | projCoord (const 1 &coord, Id ispace=-1) const |
Project the coordinates in the given space. | |
void | setOffset (size_t offset) |
Customize the dimension offset index of the current space TODO : to be made private. | |
![]() | |
AStringable () | |
AStringable (const AStringable &r) | |
AStringable & | operator= (const AStringable &r) |
virtual | ~AStringable () |
virtual void | display (const AStringFormat *strfmt=nullptr) const final |
virtual void | display (Id level) const final |
![]() | |
ICloneable () | |
virtual | ~ICloneable () |
virtual ICloneable * | clone () const =0 |
std::shared_ptr< ICloneable > | cloneShared () const |
std::unique_ptr< ICloneable > | cloneUnique () const |
Static Public Member Functions | |
static std::shared_ptr< const ASpace > | getDefaultSpaceIfNull (const std::shared_ptr< const ASpace > &space) |
|
virtual |
|
virtual |
Return the space component at index ispace.
Reimplemented in gstlrn::SpaceComposite.
|
static |
double gstlrn::ASpace::getDistance | ( | const SpacePoint & | p1, |
const SpacePoint & | p2, | ||
const Tensor & | tensor, | ||
Id | ispace = -1 |
||
) | const |
Return the distance between two space points with the given tensor.
TODO : test Tensor dimension
double gstlrn::ASpace::getDistance | ( | const SpacePoint & | p1, |
const SpacePoint & | p2, | ||
Id | ispace = -1 |
||
) | const |
Return the distance between two space points.
|
inlinevirtual |
Reimplemented in gstlrn::SpaceRN.
|
virtual |
Return all the distances (one by space component) between two space points.
Reimplemented in gstlrn::SpaceComposite.
double gstlrn::ASpace::getFrequentialDistance | ( | const SpacePoint & | p1, |
const SpacePoint & | p2, | ||
const Tensor & | tensor, | ||
Id | ispace = -1 |
||
) | const |
Return the distance in frequential domain between two space points with the given tensor.
TODO : test tensor size
gstlrn::ASpace::getIncrement | ( | const SpacePoint & | p1, |
const SpacePoint & | p2, | ||
Id | ispace = -1 |
||
) | const |
Return the increment vector between two space points.
TODO : test tensor size
void gstlrn::ASpace::getIncrementInPlace | ( | const SpacePoint & | p1, |
const SpacePoint & | p2, | ||
1 & | ptemp, | ||
Id | ispace = -1 |
||
) | const |
TODO : test tensor size
|
virtual |
Get the number of space components.
Reimplemented in gstlrn::SpaceComposite.
|
virtual |
Get the number of dimensions.
Reimplemented in gstlrn::SpaceComposite.
|
virtual |
Get the offset index for coordinates.
Reimplemented in gstlrn::SpaceComposite.
|
virtual |
Return the space origin coordinates.
Reimplemented in gstlrn::SpaceComposite.
|
pure virtual |
Return the concrete space type.
Implemented in gstlrn::SpaceComposite, gstlrn::SpaceRN, and gstlrn::SpaceSN.
gstlrn::ASpace::getUnitaryVector | ( | ) | const |
|
virtual |
Return true if the given space is equal to me (same dimension and space definition)
Reimplemented in gstlrn::SpaceComposite, and gstlrn::SpaceSN.
void gstlrn::ASpace::move | ( | SpacePoint & | p1, |
const 1 & | vec | ||
) | const |
Not to be overriden.
Move the given space point by the given vector.
Move the given space point by the given vector
|
virtual |
Project the coordinates in the given space.
TODO : Memory copies !
|
inline |
Customize the dimension offset index of the current space TODO : to be made private.
|
virtual |
Update the origin of the space.
Reimplemented in gstlrn::SpaceComposite.
|
virtual |
Dump a space in a string (given the space index)
Reimplemented in gstlrn::SpaceSN, and gstlrn::SpaceComposite.
|
finalvirtual |
Interface for AStringable.
Reimplemented from gstlrn::AStringable.