Scippy

SCIP

Solving Constraint Integer Programs

scip::ObjExprhdlr Class Referenceabstract

Detailed Description

C++ wrapper for expression handlers.

This class defines the interface for expression handlers implemented in C++. Note that there is a pure virtual function (which has to be implemented): the function scip_eval().

Definition at line 53 of file objexprhdlr.h.

C++ wrapper for expression handlers. More...

#include <objexprhdlr.h>

Public Member Functions

 ObjExprhdlr (SCIP *scip, const char *name, const char *desc, unsigned int precedence, SCIP_Bool has_copydata, SCIP_Bool has_freedata, SCIP_Bool has_simplify, SCIP_Bool has_compare, SCIP_Bool has_print, SCIP_Bool has_parse, SCIP_Bool has_bwdiff, SCIP_Bool has_fwdiff, SCIP_Bool has_bwfwdiff, SCIP_Bool has_inteval, SCIP_Bool has_estimate, SCIP_Bool has_initestimates, SCIP_Bool has_reverseprop, SCIP_Bool has_hash, SCIP_Bool has_curvature, SCIP_Bool has_monotonicity, SCIP_Bool has_integrality, SCIP_Bool has_getsymdata)
 
 ObjExprhdlr (const ObjExprhdlr &o)
 
 ObjExprhdlr (ObjExprhdlr &&o)
 
virtual ~ObjExprhdlr ()
 
ObjExprhdlroperator= (const ObjExprhdlr &o)=delete
 
ObjExprhdlroperator= (ObjExprhdlr &&o)=delete
 
virtual SCIP_DECL_EXPRFREEHDLR (scip_freehdlr)
 
virtual SCIP_DECL_EXPREVAL (scip_eval)=0
 
virtual SCIP_DECL_EXPRCOPYDATA (scip_copydata)
 
virtual SCIP_DECL_EXPRFREEDATA (scip_freedata)
 
virtual SCIP_DECL_EXPRSIMPLIFY (scip_simplify)
 
virtual SCIP_DECL_EXPRCOMPARE (scip_compare)
 
virtual SCIP_DECL_EXPRPRINT (scip_print)
 
virtual SCIP_DECL_EXPRPARSE (scip_parse)
 
virtual SCIP_DECL_EXPRBWDIFF (scip_bwdiff)
 
virtual SCIP_DECL_EXPRFWDIFF (scip_fwdiff)
 
virtual SCIP_DECL_EXPRBWFWDIFF (scip_bwfwdiff)
 
virtual SCIP_DECL_EXPRINTEVAL (scip_inteval)
 
virtual SCIP_DECL_EXPRESTIMATE (scip_estimate)
 
virtual SCIP_DECL_EXPRINITESTIMATES (scip_initestimates)
 
virtual SCIP_DECL_EXPRREVERSEPROP (scip_reverseprop)
 
virtual SCIP_DECL_EXPRHASH (scip_hash)
 
virtual SCIP_DECL_EXPRCURVATURE (scip_curvature)
 
virtual SCIP_DECL_EXPRMONOTONICITY (scip_monotonicity)
 
virtual SCIP_DECL_EXPRINTEGRALITY (scip_integrality)
 
virtual SCIP_DECL_EXPRGETSYMDATA (scip_getsymdata)
 
- Public Member Functions inherited from scip::ObjCloneable
virtual ~ObjCloneable ()
 
ObjCloneableoperator= (const ObjCloneable &o)=delete
 
ObjCloneableoperator= (ObjCloneable &&o)=delete
 
virtual SCIP_DECL_OBJCLONEABLECLONE (ObjCloneable *clone)
 
virtual SCIP_DECL_OBJCLONEABLEISCLONEABLE (iscloneable)
 

Data Fields

SCIPscip_
 
char * scip_name_
 
char * scip_desc_
 
const unsigned int scip_precedence_
 
const SCIP_Bool scip_has_copydata_
 
