Loading [MathJax]/extensions/tex2jax.js
1.7.3
Geostatistics & Machine Learning toolbox | https://gstlearn.org
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ASpace Class Referenceabstract

Base classe for space definitions. More...

#include <ASpace.hpp>

Inheritance diagram for ASpace:
AStringable ICloneable SpaceComposite SpaceRN SpaceSN

Detailed Description

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 VectorDouble &origin)
 Update the origin of the space.
 
virtual unsigned int getNDim (int ispace=-1) const
 Get the number of dimensions.
 
virtual unsigned int getOffset (int ispace=-1) const
 Get the offset index for coordinates.
 
virtual const VectorDoublegetOrigin (int ispace=-1) const
 Return the space origin coordinates.
 
virtual unsigned int getNComponents () const
 Get the number of space components.
 
virtual std::shared_ptr< const ASpacegetComponent (int ispace=-1) const
 Return the space component at index ispace.
 
virtual String toString (const AStringFormat *strfmt, int 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 VectorDouble 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, VectorDouble &res, const VectorInt &ranks) const
 
void move (SpacePoint &p1, const VectorDouble &vec) const
 Not to be overriden.
 
double getDistance (const SpacePoint &p1, const SpacePoint &p2, int ispace=-1) const
 Return the distance between two space points.
 
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.
 
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.
 
VectorDouble getIncrement (const SpacePoint &p1, const SpacePoint &p2, int ispace=-1) const
 Return the increment vector between two space points.
 
virtual VectorDouble projCoord (const VectorDouble &coord, int ispace=-1) const
 Project the coordinates in the given space.
 
void setOffset (unsigned int offset)
 Customize the dimension offset index of the current space TODO : to be made private.
 
- Public Member Functions inherited from AStringable
 AStringable ()
 
 AStringable (const AStringable &r)
 
AStringableoperator= (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 ICloneableclone () const =0
 

Static Public Member Functions

static std::shared_ptr< const ASpacegetDefaultSpaceIfNull (const std::shared_ptr< const ASpace > &space)
 

Constructor & Destructor Documentation

◆ ~ASpace()

ASpace::~ASpace ( )
virtual

Member Function Documentation

◆ getComponent()

ASpaceSharedPtr ASpace::getComponent ( int  ispace = -1) const
virtual

Return the space component at index ispace.

Reimplemented in SpaceComposite.

◆ getDefaultSpaceIfNull()

ASpaceSharedPtr ASpace::getDefaultSpaceIfNull ( const std::shared_ptr< const ASpace > &  space)
static

◆ getDistance() [1/2]

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

◆ getDistance() [2/2]

double ASpace::getDistance ( const SpacePoint p1,
const SpacePoint p2,
int  ispace = -1 
) const

Return the distance between two space points.

◆ getDistancePointVectInPlace()

virtual void ASpace::getDistancePointVectInPlace ( const SpacePoint p1,
const std::vector< SpacePoint > &  p2,
VectorDouble res,
const VectorInt ranks 
) const
inlinevirtual

Reimplemented in SpaceRN.

◆ getDistances()

VectorDouble ASpace::getDistances ( const SpacePoint p1,
const SpacePoint p2 
) const
virtual

Return all the distances (one by space component) between two space points.

Reimplemented in SpaceComposite.

◆ getFrequentialDistance()

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

◆ getIncrement()

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

◆ getNComponents()

unsigned int ASpace::getNComponents ( ) const
virtual

Get the number of space components.

Reimplemented in SpaceComposite.

◆ getNDim()

unsigned int ASpace::getNDim ( int  ispace = -1) const
virtual

Get the number of dimensions.

Reimplemented in SpaceComposite.

◆ getOffset()

unsigned int ASpace::getOffset ( int  ispace = -1) const
virtual

Get the offset index for coordinates.

Reimplemented in SpaceComposite.

◆ getOrigin()

const VectorDouble & ASpace::getOrigin ( int  ispace = -1) const
virtual

Return the space origin coordinates.

Reimplemented in SpaceComposite.

◆ getType()

virtual ESpaceType ASpace::getType ( ) const
pure virtual

Return the concrete space type.

Implemented in SpaceComposite, SpaceRN, and SpaceSN.

◆ isEqual()

bool ASpace::isEqual ( const ASpace space) const
virtual

Return true if the given space is equal to me (same dimension and space definition)

Reimplemented in SpaceComposite, and SpaceSN.

◆ move()

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

◆ projCoord()

VectorDouble ASpace::projCoord ( const VectorDouble coord,
int  ispace = -1 
) const
virtual

Project the coordinates in the given space.

TODO : Memory copies !

◆ setOffset()

void ASpace::setOffset ( unsigned int  offset)
inline

Customize the dimension offset index of the current space TODO : to be made private.

◆ setOrigin()

void ASpace::setOrigin ( const VectorDouble origin)
virtual

Update the origin of the space.

Reimplemented in SpaceComposite.

◆ toString() [1/2]

String ASpace::toString ( const AStringFormat strfmt,
int  ispace 
) const
virtual

Dump a space in a string (given the space index)

Reimplemented in SpaceSN, and SpaceComposite.

◆ toString() [2/2]

String ASpace::toString ( const AStringFormat strfmt = nullptr) const
finalvirtual

Interface for AStringable.

Reimplemented from AStringable.


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