1.8.0
CCC
 
Loading...
Searching...
No Matches
gstlrn::SpacePoint Class Reference

#include <SpacePoint.hpp>

Inheritance diagram for gstlrn::SpacePoint:
gstlrn::ASpaceObject gstlrn::AStringable gstlrn::SpaceTarget

Public Member Functions

 SpacePoint (const ASpaceSharedPtr &space=ASpaceSharedPtr())
 
 SpacePoint (const SpacePoint &r)
 
 SpacePoint (const 1 &coord, Id iech=-1, const ASpaceSharedPtr &space=ASpaceSharedPtr())
 
SpacePointoperator= (const SpacePoint &r)
 
virtual ~SpacePoint ()
 
SpacePoint spacePointOnSubspace (Id ispace=-1) const
 
bool operator== (const SpacePoint &v) const
 TODO : should also test the space definition.
 
constvect getCoords () const
 
vect getCoordRef ()
 
getCoordUnprotected ()
 
double getCoord (Id idim) const
 
void setCoord (double coord)
 
void setCoord (Id i, double val)
 
void setCoords (const 1 &coord)
 
void setCoords (const double *coord, Id size)
 
void setIech (Id iech) const
 
void setProjected (bool status)
 
Id getIech () const
 
bool isProjected () const
 
bool isConsistent (const ASpace *space) const override
 Return true if the point is consistent with the provided space.
 
void move (const 1 &vec)
 Move me by the given vector.
 
double getDistance (const SpacePoint &pt, Id ispace=-1) const
 Return the distance between 'this' and another point.
 
 getDistances (const SpacePoint &pt) const
 Return all the distance (space composits) between 'this' and another point.
 
 getIncrement (const SpacePoint &pt, Id ispace=-1) const
 Return the increment vector between 'this' and another point.
 
void getIncrementInPlace (1 &inc, const SpacePoint &pt, Id ispace=-1) const
 
void setFFFF ()
 Fill with TEST values to simulate a missing Space Point.
 
bool isFFFF () const
 Check if the SpacePoint is actually defined.
 
double getCosineToDirection (const SpacePoint &T2, const 1 &codir) const
 Return the cosine of the angle between the bipoint and a reference direction.
 
double getOrthogonalDistance (const SpacePoint &P2, const 1 &codir) const
 Return the orthogonal distance between a bipair and a reference direction.
 
void setCoordFromAngle (const 1 &angles)
 Initialize coordinates from angles /// TODO : to be removed.
 
String toString (const AStringFormat *strfmt=nullptr) const override
 Convert space point to string.
 
- Public Member Functions inherited from gstlrn::ASpaceObject
 ASpaceObject (const ASpaceSharedPtr &space=ASpaceSharedPtr())
 
 ASpaceObject (const ASpaceObject &r)
 
ASpaceObjectoperator= (const ASpaceObject &r)
 
virtual ~ASpaceObject ()
 
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.
 
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
 
- Public Member Functions inherited from gstlrn::AStringable
 AStringable ()
 
 AStringable (const AStringable &r)
 
AStringableoperator= (const AStringable &r)
 
virtual ~AStringable ()
 
virtual void display (const AStringFormat *strfmt=nullptr) const final
 
virtual void display (Id level) const final
 

Constructor & Destructor Documentation

◆ SpacePoint() [1/3]

gstlrn::SpacePoint::SpacePoint ( const ASpaceSharedPtr space = ASpaceSharedPtr())

◆ SpacePoint() [2/3]

gstlrn::SpacePoint::SpacePoint ( const SpacePoint r)

◆ SpacePoint() [3/3]

gstlrn::SpacePoint::SpacePoint ( const 1 &  coord,
Id  iech = -1,
const ASpaceSharedPtr space = ASpaceSharedPtr() 
)

◆ ~SpacePoint()

gstlrn::SpacePoint::~SpacePoint ( )
virtual

Member Function Documentation

◆ getCoord()

