1.3.2
CCC
 
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 ANeigh:
ASpaceObject ASerializable AStringable NeighBench NeighCell NeighImage NeighMoving 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 ASpace *space=nullptr)
 
 ANeigh (const ANeigh &r)
 
ANeighoperator= (const ANeigh &r)
 
virtual ~ANeigh ()
 
virtual bool isConsistent (const ASpace *space) const override
 ASpaceObject Interface. More...
 
virtual int attach (const Db *dbin, const Db *dbout)
 Interface for ANeigh. More...
 
virtual void getNeigh (int iech_out, VectorInt &ranks)=0
 
virtual int getMaxSampleNumber (const Db *db) const =0
 
virtual bool hasChanged (int iech_out) const
 
virtual VectorDouble summary (int iech_out)
 
virtual ENeigh getType () const
 
virtual bool getFlagContinuous () const
 
void select (int iech_out, VectorInt &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 setRankColCok (const VectorInt &rankColCok)
 
- Public Member Functions inherited from ASpaceObject
 ASpaceObject (const ASpace *space=nullptr)
 
 ASpaceObject (const ASpace &space)
 
 ASpaceObject (const ASpaceObject &r)
 
ASpaceObjectoperator= (const ASpaceObject &r)
 
virtual ~ASpaceObject ()
 
virtual String toString (const AStringFormat *strfmt=nullptr) const override
 AStringable interface. More...
 
const ASpacegetSpace () const
 Accessor to the current object space context. More...
 
bool isConsistent () const
 Indicate if I am consistent with my current space context. More...
 
VectorDouble getUnitaryVector () const
 Return unitary vector for the current space context. More...
 
unsigned int getNDim () const
 Shortcuts to ASpace methods. More...
 
const VectorDoublegetOrigin () const
 Return the current space context origin coordinates. More...
 
double getDistance (const SpacePoint &p1, const SpacePoint &p2) const
 Return the distance between two space points for the current space context. More...
 
double getDistance1D (const SpacePoint &p1, const SpacePoint &p2, int idim) const
 Return the distance along one direction between two space points. More...
 
VectorDouble getIncrement (const SpacePoint &p1, const SpacePoint &p2) const
 Return the increment vector between two space points for the current space context. More...
 
- 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 ASerializable
 ASerializable ()
 
 ASerializable (const ASerializable &r)
 
ASerializableoperator= (const ASerializable &r)
 
virtual ~ASerializable ()
 
bool deserialize (std::istream &is, bool verbose=true)
 
bool serialize (std::ostream &os, bool verbose=true) const
 
bool dumpToNF (const String &neutralFilename, bool verbose=false) const
 

Additional Inherited Members

- Static Public Member Functions inherited from ASerializable
static String buildFileName (int status, const String &filename, bool ensureDirExist=false)
 
static String getHomeDirectory (const String &sub="")
 
static String getWorkingDirectory ()
 
static String getTestData (const String &subdir, const String &filename)
 
static String getFileIdentity (const String &filename, bool verbose=false)
 
static void setContainerName (bool useDefault, const String &containerName="", bool verbose=false)
 
static void unsetContainerName ()
 
static void setPrefixName (const String &prefixName)
 
static void unsetPrefixName ()
 
static const StringgetContainerName ()
 
static const StringgetPrefixName ()
 
static bool createDirectory (const String &dir)
 
static String getExecDirectory ()
 
static String getDirectory (const String &path)
 

Constructor & Destructor Documentation

◆ ANeigh() [1/2]

ANeigh::ANeigh ( const ASpace space = nullptr)

◆ ANeigh() [2/2]

ANeigh::ANeigh ( const ANeigh r)

◆ ~ANeigh()

ANeigh::~ANeigh ( )
virtual

Member Function Documentation

◆ attach()

int ANeigh::attach ( const Db dbin,
const Db dbout 
)
virtual

Interface for ANeigh.

Reimplemented in NeighMoving, NeighCell, and NeighBench.

◆ getFlagContinuous()

virtual bool ANeigh::getFlagContinuous ( ) const
inlinevirtual

Reimplemented in NeighMoving.

◆ getFlagKFold()

bool ANeigh::getFlagKFold ( ) const
inline

◆ getFlagXvalid()

bool ANeigh::getFlagXvalid ( ) const
inline

◆ getMaxSampleNumber()

virtual int ANeigh::getMaxSampleNumber ( const Db db) const
pure virtual

◆ getNeigh()

virtual void ANeigh::getNeigh ( int  iech_out,
VectorInt ranks 
)
pure virtual

◆ getType()

virtual ENeigh ANeigh::getType ( ) const
inlinevirtual

◆ hasChanged()

virtual bool ANeigh::hasChanged ( int  iech_out) const
inlinevirtual

◆ isConsistent()

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

ASpaceObject Interface.

Implements ASpaceObject.

◆ isUnchanged()

bool ANeigh::isUnchanged ( ) const
inline

◆ operator=()

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

◆ reset()

void ANeigh::reset ( )

◆ select()

void ANeigh::select ( int  iech_out,
VectorInt 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

◆ setFlagKFold()

void ANeigh::setFlagKFold ( bool  flagKFold)
inline

◆ setFlagSimu()

void ANeigh::setFlagSimu ( bool  flagSimu)
inline

◆ setFlagXvalid()

void ANeigh::setFlagXvalid ( bool  flagXvalid)
inline

◆ setIsChanged()

void ANeigh::setIsChanged ( bool  status = false)

◆ setRankColCok()

void ANeigh::setRankColCok ( const VectorInt rankColCok)
inline

◆ summary()

virtual VectorDouble ANeigh::summary ( int  iech_out)
inlinevirtual

Reimplemented in NeighMoving.


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