A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://scip.zib.de/doc/html/expr__entropy_8c_source.php below:

SCIP Doxygen Documentation: expr_entropy.c Source File

44#define EXPRHDLR_NAME "entropy" 45#define EXPRHDLR_DESC "entropy expression (-x*log(x))" 46#define EXPRHDLR_PRECEDENCE 81000 47#define EXPRHDLR_HASHKEY SCIPcalcFibHash(7477.0) 69 SCIP_Real

xminval = (xmin == 0.0) ? 0.0 : -xmin * log(xmin);

70 SCIP_Real

xmaxval = (xmax == 0.0) ? 0.0 : -xmax * log(xmax);

74

assert(increasing ? xminval <= xmaxval : xminval >= xmaxval);

78 return

increasing ? xmin : xmax;

80 return

increasing ? xmax : xmin;

83 for

( i = 0; i < 1000; ++i )

129

assert(interval !=

NULL

);

160

extremum = exp(-1.0);

183

assert(boundinf ==

SCIP_INVALID

|| boundinf > childinf);

209

assert(boundsup ==

SCIP_INVALID

|| boundsup < childsup);

213

childinf =

MAX

(childinf, boundinf);

219

assert(childinf <= childsup);

247

assert(expr !=

NULL

);

248

assert(simplifiedexpr !=

NULL

);

252

assert(child !=

NULL

);

260

assert(childvalue >= 0.0);

262 if

( childvalue == 0.0 || childvalue == 1.0 )

274

*simplifiedexpr = expr;

289

assert(targetexprdata !=

NULL

);

290

assert(sourceexpr !=

NULL

);

293

*targetexprdata =

NULL

;

301

assert(expr !=

NULL

);

313

assert(expr !=

NULL

);

317

assert(childexpr !=

NULL

);

321

assert(*expr !=

NULL

);

338

assert(expr !=

NULL

);

345 if

( childvalue < 0.0 )

350 else if

( childvalue == 0.0 || childvalue == 1.0 )

357

*val = -childvalue * log(childvalue);

370

assert(expr !=

NULL

);

371

assert(childidx == 0);

376

assert(child !=

NULL

);

382 if

( childvalue <= 0.0 )

385

*val = -1.0 - log(childvalue);

396

assert(expr !=

NULL

);

415

assert(expr !=

NULL

);

416

assert(localbounds !=

NULL

);

417

assert(globalbounds !=

NULL

);

419

assert(refpoint !=

NULL

);

420

assert(coefs !=

NULL

);

421

assert(constant !=

NULL

);

422

assert(islocal !=

NULL

);

423

assert(branchcand !=

NULL

);

424

assert(*branchcand ==

TRUE

);

425

assert(success !=

NULL

);

437

lb = localbounds[0].inf;

438

ub = localbounds[0].sup;

443

assert(lb >= 0.0 && ub >= 0.0);

444

assert(ub - lb != 0.0);

446

vallb = (lb == 0.0) ? 0.0 : -lb * log(lb);

447

valub = (ub == 0.0) ? 0.0 : -ub * log(ub);

449

coefs[0] = (valub - vallb) / (ub - lb);

450

*constant = valub - coefs[0] * ub;

451

assert(

SCIPisEQ

(

scip

, *constant, vallb - coefs[0] * lb));

468

coefs[0] = -(1.0 + log(refpoint[0]));

469

*constant = refpoint[0];

472

*branchcand =

FALSE

;

495

assert(expr !=

NULL

);

510

refpointsover[0] = lb;

517 for

( i = 0; i < 4; ++i )

519 if

( (overest[i] && !overestimate) || (!overest[i] && (overestimate ||

SCIPisInfinity

(

scip

, ub))) )

529

coefs[*nreturned][0] = -(1.0 + log(refpointsover[i]));

531

constant[*nreturned] = refpointsover[i];

535

assert(lb > 0.0 && ub >= 0.0);

536

assert(ub - lb != 0.0);

538

coefs[*nreturned][0] = (-ub * log(ub) + lb * log(lb)) / (ub - lb);

539

constant[*nreturned] = -ub * log(ub) - coefs[*nreturned][0] * ub;

540

assert(

SCIPisEQ

(

scip

, constant[*nreturned], -lb * log(lb) - coefs[*nreturned][0] * lb));

556

assert(expr !=

NULL

);

558

assert(childrenbounds !=

NULL

);

559

assert(infeasible !=

NULL

);

565

childrenbounds[0] = newinterval;

574