const SCIP_Bool scip_has_freedata_
 
const SCIP_Bool scip_has_simplify_
 
const SCIP_Bool scip_has_compare_
 
const SCIP_Bool scip_has_print_
 
const SCIP_Bool scip_has_parse_
 
const SCIP_Bool scip_has_bwdiff_
 
const SCIP_Bool scip_has_fwdiff_
 
const SCIP_Bool scip_has_bwfwdiff_
 
const SCIP_Bool scip_has_inteval_
 
const SCIP_Bool scip_has_estimate_
 
const SCIP_Bool scip_has_initestimates_
 
const SCIP_Bool scip_has_reverseprop_
 
const SCIP_Bool scip_has_hash_
 
const SCIP_Bool scip_has_curvature_
 
const SCIP_Bool scip_has_monotonicity_
 
const SCIP_Bool scip_has_integrality_
 
const SCIP_Bool scip_has_getsymdata_
 

Constructor & Destructor Documentation

◆ ObjExprhdlr() [1/3]

scip::ObjExprhdlr::ObjExprhdlr ( SCIP scip,
const char *  name,
const char *  desc,
unsigned int  precedence,
SCIP_Bool  has_copydata,
SCIP_Bool  has_freedata,
SCIP_Bool  has_simplify,
SCIP_Bool  has_compare,
SCIP_Bool  has_print,
SCIP_Bool  has_parse,
SCIP_Bool  has_bwdiff,
SCIP_Bool  has_fwdiff,
SCIP_Bool  has_bwfwdiff,
SCIP_Bool  has_inteval,
SCIP_Bool  has_estimate,
SCIP_Bool  has_initestimates,
SCIP_Bool  has_reverseprop,
SCIP_Bool  has_hash,
SCIP_Bool  has_curvature,
SCIP_Bool  has_monotonicity,
SCIP_Bool  has_integrality,
SCIP_Bool  has_getsymdata 
)
inline

default constructor

Parameters
scipSCIP data structure
namename of expression handler
descdescription of expression handler
precedenceprecedence of expression operation
has_copydatawhether scip_copydata is implemented
has_freedatawhether scip_freedata is implemented
has_simplifywhether scip_simplify is implemented
has_comparewhether scip_compare is implemented
has_printwhether scip_print is implemented
has_parsewhether scip_parse is implemented
has_bwdiffwhether scip_bwdiff is implemented
has_fwdiffwhether scip_fwdiff is implemented
has_bwfwdiffwhether scip_bwfwdiff is implemented
has_intevalwhether scip_inteval is implemented
has_estimatewhether scip_estimate is implemented
has_initestimateswhether scip_initestimates is implemented
has_reversepropwhether scip_reverseprop is implemented
has_hashwhether scip_hash is implemented
has_curvaturewhether scip_curvature is implemented
has_monotonicitywhether scip_monotonicity is implemented
has_integralitywhether scip_integrality is implemented
has_getsymdatawhether scip_getsymdata is implemented

Definition at line 125 of file objexprhdlr.h.

References scip_, SCIP_CALL_ABORT, scip_desc_, scip_name_, and SCIPduplicateMemoryArray.

◆ ObjExprhdlr() [2/3]

scip::ObjExprhdlr::ObjExprhdlr ( const ObjExprhdlr o)
inline

copy constructor

Definition at line 178 of file objexprhdlr.h.

◆ ObjExprhdlr() [3/3]

scip::ObjExprhdlr::ObjExprhdlr ( ObjExprhdlr &&  o)
inline

move constructor

Definition at line 193 of file objexprhdlr.h.

References scip_desc_, and scip_name_.

◆ ~ObjExprhdlr()

virtual scip::ObjExprhdlr::~ObjExprhdlr ( )
inlinevirtual

destructor

Definition at line 222 of file objexprhdlr.h.

References scip_, scip_desc_, scip_name_, and SCIPfreeMemoryArray.

Member Function Documentation

