48#undef SCIPexprcurvNegate
49#undef SCIPexprcurvMultiply
111 if( exponent == 0.0 )
114 if( exponent == 1.0 )
122 if( !expisint && basebounds.
inf < 0.0 )
124 basebounds.
inf = 0.0;
125 if( basebounds.
sup < 0.0 )
130 if( basebounds.
inf < 0.0 && basebounds.
sup > 0.0 )
175 sign = exponent * (exponent - 1.0);
176 assert(basebounds.
inf >= 0.0 || expisint);
177 if( basebounds.
inf < 0.0 && ((
int)exponent)%2 != 0 )
186 if( basebounds.
sup <= 0.0 && exponent < 0.0 && expisint )
188 if( basebounds.
inf >= 0.0 && exponent > 1.0 )
195 if( basebounds.
sup <= 0.0 && exponent > 1.0 && expisint )
197 if( basebounds.
inf >= 0.0 && exponent < 1.0 )
221 if( exponent == 1.0 )
234 if( !expisint && basebounds.
inf < 0.0 )
236 basebounds.
inf = 0.0;
237 if( basebounds.
sup < 0.0 )
242 if( basebounds.
inf < 0.0 && basebounds.
sup > 0.0 )
278 if( basebounds.
sup <= 0.0 && exponent < 0.0 && expisint && ((
int)exponent)%2 == 0 )
280 if( basebounds.
inf >= 0.0 && exponent > 1.0 )
282 if( basebounds.
sup <= 0.0 && exponent > 1.0 && expisint && ((
int)exponent)%2 == 0 )
284 if( basebounds.
inf >= 0.0 && exponent < 0.0 )
288 sign = exponent * (exponent - 1.0);
289 assert(basebounds.
inf >= 0.0 || expisint);
290 if( basebounds.
inf < 0.0 && ((
int)exponent)%2 != 0 )
303 if( basebounds.
sup <= 0.0 && exponent < 0.0 && expisint && ((
int)exponent)%2 != 0 )
305 if( basebounds.
sup <= 0.0 && exponent > 1.0 && expisint && ((
int)exponent)%2 != 0 )
307 if( basebounds.
inf >= 0.0 && exponent < 1.0 && exponent >= 0.0 )
311 sign = exponent * (exponent - 1.0);
312 assert(basebounds.
inf >= 0.0 || expisint);
313 if( basebounds.
inf < 0.0 && ((
int)exponent)%2 != 0 )
333 SCIP_Real* exponents,
347 SCIP_Bool expcurvpos;
348 SCIP_Bool expcurvneg;
354 assert(factorbounds !=
NULL || nfactors == 0);
361 f = factoridxs !=
NULL ? factoridxs[0] : 0;
362 e = exponents !=
NULL ? exponents[0] : 1.0;
377 for( j = 0; j < nfactors; ++j )
379 f = factoridxs !=
NULL ? factoridxs[j] : j;
383 e = exponents !=
NULL ? exponents[j] : 1.0;
384 bounds = factorbounds[f];
390 if( bounds.
sup < 0.0 )
394 if( bounds.
inf < 0.0 && bounds.
sup > 0.0 )
403 if( bounds.
inf < 0.0 )
411 if( (
int)e % 2 != 0 )
416 fcurv = factorcurv[f];
439 if( nnegative == nfactors && expcurvpos )
441 else if( nnegative == nfactors-1 &&
EPSGE(sum, 1.0, 1e-9) && expcurvpos )
443 else if( npositive == nfactors &&
EPSLE(sum, 1.0, 1e-9) && expcurvneg )
460 SCIP_Real* exponents,
491 for( j = 0; j < nfactors; ++j )
493 e = exponents !=
NULL ? exponents[j] : 1.0;
496 bounds = factorbounds[j];
504 if( bounds.
sup < 0.0 )
509 if( bounds.
inf < 0.0 && bounds.
sup > 0.0 )
518 if( bounds.
inf < 0.0 )
523 if( (
int)e % 2 != 0 )
542 if( nnegative < nfactors-1 )
544 if( nnegative < nfactors && !
EPSGE(sum, 1.0, 1e-9) )
548 for( j = 0; j < nfactors; ++j )
550 e = exponents !=
NULL ? exponents[j] : 1.0;
553 if( factorbounds[j].inf < 0.0 &&
EPSISINT(e, 0.0) )
564 if( npositive < nfactors )
566 if( !
EPSLE(sum, 1.0, 1e-9) )
570 for( j = 0; j < nfactors; ++j )
572 e = exponents !=
NULL ? exponents[j] : 1.0;
575 if( factorbounds[j].inf < 0.0 &&
EPSISINT(e, 0.0) )
static const char * curvnames[4]
const char * SCIPexprcurvGetName(SCIP_EXPRCURV curv)
SCIP_EXPRCURV SCIPexprcurvMonomial(int nfactors, SCIP_Real *exponents, int *factoridxs, SCIP_EXPRCURV *factorcurv, SCIP_INTERVAL *factorbounds)
SCIP_EXPRCURV SCIPexprcurvPower(SCIP_INTERVAL basebounds, SCIP_EXPRCURV basecurv, SCIP_Real exponent)
SCIP_EXPRCURV SCIPexprcurvPowerInv(SCIP_INTERVAL basebounds, SCIP_Real exponent, SCIP_EXPRCURV powercurv)
SCIP_Bool SCIPexprcurvMonomialInv(SCIP_EXPRCURV monomialcurv, int nfactors, SCIP_Real *exponents, SCIP_INTERVAL *factorbounds, SCIP_EXPRCURV *factorcurv)
SCIP_EXPRCURV SCIPexprcurvMultiply(SCIP_Real factor, SCIP_EXPRCURV curvature)
SCIP_EXPRCURV SCIPexprcurvAdd(SCIP_EXPRCURV curv1, SCIP_EXPRCURV curv2)
SCIP_EXPRCURV SCIPexprcurvNegate(SCIP_EXPRCURV curvature)
void SCIPintervalSetBounds(SCIP_INTERVAL *resultant, SCIP_Real inf, SCIP_Real sup)
assert(minobj< SCIPgetCutoffbound(scip))
public functions to work with algebraic expressions
public methods for message output