1.8.0
CCC
 
Loading...
Searching...
No Matches
gstlrn::ANeigh Class Referenceabstract

Class to define the a subset of an input Data Base ('Db') called a Neighborhood. This Neighborhood feature is invoked when the geostatistical processing cannot handle the whole data set (usually due to core limitations) and requires a fine selection of the most suitable part of the data set. More...

#include <ANeigh.hpp>

Inheritance diagram for gstlrn::ANeigh:
gstlrn::ASpaceObject gstlrn::ASerializable gstlrn::ICloneable gstlrn::AStringable gstlrn::NeighBench gstlrn::NeighCell gstlrn::NeighImage gstlrn::NeighMoving gstlrn::NeighUnique

Detailed Description

Class to define the a subset of an input Data Base ('Db') called a Neighborhood. This Neighborhood feature is invoked when the geostatistical processing cannot handle the whole data set (usually due to core limitations) and requires a fine selection of the most suitable part of the data set.

Several implementations can be defined, such as:

  • Unique Neighborhood: all active samples are selected (see NeighUnique)
  • Moving Neighborhood: the sub-population essentially selects the samples close enough to the target. This sub-population evolves with the location of the target, hence the name of this Neighborhood feature (see NeighMoving).
  • Bench Neighborhood: the sub-population selects all samples located in the same 'bench' as the target. A bench is a portion of the space characterized sliced along the highest dimension of the space (e.g. horizontal bench for 3D space) (see NeighBench).
  • Cell Neighborhood: the sub-population selects all samples belonging to the same 'cell' as the target. Obviously this feature is only valid if the target data base is defined as a Grid (see NeighCell).
  • Image Neighborhood: the sub-population selects a pattern of constant dimensions centered on the target. This Neighborhood is only valid when the target and the input data base are matching grids (usually they are the same file) (see NeighImage).

Several other topics are considered as belonging to the Neighborhood selection procedure, such as:

  • Possibility to add some information, collected from the Target File, in the Neighborhood calculated from the input data file: this is the Colocation option
  • Possibility to exclude the target (or samples sharing some characteristics with the Target). This is the cross-validation option.

Public Member Functions

 ANeigh (const ASpaceSharedPtr &space=ASpaceSharedPtr())
 
 ANeigh (const ANeigh &r)
 
ANeighoperator= (const ANeigh &r)
 
virtual ~ANeigh ()
 
bool isConsistent (const ASpace *space) const override
 ASpaceObject Interface.
 
virtual Id attach (const Db *dbin, const Db *dbout)
 Interface for ANeigh.
 
virtual void getNeigh (Id iech_out, 1 &ranks)=0
 
virtual Id getNSampleMax (const Db *db) const =0
 
virtual bool hasChanged (Id iech_out) const
 
virtual summary (Id iech_out)
 
virtual ENeigh getType () const
 
virtual bool getFlagContinuous () const
 
void displayDebug (1 &ranks) const
 
void select (Id iech_out, 1 &ranks)
 
bool isUnchanged () const
 
void setIsChanged (bool status=false)
 
void reset ()
 
bool getFlagXvalid () const
 
bool getFlagKFold () const
 
void setFlagXvalid (bool flagXvalid)
 
void setFlagKFold (bool flagKFold)
 
void setFlagSimu (bool flagSimu)
 
void setBallSearch (bool status, Id leaf_size=10)
 
void attachBall ()
 
- Public Member Functions inherited from gstlrn::ASpaceObject
 ASpaceObject (const ASpaceSharedPtr &space=ASpaceSharedPtr())
 
 ASpaceObject (const ASpaceObject &r)
 