◆ operator=() [1/2]

ObjExprhdlr & scip::ObjExprhdlr::operator= ( const ObjExprhdlr o)
delete

assignment of polymorphic classes causes slicing and is therefore disabled.

◆ operator=() [2/2]

ObjExprhdlr & scip::ObjExprhdlr::operator= ( ObjExprhdlr &&  o)
delete

assignment of polymorphic classes causes slicing and is therefore disabled.

◆ SCIP_DECL_EXPRFREEHDLR()

virtual scip::ObjExprhdlr::SCIP_DECL_EXPRFREEHDLR ( scip_freehdlr  )
inlinevirtual

destructor of expression handler to free user data (called when SCIP is exiting)

See also
SCIP_DECL_EXPRFREEHDLR(x) in type_expr.h

Definition at line 240 of file objexprhdlr.h.

References SCIP_OKAY.

◆ SCIP_DECL_EXPREVAL()

virtual scip::ObjExprhdlr::SCIP_DECL_EXPREVAL ( scip_eval  )
pure virtual

point evaluation callback of expression handler

See also
SCIP_DECL_EXPREVAL(x) in type_expr.h

◆ SCIP_DECL_EXPRCOPYDATA()

virtual scip::ObjExprhdlr::SCIP_DECL_EXPRCOPYDATA ( scip_copydata  )
inlinevirtual

data copy callback of expression handler

This method MUST be overridden if scip_has_copydata_ is TRUE.

See also
SCIP_DECL_EXPRCOPYDATA(x) in type_expr.h

Definition at line 257 of file objexprhdlr.h.

References SCIP_NOTIMPLEMENTED.

◆ SCIP_DECL_EXPRFREEDATA()

virtual scip::ObjExprhdlr::SCIP_DECL_EXPRFREEDATA ( scip_freedata  )
inlinevirtual

data free callback of expression handler

This method MUST be overridden if scip_has_freedata_ is TRUE.

See also
SCIP_DECL_EXPRFREEDATA(x) in type_expr.h

Definition at line 269 of file objexprhdlr.h.

References SCIP_NOTIMPLEMENTED.

◆ SCIP_DECL_EXPRSIMPLIFY()

virtual scip::ObjExprhdlr::SCIP_DECL_EXPRSIMPLIFY ( scip_simplify  )
inlinevirtual

simplify callback of expression handler

This method MUST be overridden if scip_has_simplify_ is TRUE.

See also
SCIP_DECL_EXPRSIMPLIFY(x) in type_expr.h

Definition at line 281 of file objexprhdlr.h.

References SCIP_NOTIMPLEMENTED.

◆ SCIP_DECL_EXPRCOMPARE()

virtual scip::ObjExprhdlr::SCIP_DECL_EXPRCOMPARE ( scip_compare  )
inlinevirtual

compare callback of expression handler

This method MUST be overridden if scip_has_compare_ is TRUE.

See also
SCIP_DECL_EXPRCOMPARE(x) in type_expr.h

Definition at line 293 of file objexprhdlr.h.

◆ SCIP_DECL_EXPRPRINT()

virtual scip::ObjExprhdlr::SCIP_DECL_EXPRPRINT ( scip_print  )
inlinevirtual

print callback of expression handler

This method MUST be overridden if scip_has_print_ is TRUE.

See also
SCIP_DECL_EXPRPRINT(x) in type_expr.h

Definition at line 305 of file objexprhdlr.h.

References SCIP_NOTIMPLEMENTED.

◆ SCIP_DECL_EXPRPARSE()

virtual scip::ObjExprhdlr::SCIP_DECL_EXPRPARSE ( scip_parse  )
inlinevirtual

parse callback of expression handler

This method MUST be overridden if scip_has_parse_ is TRUE.

See also
SCIP_DECL_EXPRPARSE(x) in type_expr.h

Definition at line 317 of file objexprhdlr.h.

