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 | |
ASpace (unsigned int ndim) | |
ASpace (const ASpace &r) | |
ASpace & | operator= (const ASpace &r) |
virtual | ~ASpace () |
String | toString (const AStringFormat *strfmt=nullptr) const final |
Interface for AStringable. More... | |
virtual ESpaceType | getType () const =0 |
Return the concrete space type. More... | |
virtual void | setOrigin (const VectorDouble &origin) |
Update the origin of the space. More... | |
virtual unsigned int | getNDim (int ispace=-1) const |
Get the number of dimensions. More... | |
virtual unsigned int | getOffset (int ispace=-1) const |
Get the offset index for coordinates. More... | |
virtual const VectorDouble & | getOrigin (int ispace=-1) const |
Return the space origin coordinates. More... | |
virtual unsigned int | getNComponents () const |
Get the number of space components. More... | |
virtual const ASpace * | getComponent (int ispace=-1) const |
Return the space component at index ispace. More... | |
virtual String | toString (const AStringFormat *strfmt, int ispace) const |
Dump a space in a string (given the space index) More... | |
virtual bool | isEqual (const ASpace *space) const |
Return true if the given space is equal to me (same dimension and space definition) More... | |
virtual VectorDouble | getDistances (const SpacePoint &p1, const SpacePoint &p2) const |
Return all the distances (one by space component) between two space points. More... | |
void | move (SpacePoint &p1, const VectorDouble &vec) const |
Not to be overriden. More... | |
double | getDistance (const SpacePoint &p1, const SpacePoint &p2, int ispace=-1) const |
Return the distance between two space points. More... | |
double | getDistance (const SpacePoint &p1, const SpacePoint &p2, const Tensor &tensor, int ispace=-1) const |
Return the distance between two space points with the given tensor. More... | |
double | getFrequentialDistance (const SpacePoint &p1, const SpacePoint &p2, const Tensor &tensor, int ispace=-1) const |
Return the distance in frequential domain between two space points with the given tensor. More... | |
VectorDouble | getIncrement (const SpacePoint &p1, const SpacePoint &p2, int ispace=-1) const |
Return the increment vector between two space points. More... | |
virtual VectorDouble | projCoord (const VectorDouble &coord, int ispace=-1) const |
Project the coordinates in the given space. More... | |
void | setOffset (unsigned int offset) |
Customize the dimension offset index of the current space TODO : to be made private. More... | |
Public Member Functions inherited from AStringable | |
AStringable () | |
AStringable (const AStringable &r) | |
AStringable & | operator= (const AStringable &r) |
virtual | ~AStringable () |
virtual void | display (const AStringFormat *strfmt=nullptr) const final |
virtual void | display (int level) const final |
Public Member Functions inherited from ICloneable | |
ICloneable () | |
virtual | ~ICloneable () |
virtual ICloneable * | clone () const =0 |
ASpace::ASpace | ( | unsigned int | ndim | ) |
ASpace::ASpace | ( | const ASpace & | r | ) |
|
virtual |
|
virtual |
Return the space component at index ispace.
Reimplemented in SpaceComposite.
double ASpace::getDistance | ( | const SpacePoint & | p1, |
const SpacePoint & | p2, | ||
const Tensor & | tensor, | ||
int | ispace = -1 |
||
) | const |
Return the distance between two space points with the given tensor.
TODO : test Tensor dimension
double ASpace::getDistance | ( | const SpacePoint & | p1, |
const SpacePoint & | p2, | ||
int | ispace = -1 |
||
) | const |
Return the distance between two space points.
|
virtual |
Return all the distances (one by space component) between two space points.
Reimplemented in SpaceComposite.
double ASpace::getFrequentialDistance | ( | const SpacePoint & | p1, |
const SpacePoint & | p2, | ||
const Tensor & | tensor, | ||
int | ispace = -1 |
||
) | const |
Return the distance in frequential domain between two space points with the given tensor.
TODO : test tensor size
VectorDouble ASpace::getIncrement | ( | const SpacePoint & | p1, |
const SpacePoint & | p2, | ||
int | ispace = -1 |
||
) | const |
Return the increment vector between two space points.
TODO : test tensor size
|
virtual |
Get the number of space components.
Reimplemented in SpaceComposite.
|
virtual |
Get the number of dimensions.
Reimplemented in SpaceComposite.
|
virtual |
Get the offset index for coordinates.
Reimplemented in SpaceComposite.
|
virtual |
Return the space origin coordinates.
Reimplemented in SpaceComposite.
|
pure virtual |
Return the concrete space type.
Implemented in SpaceSN, SpaceRN, and SpaceComposite.
|
virtual |
Return true if the given space is equal to me (same dimension and space definition)
Reimplemented in SpaceSN, and SpaceComposite.
void ASpace::move | ( | SpacePoint & | p1, |
const VectorDouble & | 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 SpaceComposite.
|
virtual |
Dump a space in a string (given the space index)
Reimplemented in SpaceComposite, and SpaceSN.
|
finalvirtual |
Interface for AStringable.
Reimplemented from AStringable.