assert(expr !=

NULL

);

576

assert(hashkey !=

NULL

);

577

assert(childrenhashes !=

NULL

);

580

*hashkey ^= childrenhashes[0];

590

assert(expr !=

NULL

);

591

assert(childcurv !=

NULL

);

592

assert(success !=

NULL

);

616

assert(expr !=

NULL

);

617

assert(result !=

NULL

);

618

assert(childidx == 0);

621

assert(child !=

NULL

);

626 if

( childbounds.

sup

<= brpoint )

628 else if

( childbounds.

inf

>= brpoint )

641

assert(expr !=

NULL

);

642

assert(isintegral !=

NULL

);

647

*isintegral =

FALSE

;

661

exprhdlrdata =

NULL

;

665

evalEntropy, exprhdlrdata) );

666

assert(exprhdlr !=

NULL

);

690 void

* ownercreatedata

696

assert(expr !=

NULL

);

697

assert(child !=

NULL

);

700

assert(exprhdlr !=

NULL

);

717

assert(expr !=

NULL

);

#define SCIP_INTERVAL_INFINITY

private functions to work with algebraic expressions

static SCIP_DECL_EXPRFREEDATA(freedataEntropy)

static SCIP_DECL_EXPRBWDIFF(bwdiffEntropy)

static SCIP_DECL_EXPRSIMPLIFY(simplifyEntropy)

static SCIP_DECL_EXPRREVERSEPROP(reversepropEntropy)

static SCIP_DECL_EXPRESTIMATE(estimateEntropy)

static SCIP_DECL_EXPRCOPYHDLR(copyhdlrEntropy)

static SCIP_DECL_EXPRHASH(hashEntropy)

static SCIP_DECL_EXPRINITESTIMATES(initestimatesEntropy)

static SCIP_DECL_EXPRINTEVAL(intevalEntropy)

static SCIP_DECL_EXPRCOPYDATA(copydataEntropy)

static SCIP_DECL_EXPRCURVATURE(curvatureEntropy)

static SCIP_RETCODE reverseProp(SCIP *scip, SCIP_INTERVAL exprinterval, SCIP_INTERVAL childinterval, SCIP_INTERVAL *interval)

static SCIP_DECL_EXPRMONOTONICITY(monotonicityEntropy)

static SCIP_DECL_EXPRINTEGRALITY(integralityEntropy)

static SCIP_Real reversePropBinarySearch(SCIP *scip, SCIP_Real xmin, SCIP_Real xmax, SCIP_Bool increasing, SCIP_Real targetval)

#define EXPRHDLR_PRECEDENCE

static SCIP_DECL_EXPREVAL(evalEntropy)

static SCIP_DECL_EXPRPARSE(parseEntropy)

handler for -x*log(x) expressions

constant value expression handler

SCIP_Bool SCIPisExprEntropy(SCIP *scip, SCIP_EXPR *expr)

SCIP_RETCODE SCIPcreateExprValue(SCIP *scip, SCIP_EXPR **expr, SCIP_Real value, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)

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

SCIP_RETCODE SCIPincludeExprhdlrEntropy(SCIP *scip)

const char * SCIPexprhdlrGetName(SCIP_EXPRHDLR *exprhdlr)

void SCIPexprhdlrSetIntegrality(SCIP_EXPRHDLR *exprhdlr, SCIP_DECL_EXPRINTEGRALITY((*integrality)))

void SCIPexprhdlrSetCopyFreeData(SCIP_EXPRHDLR *exprhdlr, SCIP_DECL_EXPRCOPYDATA((*copydata)), SCIP_DECL_EXPRFREEDATA((*freedata)))

void SCIPexprhdlrSetHash(SCIP_EXPRHDLR *exprhdlr, SCIP_DECL_EXPRHASH((*hash)))

void SCIPexprhdlrSetCopyFreeHdlr(SCIP_EXPRHDLR *exprhdlr, SCIP_DECL_EXPRCOPYHDLR((*copyhdlr)), SCIP_DECL_EXPRFREEHDLR((*freehdlr)))

void SCIPexprhdlrSetDiff(SCIP_EXPRHDLR *exprhdlr, SCIP_DECL_EXPRBWDIFF((*bwdiff)), SCIP_DECL_EXPRFWDIFF((*fwdiff)), SCIP_DECL_EXPRBWFWDIFF((*bwfwdiff)))

void SCIPexprhdlrSetReverseProp(SCIP_EXPRHDLR *exprhdlr, SCIP_DECL_EXPRREVERSEPROP((*reverseprop)))