References SCIP_NOTIMPLEMENTED.

◆ SCIP_DECL_EXPRBWDIFF()

virtual scip::ObjExprhdlr::SCIP_DECL_EXPRBWDIFF ( scip_bwdiff  )
inlinevirtual

backward derivative evaluation callback of expression handler

This method MUST be overridden if scip_has_bwdiff_ is TRUE.

See also
SCIP_DECL_EXPRBWDIFF(x) in type_expr.h

Definition at line 329 of file objexprhdlr.h.

References SCIP_NOTIMPLEMENTED.

◆ SCIP_DECL_EXPRFWDIFF()

virtual scip::ObjExprhdlr::SCIP_DECL_EXPRFWDIFF ( scip_fwdiff  )
inlinevirtual

forward derivative evaluation callback of expression handler

This method MUST be overridden if scip_has_fwdiff_ is TRUE.

See also
SCIP_DECL_EXPRFWDIFF(x) in type_expr.h

Definition at line 341 of file objexprhdlr.h.

References SCIP_NOTIMPLEMENTED.

◆ SCIP_DECL_EXPRBWFWDIFF()

virtual scip::ObjExprhdlr::SCIP_DECL_EXPRBWFWDIFF ( scip_bwfwdiff  )
inlinevirtual

backward over forward derivative evaluation callback of expression handler

This method MUST be overridden if scip_has_bwfwdiff_ is TRUE.

See also
SCIP_DECL_EXPRBWFWDIFF(x) in type_expr.h

Definition at line 353 of file objexprhdlr.h.

References SCIP_NOTIMPLEMENTED.

◆ SCIP_DECL_EXPRINTEVAL()

virtual scip::ObjExprhdlr::SCIP_DECL_EXPRINTEVAL ( scip_inteval  )
inlinevirtual

interval evaluation callback of expression handler

This method MUST be overridden if scip_has_inteval_ is TRUE.

See also
SCIP_DECL_EXPRINTEVAL(x) in type_expr.h

Definition at line 365 of file objexprhdlr.h.

References SCIP_NOTIMPLEMENTED.

◆ SCIP_DECL_EXPRESTIMATE()

virtual scip::ObjExprhdlr::SCIP_DECL_EXPRESTIMATE ( scip_estimate  )
inlinevirtual

estimation callback of expression handler

This method MUST be overridden if scip_has_estimate_ is TRUE.

See also
SCIP_DECL_EXPRESTIMATE(x) in type_expr.h

Definition at line 377 of file objexprhdlr.h.

References SCIP_NOTIMPLEMENTED.

◆ SCIP_DECL_EXPRINITESTIMATES()

virtual scip::ObjExprhdlr::SCIP_DECL_EXPRINITESTIMATES ( scip_initestimates  )
inlinevirtual

initial estimators callback of expression handler

This method MUST be overridden if scip_has_initestimates_ is TRUE.

See also
SCIP_DECL_EXPRINITESTIMATES(x) in type_expr.h

Definition at line 389 of file objexprhdlr.h.

References SCIP_NOTIMPLEMENTED.

◆ SCIP_DECL_EXPRREVERSEPROP()

virtual scip::ObjExprhdlr::SCIP_DECL_EXPRREVERSEPROP ( scip_reverseprop  )
inlinevirtual

reverse propagation callback of expression handler

This method MUST be overridden if scip_has_reverseprop_ is TRUE.

See also
SCIP_DECL_EXPRREVERSEPROP(x) in type_expr.h

Definition at line 401 of file objexprhdlr.h.

References SCIP_NOTIMPLEMENTED.

◆ SCIP_DECL_EXPRHASH()

virtual scip::ObjExprhdlr::SCIP_DECL_EXPRHASH ( scip_hash  )
inlinevirtual

hash callback of expression handler

This method MUST be overridden if scip_has_hash_ is TRUE.

See also
SCIP_DECL_EXPRHASH(x) in type_expr.h

