gstlearn  1.0.0
CCC
CalcMigrate.cpp File Reference
#include "geoslib_f_private.h"
#include "Enum/ELoc.hpp"
#include "Basic/NamingConvention.hpp"
#include "Calculators/CalcMigrate.hpp"
#include "Calculators/ACalcDbToDb.hpp"
#include "Db/DbGrid.hpp"
#include "Db/Db.hpp"
#include <math.h>

Functions

int migrate (Db *dbin, Db *dbout, const String &name, int dist_type, const VectorDouble &dmax, bool flag_fill, bool flag_inter, bool flag_ball, const NamingConvention &namconv)
 
int migrateMulti (Db *dbin, Db *dbout, const VectorString &names, int dist_type, const VectorDouble &dmax, bool flag_fill, bool flag_inter, bool flag_ball, const NamingConvention &namconv)
 
int migrateByAttribute (Db *dbin, Db *dbout, const VectorInt &atts, int dist_type, const VectorDouble &dmax, bool flag_fill, bool flag_inter, bool flag_ball, const NamingConvention &namconv)
 
int migrateByLocator (Db *dbin, Db *dbout, const ELoc &locatorType, int dist_type, const VectorDouble &dmax, bool flag_fill, bool flag_inter, bool flag_ball, const NamingConvention &namconv)
 

Function Documentation

◆ migrate()

int migrate ( Db dbin,
Db dbout,
const String name,
int  dist_type,
const VectorDouble dmax,
bool  flag_fill,
bool  flag_inter,
bool  flag_ball,
const NamingConvention namconv 
)

Migrates a variable from one Db to another one

Returns
Error return code
Parameters
[in]dbinDescriptor of the input Db
[in]dboutDescriptor of the output Db
[in]nameName of the attribute to be migrated
[in]dist_typeType of distance for calculating maximum distance 1 for L1 and 2 for L2 distance
[in]dmaxArray of maximum distances (optional)
[in]flag_fillFilling option
[in]flag_interInterpolation
[in]flag_ballUse BallTree sorting algorithm when available
[in]namconvNaming convention

◆ migrateByAttribute()

int migrateByAttribute ( Db dbin,
Db dbout,
const VectorInt atts,
int  dist_type,
const VectorDouble dmax,
bool  flag_fill,
bool  flag_inter,
bool  flag_ball,
const NamingConvention namconv 
)

Migrates a variable from one Db to another one

Returns
Error return code
Parameters
[in]dbinDescriptor of the input Db
[in]dboutDescriptor of the output Db
[in]attsArray of attributes to be migrated
[in]dist_typeType of distance for calculating maximum distance 1 for L1 and 2 for L2 distance
[in]dmaxArray of maximum distances (optional)
[in]flag_fillFilling option
[in]flag_interInterpolation
[in]flag_ballUse BallTree sorting algorithm when available
[in]namconvNaming Convention

◆ migrateByLocator()

int migrateByLocator ( Db dbin,
Db dbout,
const ELoc &  locatorType,
int  dist_type,
const VectorDouble dmax,
bool  flag_fill,
bool  flag_inter,
bool  flag_ball,
const NamingConvention namconv 
)

Migrates all z-locator variables from one Db to another one

Returns
Error return code
Parameters
[in]dbinDescriptor of the input Db
[in]dboutDescriptor of the output Db
[in]locatorTypeLocator Type
[in]dist_typeType of distance for calculating maximum distance 1 for L1 and 2 for L2 distance
[in]dmaxArray of maximum distances (optional)
[in]flag_fillFilling option
[in]flag_interInterpolation
[in]flag_ballUse BallTree sorting algorithm when available
[in]namconvNaming convention
Remarks
The output variable receive the same locator as the input variables

◆ migrateMulti()

int migrateMulti ( Db dbin,
Db dbout,
const VectorString names,
int  dist_type,
const VectorDouble dmax,
bool  flag_fill,
bool  flag_inter,
bool  flag_ball,
const NamingConvention namconv 
)

Migrates a set of variables from one Db to another one

Returns
Error return code
Parameters
[in]dbinDescriptor of the input Db
[in]dboutDescriptor of the output Db
[in]namesName of the attribute to be migrated
[in]dist_typeType of distance for calculating maximum distance 1 for L1 and 2 for L2 distance
[in]dmaxArray of maximum distances (optional)
[in]flag_fillFilling option
[in]flag_interInterpolation
[in]flag_ballUse BallTree sorting algorithm when available
[in]namconvNaming convention