Scippy

SCIP

Solving Constraint Integer Programs

expr_erf.c File Reference

Detailed Description

handler for Gaussian error function expressions

Author
Benjamin Mueller

Definition in file expr_erf.c.

#include "scip/expr_erf.h"
#include "scip/expr_value.h"

Go to the source code of this file.

Macros

#define EXPRHDLR_NAME   "erf"
 
#define EXPRHDLR_DESC   "Gaussian error function"
 
#define EXPRHDLR_PRECEDENCE   79000
 
#define EXPRHDLR_HASHKEY   SCIPcalcFibHash(131071.0)
 

Functions

static SCIP_Real errorf (SCIP_Real x)
 
static SCIP_DECL_EXPRCOPYHDLR (copyhdlrErf)
 
static SCIP_DECL_EXPRSIMPLIFY (simplifyErf)
 
static SCIP_DECL_EXPRPARSE (parseErf)
 
static SCIP_DECL_EXPREVAL (evalErf)
 
static SCIP_DECL_EXPRBWDIFF (bwdiffErf)
 
static SCIP_DECL_EXPRINTEVAL (intevalErf)
 
static SCIP_DECL_EXPRHASH (hashErf)
 
static SCIP_DECL_EXPRCURVATURE (curvatureErf)
 
static SCIP_DECL_EXPRMONOTONICITY (monotonicityErf)
 
static SCIP_DECL_EXPRINTEGRALITY (integralityErf)
 
