Scippy

SCIP

Solving Constraint Integer Programs

objtable.h File Reference

Detailed Description

C++ wrapper for statistics tables.

Author
Tristan Gally

Definition in file objtable.h.

#include <cstring>
#include "scip/scip.h"
#include "objscip/objcloneable.h"

Go to the source code of this file.

Data Structures

class  scip::ObjTable
 C++ wrapper for statistics tables. More...
 

Namespaces

 scip
 

Functions

SCIP_RETCODE SCIPincludeObjTable (SCIP *scip, scip::ObjTable *objtable, SCIP_Bool deleteobject)
 
scip::ObjTableSCIPfindObjTable (SCIP *scip, const char *name)
 
scip::ObjTableSCIPgetObjTable (SCIP *scip, SCIP_TABLE *table)
 

Function Documentation

◆ SCIPincludeObjTable()

SCIP_RETCODE SCIPincludeObjTable ( SCIP scip,
scip::ObjTable objtable,
SCIP_Bool  deleteobject 
)

creates the statistics table for the given statistics table object and includes it in SCIP

The method should be called in one of the following ways:

  1. The user is resposible of deleting the object: SCIP_CALL( SCIPcreate(&scip) ); ... MyTable* mytable = new MyTable(...); SCIP_CALL( SCIPincludeObjTable(scip, &mytable, FALSE) ); ... SCIP_CALL( SCIPfree(&scip) ); delete mytable; // delete table AFTER SCIPfree() !
  2. The object pointer is passed to SCIP and deleted by SCIP in the SCIPfree() call: SCIP_CALL( SCIPcreate(&scip) ); ... SCIP_CALL( SCIPincludeObjTable(scip, new MyTable(...), TRUE) ); ... SCIP_CALL( SCIPfree(&scip) ); // destructor of MyTable is called here

creates the statistics table for the given statistics table object and includes it in SCIP

Parameters
scipSCIP data structure
objtablestatistics table object
deleteobjectshould the statistics table object be deleted when statistics table is freed?

Definition at line 195 of file objtable.cpp.

References NULL, SCIP_CALL, scip::ObjTable::scip_desc_, scip::ObjTable::scip_earlieststage_, scip::ObjTable::scip_name_, SCIP_OKAY, scip::ObjTable::scip_position_, SCIPincludeTable(), and TRUE.

Referenced by SCIP_DECL_TABLECOPY(), and scip::ObjTable::SCIP_DECL_TABLEEXITSOL().

◆ SCIPfindObjTable()

scip::ObjTable* SCIPfindObjTable ( SCIP scip,
const char *  name 
)

returns the statistics table object of the given name, or 0 if not existing

Parameters
scipSCIP data structure
namename of statistics table

Definition at line 220 of file objtable.cpp.

References NULL, SCIPfindTable(), and SCIPtableGetData().

Referenced by scip::ObjTable::SCIP_DECL_TABLEEXITSOL().

◆ SCIPgetObjTable()

scip::ObjTable* SCIPgetObjTable ( SCIP scip,
SCIP_TABLE table 
)

returns the statistics table object for the given statistics table

Parameters
scipSCIP data structure
tablestatistics table

Definition at line 239 of file objtable.cpp.

References NULL, and SCIPtableGetData().

Referenced by scip::ObjTable::SCIP_DECL_TABLEEXITSOL().