void SCIPexprhdlrSetParse(SCIP_EXPRHDLR *exprhdlr, SCIP_DECL_EXPRPARSE((*parse)))

void SCIPexprhdlrSetEstimate(SCIP_EXPRHDLR *exprhdlr, SCIP_DECL_EXPRINITESTIMATES((*initestimates)), SCIP_DECL_EXPRESTIMATE((*estimate)))

void SCIPexprhdlrSetMonotonicity(SCIP_EXPRHDLR *exprhdlr, SCIP_DECL_EXPRMONOTONICITY((*monotonicity)))

void SCIPexprhdlrSetIntEval(SCIP_EXPRHDLR *exprhdlr, SCIP_DECL_EXPRINTEVAL((*inteval)))

void SCIPexprhdlrSetCurvature(SCIP_EXPRHDLR *exprhdlr, SCIP_DECL_EXPRCURVATURE((*curvature)))

SCIP_RETCODE SCIPincludeExprhdlr(SCIP *scip, SCIP_EXPRHDLR **exprhdlr, const char *name, const char *desc, unsigned int precedence, SCIP_DECL_EXPREVAL((*eval)), SCIP_EXPRHDLRDATA *data)

SCIP_EXPRHDLR * SCIPfindExprhdlr(SCIP *scip, const char *name)

void SCIPexprhdlrSetSimplify(SCIP_EXPRHDLR *exprhdlr, SCIP_DECL_EXPRSIMPLIFY((*simplify)))

SCIP_RETCODE SCIPcreateExpr(SCIP *scip, SCIP_EXPR **expr, SCIP_EXPRHDLR *exprhdlr, SCIP_EXPRDATA *exprdata, int nchildren, SCIP_EXPR **children, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)

void SCIPexprSetData(SCIP_EXPR *expr, SCIP_EXPRDATA *exprdata)

int SCIPexprGetNChildren(SCIP_EXPR *expr)

SCIP_Bool SCIPisExprValue(SCIP *scip, SCIP_EXPR *expr)

SCIP_RETCODE SCIPreleaseExpr(SCIP *scip, SCIP_EXPR **expr)

SCIP_EXPRDATA * SCIPexprGetData(SCIP_EXPR *expr)

SCIP_RETCODE SCIPparseExpr(SCIP *scip, SCIP_EXPR **expr, const char *exprstr, const char **finalpos, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)

SCIP_Real SCIPgetValueExprValue(SCIP_EXPR *expr)

SCIP_Real SCIPexprGetEvalValue(SCIP_EXPR *expr)

SCIP_EXPR ** SCIPexprGetChildren(SCIP_EXPR *expr)

SCIP_INTERVAL SCIPexprGetActivity(SCIP_EXPR *expr)

void SCIPcaptureExpr(SCIP_EXPR *expr)

SCIP_RETCODE SCIPevalExprActivity(SCIP *scip, SCIP_EXPR *expr)

SCIP_EXPRHDLR * SCIPexprGetHdlr(SCIP_EXPR *expr)

SCIP_Real SCIPintervalGetInf(SCIP_INTERVAL interval)

void SCIPintervalIntersect(SCIP_INTERVAL *resultant, SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)

void SCIPintervalSet(SCIP_INTERVAL *resultant, SCIP_Real value)

SCIP_Bool SCIPintervalIsSubsetEQ(SCIP_Real infinity, SCIP_INTERVAL operand1, SCIP_INTERVAL operand2)

SCIP_Bool SCIPintervalIsEmpty(SCIP_Real infinity, SCIP_INTERVAL operand)

void SCIPintervalSetBounds(SCIP_INTERVAL *resultant, SCIP_Real inf, SCIP_Real sup)

void SCIPintervalEntropy(SCIP_Real infinity, SCIP_INTERVAL *resultant, SCIP_INTERVAL operand)

SCIP_Real SCIPintervalGetSup(SCIP_INTERVAL interval)

void SCIPintervalSetEmpty(SCIP_INTERVAL *resultant)

SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)

SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)

SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)

SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)

SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)

SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)

SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)

SCIP_Real SCIPepsilon(SCIP *scip)

SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)

#define SCIP_DECL_EXPR_OWNERCREATE(x)

struct SCIP_ExprhdlrData SCIP_EXPRHDLRDATA

struct SCIP_ExprData SCIP_EXPRDATA

enum SCIP_Retcode SCIP_RETCODE


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4