SCIP_RETCODE SCIPcreateExprErf (SCIP *scip, SCIP_EXPR **expr, SCIP_EXPR *child, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
 
SCIP_Bool SCIPisExprErf (SCIP *scip, SCIP_EXPR *expr)
 
SCIP_RETCODE SCIPincludeExprhdlrErf (SCIP *scip)
 

Macro Definition Documentation

◆ EXPRHDLR_NAME

#define EXPRHDLR_NAME   "erf"

Definition at line 27 of file expr_erf.c.

Referenced by SCIPcreateExprErf(), SCIPincludeExprhdlrErf(), and SCIPisExprErf().

◆ EXPRHDLR_DESC

#define EXPRHDLR_DESC   "Gaussian error function"

Definition at line 28 of file expr_erf.c.

Referenced by SCIPincludeExprhdlrErf().

◆ EXPRHDLR_PRECEDENCE

#define EXPRHDLR_PRECEDENCE   79000

Definition at line 29 of file expr_erf.c.

Referenced by SCIPincludeExprhdlrErf().

◆ EXPRHDLR_HASHKEY

#define EXPRHDLR_HASHKEY   SCIPcalcFibHash(131071.0)

Definition at line 30 of file expr_erf.c.

Referenced by SCIP_DECL_EXPRHASH().

Function Documentation

◆ errorf()

static SCIP_Real errorf ( SCIP_Real  x)
static

evaluates the Gaussian error function at a given point

Parameters
xpoint to evaluate

Definition at line 42 of file expr_erf.c.

References REALABS, SCIP_Real, and y.

Referenced by SCIP_DECL_EXPREVAL(), SCIP_DECL_EXPRINTEVAL(), and SCIP_DECL_EXPRSIMPLIFY().

◆ SCIP_DECL_EXPRCOPYHDLR()

static SCIP_DECL_EXPRCOPYHDLR ( copyhdlrErf  )
static

expression handler copy callback

Definition at line 65 of file expr_erf.c.

References SCIP_CALL, SCIP_OKAY, and SCIPincludeExprhdlrErf().

◆ SCIP_DECL_EXPRSIMPLIFY()

static SCIP_DECL_EXPRSIMPLIFY ( simplifyErf  )
static

◆ SCIP_DECL_EXPRPARSE()

static SCIP_DECL_EXPRPARSE ( parseErf  )
static

expression parse callback

Definition at line 104 of file expr_erf.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPcreateExprErf(), SCIPparseExpr(), SCIPreleaseExpr(), and TRUE.

◆ SCIP_DECL_EXPREVAL()

static SCIP_DECL_EXPREVAL ( evalErf  )
static

expression (point-) evaluation callback

Definition at line 128 of file expr_erf.c.

References errorf(), NULL, SCIP_INVALID, SCIP_OKAY, SCIPexprGetChildren(), SCIPexprGetData(), SCIPexprGetEvalValue(), and SCIPexprGetNChildren().

◆ SCIP_DECL_EXPRBWDIFF()

static SCIP_DECL_EXPRBWDIFF ( bwdiffErf  )
static

expression derivative evaluation callback

Definition at line 142 of file expr_erf.c.

References NULL, SCIP_OKAY, SCIPABORT, and SCIPerrorMessage.

◆ SCIP_DECL_EXPRINTEVAL()

◆ SCIP_DECL_EXPRHASH()

static SCIP_DECL_EXPRHASH ( hashErf  )
static

erf hash callback

Definition at line 181 of file expr_erf.c.

References EXPRHDLR_HASHKEY, NULL, SCIP_OKAY, and SCIPexprGetNChildren().

◆ SCIP_DECL_EXPRCURVATURE()

static SCIP_DECL_EXPRCURVATURE ( curvatureErf  )
static

expression curvature detection callback

Definition at line 197 of file expr_erf.c.

References FALSE, NULL, SCIP_EXPRCURV_CONVEX, SCIP_OKAY, and TRUE.

◆ SCIP_DECL_EXPRMONOTONICITY()

static SCIP_DECL_EXPRMONOTONICITY ( monotonicityErf  )
static

expression monotonicity detection callback

Definition at line 219 of file expr_erf.c.

References NULL, SCIP_MONOTONE_INC, and SCIP_OKAY.

◆ SCIP_DECL_EXPRINTEGRALITY()

static SCIP_DECL_EXPRINTEGRALITY ( integralityErf  )
static

expression integrality detection callback

Definition at line 232 of file expr_erf.c.

References FALSE, NULL, and SCIP_OKAY.

◆ SCIPcreateExprErf()

SCIP_RETCODE SCIPcreateExprErf ( SCIP scip,
SCIP_EXPR **  expr,
SCIP_EXPR child,
SCIP_DECL_EXPR_OWNERCREATE((*ownercreate))  ,
void *  ownercreatedata 
)

creates an erf expression

Attention
The implementation of erf expressions is incomplete. They are not usable for most use cases so far.
Parameters
scipSCIP data structure
exprpointer where to store expression
childchild expression
ownercreatedatadata to pass to ownercreate

Definition at line 248 of file expr_erf.c.

References EXPRHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPABORT, SCIPcreateExpr(), SCIPerrorMessage, and SCIPfindExprhdlr().

Referenced by readExpression(), and SCIP_DECL_EXPRPARSE().

◆ SCIPisExprErf()

SCIP_Bool SCIPisExprErf ( SCIP scip,
SCIP_EXPR expr 
)

indicates whether expression is of erf-type

Parameters
scipSCIP data structure
exprexpression

Definition at line 276 of file expr_erf.c.

References EXPRHDLR_NAME, NULL, SCIPexprGetHdlr(), and SCIPexprhdlrGetName().

◆ SCIPincludeExprhdlrErf()

SCIP_RETCODE SCIPincludeExprhdlrErf ( SCIP scip)

creates the handler for erf expressions and includes it into SCIP

Attention
The implementation of this expression handler is incomplete. It is not usable for most use cases so far.
Parameters
scipSCIP data structure

Definition at line 291 of file expr_erf.c.

References EXPRHDLR_DESC, EXPRHDLR_NAME, EXPRHDLR_PRECEDENCE, NULL, SCIP_CALL, SCIP_OKAY, SCIPexprhdlrSetCopyFreeHdlr(), SCIPexprhdlrSetCurvature(), SCIPexprhdlrSetDiff(), SCIPexprhdlrSetHash(), SCIPexprhdlrSetIntegrality(), SCIPexprhdlrSetIntEval(), SCIPexprhdlrSetMonotonicity(), SCIPexprhdlrSetParse(), SCIPexprhdlrSetSimplify(), and SCIPincludeExprhdlr().

Referenced by SCIP_DECL_EXPRCOPYHDLR().