double gstlrn::SpacePoint::getCoord ( Id  idim) const

◆ getCoordRef()

vect gstlrn::SpacePoint::getCoordRef ( )
inline

◆ getCoords()

constvect gstlrn::SpacePoint::getCoords ( ) const

◆ getCoordUnprotected()

& gstlrn::SpacePoint::getCoordUnprotected ( )
inline

◆ getCosineToDirection()

double gstlrn::SpacePoint::getCosineToDirection ( const SpacePoint T2,
const 1 &  codir 
) const

Return the cosine of the angle between the bipoint and a reference direction.

◆ getDistance()

double gstlrn::SpacePoint::getDistance ( const SpacePoint pt,
Id  ispace = -1 
) const

Return the distance between 'this' and another point.

◆ getDistances()

gstlrn::SpacePoint::getDistances ( const SpacePoint pt) const

Return all the distance (space composits) between 'this' and another point.

◆ getIech()

Id gstlrn::SpacePoint::getIech ( ) const
inline

◆ getIncrement()

gstlrn::SpacePoint::getIncrement ( const SpacePoint pt,
Id  ispace = -1 
) const

Return the increment vector between 'this' and another point.

◆ getIncrementInPlace()

void gstlrn::SpacePoint::getIncrementInPlace ( 1 &  inc,
const SpacePoint pt,
Id  ispace = -1 
) const

◆ getOrthogonalDistance()

double gstlrn::SpacePoint::getOrthogonalDistance ( const SpacePoint P2,
const 1 &  codir 
) const

Return the orthogonal distance between a bipair and a reference direction.

◆ isConsistent()

bool gstlrn::SpacePoint::isConsistent ( const ASpace space) const
overridevirtual

Return true if the point is consistent with the provided space.

Implements gstlrn::ASpaceObject.

◆ isFFFF()

bool gstlrn::SpacePoint::isFFFF ( ) const

Check if the SpacePoint is actually defined.

◆ isProjected()

bool gstlrn::SpacePoint::isProjected ( ) const
inline

◆ move()

void gstlrn::SpacePoint::move ( const 1 &  vec)

Move me by the given vector.

◆ operator=()

SpacePoint & gstlrn::SpacePoint::operator= ( const SpacePoint r)

◆ operator==()

bool gstlrn::SpacePoint::operator== ( const SpacePoint v) const
inline

TODO : should also test the space definition.

◆ setCoord() [1/2]

void gstlrn::SpacePoint::setCoord ( double  coord)

◆ setCoord() [2/2]

void gstlrn::SpacePoint::setCoord ( Id  i,
double  val 
)
inline

◆ setCoordFromAngle()

void gstlrn::SpacePoint::setCoordFromAngle ( const 1 &  angles)

Initialize coordinates from angles /// TODO : to be removed.

Initialize point coordinates from angles

TODO : initialize coordinates from angles for more than 2D & valid only for space RN ? To be kept ?

◆ setCoords() [1/2]

void gstlrn::SpacePoint::setCoords ( const 1 &  coord)

◆ setCoords() [2/2]

void gstlrn::SpacePoint::setCoords ( const double *  coord,
Id  size 
)

◆ setFFFF()

void gstlrn::SpacePoint::setFFFF ( )

Fill with TEST values to simulate a missing Space Point.

◆ setIech()

void gstlrn::SpacePoint::setIech ( Id  iech) const
inline

◆ setProjected()

void gstlrn::SpacePoint::setProjected ( bool  status)
inline

◆ spacePointOnSubspace()

SpacePoint gstlrn::SpacePoint::spacePointOnSubspace ( Id  ispace = -1) const

TODO : Memory copies

◆ toString()

String gstlrn::SpacePoint::toString ( const AStringFormat strfmt = nullptr) const
overridevirtual

Convert space point to string.

Reimplemented from gstlrn::ASpaceObject.

Reimplemented in gstlrn::SpaceTarget.


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