#include <ASpaceObject.hpp>
This class is the base class for all objects that need to know what is its space definition. All ASpaceObject can access to the number of space dimensions and can ask to calculate a distance between two ASpaceObjects.
This class also stores a unique (static) default global space that will be used as default space when creating a ASpaceObject (without a predefined space). It is possible to modify the default space definition at any time. Space definition of pre-existing ASpaceObjects remains the same. (no more shared pointer)
Public Member Functions | |
ASpaceObject (const ASpaceSharedPtr &space=ASpaceSharedPtr()) | |
ASpaceObject (const ASpaceObject &r) | |
ASpaceObject & | operator= (const ASpaceObject &r) |
virtual | ~ASpaceObject () |
String | toString (const AStringFormat *strfmt=nullptr) const override |
AStringable interface. | |
ASpaceSharedPtr | getSpace () const |
Accessor to the current object space context. | |
bool | isConsistent () const |
Indicate if I am consistent with my current space context. | |
void | setSpace (ASpaceSharedPtr &&space) |
getUnitaryVector () const | |
Return unitary vector for the current space context. | |
bool | isConsistent (const ASpaceSharedPtr &space) const |
Indicate if I am consistent with the provided space. | |
virtual bool | isConsistent (const ASpace *space) const =0 |
size_t | getNDim (Id ispace=-1) const |
Shortcuts to ASpace methods. | |
const & | getOrigin (Id ispace=-1) const |
Return the current space context origin coordinates. | |
double | getDistance (const SpacePoint &p1, const SpacePoint &p2, Id ispace=0) const |
Return the distance between two space points for the current space context. | |
getDistances (const SpacePoint &p1, const SpacePoint &p2) const | |
Return all the distances (space composits) between two space points for the current space context. | |
getIncrement (const SpacePoint &p1, const SpacePoint &p2, Id ispace=0) const | |
Return the increment vector between two space points for the current space context. | |
void | getIncrementInPlace (const SpacePoint &p1, const SpacePoint &p2, 1 &ptemp, Id ispace=-1) const |
![]() | |
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 |
gstlrn::ASpaceObject::ASpaceObject | ( | const ASpaceSharedPtr & | space = ASpaceSharedPtr() | ) |
gstlrn::ASpaceObject::ASpaceObject | ( | const ASpaceObject & | r | ) |
|
virtual |
double gstlrn::ASpaceObject::getDistance | ( | const SpacePoint & | p1, |
const SpacePoint & | p2, | ||
Id | ispace = 0 |
||
) | const |
Return the distance between two space points for the current space context.
gstlrn::ASpaceObject::getDistances | ( | const SpacePoint & | p1, |
const SpacePoint & | p2 | ||
) | const |
Return all the distances (space composits) between two space points for the current space context.
gstlrn::ASpaceObject::getIncrement | ( | const SpacePoint & | p1, |
const SpacePoint & | p2, | ||
Id | ispace = 0 |
||
) | const |
Return the increment vector between two space points for the current space context.
void gstlrn::ASpaceObject::getIncrementInPlace | ( | const SpacePoint & | p1, |
const SpacePoint & | p2, | ||
1 & | ptemp, | ||
Id | ispace = -1 |
||
) | const |
size_t gstlrn::ASpaceObject::getNDim | ( | Id | ispace = -1 | ) | const |
Shortcuts to ASpace methods.
Return the number of dimension of the current space context
const & gstlrn::ASpaceObject::getOrigin | ( | Id | ispace = -1 | ) | const |
Return the current space context origin coordinates.
|
inline |
Accessor to the current object space context.
gstlrn::ASpaceObject::getUnitaryVector | ( | ) | const |
Return unitary vector for the current space context.
|
inline |
Indicate if I am consistent with my current space context.
|
pure virtual |
Implemented in gstlrn::CovContext, gstlrn::ANeigh, gstlrn::SpacePoint, and gstlrn::DirParam.
bool gstlrn::ASpaceObject::isConsistent | ( | const ASpaceSharedPtr & | space | ) | const |
Indicate if I am consistent with the provided space.
ASpaceObject & gstlrn::ASpaceObject::operator= | ( | const ASpaceObject & | r | ) |
|
inline |
|
overridevirtual |
AStringable interface.
Reimplemented from gstlrn::AStringable.
Reimplemented in gstlrn::CovContext, gstlrn::NeighBench, gstlrn::NeighCell, gstlrn::NeighImage, gstlrn::NeighMoving, gstlrn::NeighUnique, gstlrn::SpacePoint, gstlrn::SpaceTarget, and gstlrn::DirParam.