Detailed Description
handler for -x*log(x) expressions
Definition in file expr_entropy.c.
#include "scip/expr_entropy.h"
#include "scip/expr_value.h"
#include "scip/expr.h"
#include <string.h>
Go to the source code of this file.
Macros | |
#define | EXPRHDLR_NAME "entropy" |
#define | EXPRHDLR_DESC "entropy expression (-x*log(x))" |
#define | EXPRHDLR_PRECEDENCE 81000 |
#define | EXPRHDLR_HASHKEY SCIPcalcFibHash(7477.0) |
Macro Definition Documentation
◆ EXPRHDLR_NAME
#define EXPRHDLR_NAME "entropy" |
Definition at line 44 of file expr_entropy.c.
◆ EXPRHDLR_DESC
Definition at line 45 of file expr_entropy.c.
◆ EXPRHDLR_PRECEDENCE
#define EXPRHDLR_PRECEDENCE 81000 |
Definition at line 46 of file expr_entropy.c.
◆ EXPRHDLR_HASHKEY
#define EXPRHDLR_HASHKEY SCIPcalcFibHash(7477.0) |
Definition at line 47 of file expr_entropy.c.
Function Documentation
◆ reversePropBinarySearch()
|
static |
helper function for reverseProp() which returns an x* in [xmin,xmax] s.t. the distance -x*log(x) and a given target value is minimized; the function assumes that -x*log(x) is monotone on [xmin,xmax];
- Parameters
-
scip SCIP data structure xmin smallest possible x xmax largest possible x increasing -x*log(x) is increasing or decreasing on [xmin,xmax] targetval target value
Definition at line 61 of file expr_entropy.c.
References SCIP_INVALID, SCIP_Real, SCIPisEQ(), SCIPisGE(), SCIPisLE(), SCIPisLT(), and x.
Referenced by reverseProp().
◆ reverseProp()
|
static |
helper function for reverse propagation; needed for proper unittest
- Parameters
-
scip SCIP data structure exprinterval bounds on the expression childinterval bounds on the interval of the child interval resulting interval
Definition at line 112 of file expr_entropy.c.
References FALSE, MAX, MIN, NULL, reversePropBinarySearch(), SCIP_INTERVAL_INFINITY, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPepsilon(), SCIPintervalEntropy(), SCIPintervalGetInf(), SCIPintervalGetSup(), SCIPintervalIntersect(), SCIPintervalIsEmpty(), SCIPintervalIsSubsetEQ(), SCIPintervalSet(), SCIPintervalSetBounds(), SCIPintervalSetEmpty(), SCIPisGT(), and TRUE.
Referenced by SCIP_DECL_EXPRREVERSEPROP().
◆ SCIP_DECL_EXPRCOPYHDLR()
|
static |
expression handler copy callback
Definition at line 233 of file expr_entropy.c.
References SCIP_CALL, SCIP_OKAY, and SCIPincludeExprhdlrEntropy().
◆ SCIP_DECL_EXPRSIMPLIFY()
|
static |
simplifies an entropy expression
Definition at line 242 of file expr_entropy.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPcaptureExpr(), SCIPcreateExprValue(), SCIPexprGetChildren(), SCIPexprGetNChildren(), SCIPgetValueExprValue(), and SCIPisExprValue().
◆ SCIP_DECL_EXPRCOPYDATA()
|
static |
expression data copy callback
Definition at line 287 of file expr_entropy.c.
References NULL, SCIP_OKAY, and SCIPexprGetData().
◆ SCIP_DECL_EXPRFREEDATA()
|
static |
expression data free callback
Definition at line 299 of file expr_entropy.c.
References NULL, SCIP_OKAY, and SCIPexprSetData().
◆ SCIP_DECL_EXPRPARSE()
|
static |
expression parse callback
Definition at line 309 of file expr_entropy.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPcreateExprEntropy(), SCIPparseExpr(), SCIPreleaseExpr(), and TRUE.
◆ SCIP_DECL_EXPREVAL()
|
static |
expression (point-) evaluation callback
Definition at line 334 of file expr_entropy.c.
References NULL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPdebugMsg, SCIPexprGetChildren(), SCIPexprGetData(), SCIPexprGetEvalValue(), and SCIPexprGetNChildren().
◆ SCIP_DECL_EXPRBWDIFF()
|
static |
expression derivative evaluation callback
Definition at line 365 of file expr_entropy.c.
References NULL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPexprGetChildren(), SCIPexprGetEvalValue(), SCIPexprGetNChildren(), and SCIPisExprValue().
◆ SCIP_DECL_EXPRINTEVAL()
|
static |
expression interval evaluation callback
Definition at line 392 of file expr_entropy.c.
References NULL, SCIP_INTERVAL_INFINITY, SCIP_OKAY, SCIPexprGetActivity(), SCIPexprGetChildren(), SCIPexprGetData(), SCIPexprGetNChildren(), SCIPintervalEntropy(), SCIPintervalIsEmpty(), and SCIPintervalSetEmpty().
◆ SCIP_DECL_EXPRESTIMATE()
|
static |
expression estimator callback
Definition at line 412 of file expr_entropy.c.
References EXPRHDLR_NAME, FALSE, NULL, REALABS, SCIP_OKAY, SCIP_Real, SCIPepsilon(), SCIPexprGetHdlr(), SCIPexprhdlrGetName(), SCIPisEQ(), SCIPisInfinity(), SCIPisPositive(), SCIPisZero(), and TRUE.
◆ SCIP_DECL_EXPRINITESTIMATES()
|
static |
initial estimates callback
Definition at line 486 of file expr_entropy.c.
References EXPRHDLR_NAME, FALSE, MAX, NULL, SCIP_Bool, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPepsilon(), SCIPexprGetHdlr(), SCIPexprGetNChildren(), SCIPexprhdlrGetName(), SCIPisEQ(), SCIPisGE(), SCIPisInfinity(), SCIPisLE(), and TRUE.
◆ SCIP_DECL_EXPRREVERSEPROP()
|
static |
expression reverse propagation callback
Definition at line 551 of file expr_entropy.c.
References SCIP_Interval::inf, NULL, reverseProp(), SCIP_CALL, SCIP_INTERVAL_INFINITY, SCIP_OKAY, SCIPexprGetNChildren(), and SCIPintervalIsEmpty().
◆ SCIP_DECL_EXPRHASH()
|
static |
entropy hash callback
Definition at line 572 of file expr_entropy.c.
References EXPRHDLR_HASHKEY, NULL, SCIP_OKAY, and SCIPexprGetNChildren().
◆ SCIP_DECL_EXPRCURVATURE()
|
static |
expression curvature detection callback
Definition at line 587 of file expr_entropy.c.
References FALSE, NULL, SCIP_EXPRCURV_CONCAVE, SCIP_OKAY, SCIPexprGetNChildren(), and TRUE.
◆ SCIP_DECL_EXPRMONOTONICITY()
|
static |
expression monotonicity detection callback
Definition at line 609 of file expr_entropy.c.
References SCIP_Interval::inf, NULL, SCIP_CALL, SCIP_MONOTONE_DEC, SCIP_MONOTONE_INC, SCIP_MONOTONE_UNKNOWN, SCIP_OKAY, SCIP_Real, SCIPevalExprActivity(), SCIPexprGetActivity(), SCIPexprGetChildren(), and SCIP_Interval::sup.
◆ SCIP_DECL_EXPRINTEGRALITY()
|
static |
expression integrality detection callback
Definition at line 638 of file expr_entropy.c.