1.5.0
CCC
 
Constraints.cpp File Reference
#include "Model/Constraints.hpp"
#include "Model/ConsItem.hpp"
#include "Basic/Utilities.hpp"
#include <math.h>

Functions

void constraints_print (const Constraints &constraints)
 
int modify_constraints_on_sill (Constraints &constraints)
 
double constraints_get (const Constraints &constraints, const EConsType &icase, int igrf, int icov, const EConsElem &icons, int iv1, int iv2)
 
int add_sill_constraints (Constraints &constraints, double constantSill)
 
int add_unit_sill_constraints (Constraints &constraints)
 

Function Documentation

◆ add_sill_constraints()

int add_sill_constraints ( Constraints constraints,
double  constantSill 
)

Add constraints to the Option_AutoFit structure

Returns
Error return code
Parameters
[in]constraintsConstraints structure
[in]constantSillConstant value for the Sill as a constraint

◆ add_unit_sill_constraints()

int add_unit_sill_constraints ( Constraints constraints)

Add constraints (all equal to 1) to the Option_AutoFit structure

Returns
Error return code
Parameters
[in]constraintsConstraints structure

◆ constraints_get()

double constraints_get ( const Constraints constraints,
const EConsType &  icase,
int  igrf,
int  icov,
const EConsElem &  icons,
int  iv1,
int  iv2 
)

Return the constraint value (if defined) or TEST

Returns
Returned value or TEST
Parameters
[in,out]constraintsConstraints structure
[in]icaseParameter type (EConsType)
[in]igrfRank of the Gaussian Random Function
[in]icovRank of the structure (starting from 0)
[in]iconsType of the constraint (EConsElem)
[in]iv1Rank of the first variable
[in]iv2Rank of the second variable

◆ constraints_print()

void constraints_print ( const Constraints constraints)

Print the Auto Fitting Constraints Structure

Parameters
[in]constraintsConstraints structure

◆ modify_constraints_on_sill()

int modify_constraints_on_sill ( Constraints constraints)

If a constraint concerns a sill, take its square root as it corresponds to a constraints on AIC (not on a sill directly) due to the fact that it will be processed in FOXLEG (not in GOULARD) This transform only makes sense for MONOVARIATE case (the test should have been performed beforehand)

Returns
Error code (if the sill constraint is negative)
Parameters
[in]constraintsConstraints structure