Definition at line 413 of file objexprhdlr.h.

References SCIP_NOTIMPLEMENTED.

◆ SCIP_DECL_EXPRCURVATURE()

virtual scip::ObjExprhdlr::SCIP_DECL_EXPRCURVATURE ( scip_curvature  )
inlinevirtual

curvature callback of expression handler

This method MUST be overridden if scip_has_curvature_ is TRUE.

See also
SCIP_DECL_EXPRCURVATURE(x) in type_expr.h

Definition at line 425 of file objexprhdlr.h.

References SCIP_NOTIMPLEMENTED.

◆ SCIP_DECL_EXPRMONOTONICITY()

virtual scip::ObjExprhdlr::SCIP_DECL_EXPRMONOTONICITY ( scip_monotonicity  )
inlinevirtual

monotonicity callback of expression handler

This method MUST be overridden if scip_has_monotonicity_ is TRUE.

See also
SCIP_DECL_EXPRMONOTONICITY(x) in type_expr.h

Definition at line 437 of file objexprhdlr.h.

References SCIP_NOTIMPLEMENTED.

◆ SCIP_DECL_EXPRINTEGRALITY()

virtual scip::ObjExprhdlr::SCIP_DECL_EXPRINTEGRALITY ( scip_integrality  )
inlinevirtual

integrality callback of expression handler

This method MUST be overridden if scip_has_integrality_ is TRUE.

See also
SCIP_DECL_EXPRINTEGRALITY(x) in type_expr.h

Definition at line 449 of file objexprhdlr.h.

References SCIP_NOTIMPLEMENTED.

◆ SCIP_DECL_EXPRGETSYMDATA()

virtual scip::ObjExprhdlr::SCIP_DECL_EXPRGETSYMDATA ( scip_getsymdata  )
inlinevirtual

symmetry information callback of expression handler

This method MUST be overridden if scip_has_getsymdata_ is TRUE.

See also
SCIP_DECL_EXPRGETSYMDATA(x) in type_expr.h

Definition at line 461 of file objexprhdlr.h.

References SCIP_NOTIMPLEMENTED.

Field Documentation

◆ scip_

SCIP* scip::ObjExprhdlr::scip_

SCIP data structure

Definition at line 59 of file objexprhdlr.h.

Referenced by ObjExprhdlr(), SCIPincludeObjExprhdlr(), and ~ObjExprhdlr().

◆ scip_name_

char* scip::ObjExprhdlr::scip_name_

name of the expression handler

Definition at line 62 of file objexprhdlr.h.

Referenced by ObjExprhdlr(), SCIPincludeObjExprhdlr(), and ~ObjExprhdlr().

◆ scip_desc_

char* scip::ObjExprhdlr::scip_desc_

description of the expression handler

Definition at line 65 of file objexprhdlr.h.

Referenced by ObjExprhdlr(), SCIPincludeObjExprhdlr(), and ~ObjExprhdlr().

◆ scip_precedence_

const unsigned int scip::ObjExprhdlr::scip_precedence_

precedence of expression operation relative to other expression (used for printing)

Definition at line 68 of file objexprhdlr.h.

Referenced by SCIPincludeObjExprhdlr().

◆ scip_has_copydata_

const SCIP_Bool scip::ObjExprhdlr::scip_has_copydata_

whether scip_copydata is implemented

Definition at line 71 of file objexprhdlr.h.

Referenced by SCIPincludeObjExprhdlr().

◆ scip_has_freedata_

const SCIP_Bool scip::ObjExprhdlr::scip_has_freedata_

whether scip_freedata is implemented

Definition at line 74 of file objexprhdlr.h.

Referenced by SCIPincludeObjExprhdlr().

◆ scip_has_simplify_

const SCIP_Bool scip::ObjExprhdlr::scip_has_simplify_

whether scip_simplify is implemented

Definition at line 77 of file objexprhdlr.h.

Referenced by SCIPincludeObjExprhdlr().