ASpaceObjectoperator= (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.
 
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
 
- Public Member Functions inherited from gstlrn::ASerializable
 ASerializable ()
 
 ASerializable (const ASerializable &r)
 
ASerializableoperator= (const ASerializable &r)
 
 ASerializable (ASerializable &&r) noexcept
 
ASerializableoperator= (ASerializable &&r) noexcept
 
virtual ~ASerializable ()
 
bool dumpToNF (const String &NFFilename, const EFormatNF &format=EFormatNF::fromKey("DEFAULT"), bool verbose=false) const
 Dump the contents of an object into an Output File using a given Output NF Format.
 
void setDefaultFormatNF (const EFormatNF &format)
 
- Public Member Functions inherited from gstlrn::ICloneable
 ICloneable ()
 
virtual ~ICloneable ()
 
virtual ICloneableclone () const =0
 
std::shared_ptr< ICloneablecloneShared () const
 
std::unique_ptr< ICloneablecloneUnique () const
 

Additional Inherited Members

- Static Public Member Functions inherited from gstlrn::ASerializable
static String buildFileName (Id status, const String &filename, bool ensureDirExist=false)
 
static String getFileIdentity (const String &filename, bool verbose=false)
 
static void setPrefixName (const String &prefixName)
 
static void unsetPrefixName ()
 
static const StringgetPrefixName ()
 

Constructor & Destructor Documentation

◆ ANeigh() [1/2]

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

◆ ANeigh() [2/2]

gstlrn::ANeigh::ANeigh ( const ANeigh r)

◆ ~ANeigh()

gstlrn::ANeigh::~ANeigh ( )
virtual

Member Function Documentation

◆ attach()

Id gstlrn::ANeigh::attach ( const Db dbin,
const Db dbout 
)
virtual

Interface for ANeigh.

Reimplemented in gstlrn::NeighBench, gstlrn::NeighCell, and gstlrn::NeighMoving.

◆ attachBall()

void gstlrn::ANeigh::attachBall ( )

◆ displayDebug()

void gstlrn::ANeigh::displayDebug ( 1 &  ranks) const

◆ getFlagContinuous()

virtual bool gstlrn::ANeigh::getFlagContinuous ( ) const
inlinevirtual

Reimplemented in gstlrn::NeighMoving.

◆ getFlagKFold()

bool gstlrn::ANeigh::getFlagKFold ( ) const
inline

◆ getFlagXvalid()

bool gstlrn::ANeigh::getFlagXvalid ( ) const
inline

◆ getNeigh()

virtual void gstlrn::ANeigh::getNeigh ( Id  iech_out,
1 &  ranks 
)
pure virtual

◆ getNSampleMax()

virtual Id gstlrn::ANeigh::getNSampleMax ( const Db db) const
pure virtual

◆ getType()

virtual ENeigh gstlrn::ANeigh::getType ( ) const
inlinevirtual

◆ hasChanged()

virtual bool gstlrn::ANeigh::hasChanged ( Id  iech_out) const
inlinevirtual

◆ isConsistent()

bool gstlrn::ANeigh::isConsistent ( const ASpace space) const
inlineoverridevirtual

ASpaceObject Interface.

Implements gstlrn::ASpaceObject.

◆ isUnchanged()

bool gstlrn::ANeigh::isUnchanged ( ) const
inline

◆ operator=()

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

◆ reset()

void gstlrn::ANeigh::reset ( )

◆ select()

void gstlrn::ANeigh::select ( Id  iech_out,
1 &  ranks 
)

Generic function for performing neighborhood selection. This function ALWAYS modifies (and resizes) the returned array 'ranks'

Parameters
iech_outRank of the target point (in 'dbout')
ranksInput / Output vector of neighboring sample ranks

◆ setBallSearch()

void gstlrn::ANeigh::setBallSearch ( bool  status,
Id  leaf_size = 10 
)

◆ setFlagKFold()

void gstlrn::ANeigh::setFlagKFold ( bool  flagKFold)
inline

◆ setFlagSimu()

void gstlrn::ANeigh::setFlagSimu ( bool  flagSimu)
inline

◆ setFlagXvalid()

void gstlrn::ANeigh::setFlagXvalid ( bool  flagXvalid)
inline

◆ setIsChanged()

void gstlrn::ANeigh::setIsChanged ( bool  status = false)

◆ summary()

virtual gstlrn::ANeigh::summary ( Id  iech_out)
inlinevirtual

Reimplemented in gstlrn::NeighMoving.


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