◆ scip_has_compare_

const SCIP_Bool scip::ObjExprhdlr::scip_has_compare_

whether scip_compare is implemented

Definition at line 80 of file objexprhdlr.h.

Referenced by SCIPincludeObjExprhdlr().

◆ scip_has_print_

const SCIP_Bool scip::ObjExprhdlr::scip_has_print_

whether scip_print is implemented

Definition at line 83 of file objexprhdlr.h.

Referenced by SCIPincludeObjExprhdlr().

◆ scip_has_parse_

const SCIP_Bool scip::ObjExprhdlr::scip_has_parse_

whether scip_parse is implemented

Definition at line 86 of file objexprhdlr.h.

Referenced by SCIPincludeObjExprhdlr().

◆ scip_has_bwdiff_

const SCIP_Bool scip::ObjExprhdlr::scip_has_bwdiff_

whether scip_bwdiff is implemented

Definition at line 89 of file objexprhdlr.h.

Referenced by SCIPincludeObjExprhdlr().

◆ scip_has_fwdiff_

const SCIP_Bool scip::ObjExprhdlr::scip_has_fwdiff_

whether scip_fwdiff is implemented

Definition at line 92 of file objexprhdlr.h.

Referenced by SCIPincludeObjExprhdlr().

◆ scip_has_bwfwdiff_

const SCIP_Bool scip::ObjExprhdlr::scip_has_bwfwdiff_

whether scip_bwfwdiff is implemented

Definition at line 95 of file objexprhdlr.h.

Referenced by SCIPincludeObjExprhdlr().

◆ scip_has_inteval_

const SCIP_Bool scip::ObjExprhdlr::scip_has_inteval_

whether scip_inteval is implemented

Definition at line 98 of file objexprhdlr.h.

Referenced by SCIPincludeObjExprhdlr().

◆ scip_has_estimate_

const SCIP_Bool scip::ObjExprhdlr::scip_has_estimate_

whether scip_estimate is implemented

Definition at line 101 of file objexprhdlr.h.

Referenced by SCIPincludeObjExprhdlr().

◆ scip_has_initestimates_

const SCIP_Bool scip::ObjExprhdlr::scip_has_initestimates_

whether scip_initestimates is implemented

Definition at line 104 of file objexprhdlr.h.

Referenced by SCIPincludeObjExprhdlr().

◆ scip_has_reverseprop_

const SCIP_Bool scip::ObjExprhdlr::scip_has_reverseprop_

whether scip_reverseprop is implemented

Definition at line 107 of file objexprhdlr.h.

Referenced by SCIPincludeObjExprhdlr().

◆ scip_has_hash_

const SCIP_Bool scip::ObjExprhdlr::scip_has_hash_

whether scip_hash is implemented

Definition at line 110 of file objexprhdlr.h.

Referenced by SCIPincludeObjExprhdlr().

◆ scip_has_curvature_

const SCIP_Bool scip::ObjExprhdlr::scip_has_curvature_

whether scip_curvature is implemented

Definition at line 113 of file objexprhdlr.h.

Referenced by SCIPincludeObjExprhdlr().

◆ scip_has_monotonicity_

const SCIP_Bool scip::ObjExprhdlr::scip_has_monotonicity_

whether scip_monotonicity is implemented

Definition at line 116 of file objexprhdlr.h.

Referenced by SCIPincludeObjExprhdlr().

◆ scip_has_integrality_

const SCIP_Bool scip::ObjExprhdlr::scip_has_integrality_

whether scip_integrality is implemented

Definition at line 119 of file objexprhdlr.h.

Referenced by SCIPincludeObjExprhdlr().

◆ scip_has_getsymdata_

const SCIP_Bool scip::ObjExprhdlr::scip_has_getsymdata_

whether scip_getsymdata is implemented

Definition at line 122 of file objexprhdlr.h.

Referenced by SCIPincludeObjExprhdlr().