SCIP Doxygen Documentation
Loading...
Searching...
No Matches

Detailed Description

functions for managing data trees

Functions

SCIP_RETCODE SCIPdatatreeGetBool (SCIP_DATATREE *datatree, const char *name, SCIP_Bool *value)
SCIP_RETCODE SCIPdatatreeGetLong (SCIP_DATATREE *datatree, const char *name, SCIP_Longint *value)
SCIP_RETCODE SCIPdatatreeGetReal (SCIP_DATATREE *datatree, const char *name, SCIP_Real *value)
SCIP_RETCODE SCIPdatatreeGetString (SCIP_DATATREE *datatree, const char *name, const char **value)
SCIP_RETCODE SCIPdatatreeGetBoolArray (SCIP_DATATREE *datatree, const char *name, SCIP_Bool **values, int *nvalues)
SCIP_RETCODE SCIPdatatreeGetLongArray (SCIP_DATATREE *datatree, const char *name, SCIP_Longint **values, int *nvalues)
SCIP_RETCODE SCIPdatatreeGetRealArray (SCIP_DATATREE *datatree, const char *name, SCIP_Real **values, int *nvalues)
SCIP_RETCODE SCIPdatatreeGetStringArray (SCIP_DATATREE *datatree, const char *name, char ***values, int *nvalues)
SCIP_RETCODE SCIPdatatreeGetTree (SCIP_DATATREE *datatree, const char *name, SCIP_DATATREE **value)
SCIP_RETCODE SCIPcreateDatatree (SCIP *scip, SCIP_DATATREE **datatree, int capacity)
SCIP_RETCODE SCIPcreateDatatreeInTree (SCIP *scip, SCIP_DATATREE *datatree, SCIP_DATATREE **newtree, const char *name, int capacity)
SCIP_RETCODE SCIPinsertDatatreeBool (SCIP *scip, SCIP_DATATREE *datatree, const char *name, SCIP_Bool value)
SCIP_RETCODE SCIPinsertDatatreeInt (SCIP *scip, SCIP_DATATREE *datatree, const char *name, int value)
SCIP_RETCODE SCIPinsertDatatreeLong (SCIP *scip, SCIP_DATATREE *datatree, const char *name, SCIP_Longint value)
SCIP_RETCODE SCIPinsertDatatreeReal (SCIP *scip, SCIP_DATATREE *datatree, const char *name, SCIP_Real value)
SCIP_RETCODE SCIPinsertDatatreeString (SCIP *scip, SCIP_DATATREE *datatree, const char *name, const char *value)
SCIP_RETCODE SCIPinsertDatatreeBoolArray (SCIP *scip, SCIP_DATATREE *datatree, const char *name, const SCIP_Bool *values, int nvalues)
SCIP_RETCODE SCIPinsertDatatreeIntArray (SCIP *scip, SCIP_DATATREE *datatree, const char *name, const int *values, int nvalues)
SCIP_RETCODE SCIPinsertDatatreeLongArray (SCIP *scip, SCIP_DATATREE *datatree, const char *name, const SCIP_Longint *values, int nvalues)
SCIP_RETCODE SCIPinsertDatatreeRealArray (SCIP *scip, SCIP_DATATREE *datatree, const char *name, const SCIP_Real *values, int nvalues)
SCIP_RETCODE SCIPinsertDatatreeStringArray (SCIP *scip, SCIP_DATATREE *datatree, const char *name, const char *const *values, int nvalues)
SCIP_RETCODE SCIPinsertDatatreeTree (SCIP *scip, SCIP_DATATREE *datatree, const char *name, SCIP_DATATREE *value)
void SCIPfreeDatatree (SCIP *scip, SCIP_DATATREE **datatree)
SCIP_RETCODE SCIPwriteDatatreeJson (SCIP *scip, FILE *file, SCIP_DATATREE *datatree)
SCIP_RETCODE SCIPprintDatatreeAsTable (SCIP *scip, SCIP_DATATREE *datatree, FILE *file, const char *sectionname, const char *tablename)

Function Documentation

◆ SCIPdatatreeGetBool()

SCIP_RETCODE SCIPdatatreeGetBool ( SCIP_DATATREE * datatree,
const char * name,
SCIP_Bool * value )

gets a SCIP_Bool value from a SCIP_DATATREE object

gets a bool value from a SCIP_DATATREE object

Parameters
datatreedata tree
namename to look up
valuebuffer to store value

Definition at line 600 of file datatree.c.

References SCIP_DATATREEVALUEUNION::as_bool, assert(), SCIP_DATATREEVALUE::data, datatreeValueTypeToString(), i, SCIP_Datatree::items, SCIP_DATATREEITEM::name, SCIP_Datatree::nitems, NULL, SCIP_Bool, SCIP_DATATREE_BOOL, SCIP_ERROR, SCIP_OKAY, SCIPerrorMessage, SCIP_DATATREEVALUE::type, and SCIP_DATATREEITEM::value.

Referenced by SCIPprintDatatreeAsTable().

◆ SCIPdatatreeGetLong()

SCIP_RETCODE SCIPdatatreeGetLong ( SCIP_DATATREE * datatree,
const char * name,
SCIP_Longint * value )

◆ SCIPdatatreeGetReal()

SCIP_RETCODE SCIPdatatreeGetReal ( SCIP_DATATREE * datatree,
const char * name,
SCIP_Real * value )

◆ SCIPdatatreeGetString()

SCIP_RETCODE SCIPdatatreeGetString ( SCIP_DATATREE * datatree,
const char * name,
const char ** value )

gets a string value from a SCIP_DATATREE object

Parameters
datatreedata tree
namename to look up
valuebuffer to store pointer to string

Definition at line 687 of file datatree.c.

References SCIP_DATATREEVALUEUNION::as_string, assert(), SCIP_DATATREEVALUE::data, datatreeValueTypeToString(), i, SCIP_Datatree::items, SCIP_DATATREEITEM::name, SCIP_Datatree::nitems, NULL, SCIP_DATATREE_STRING, SCIP_ERROR, SCIP_OKAY, SCIPerrorMessage, SCIP_DATATREEVALUE::type, and SCIP_DATATREEITEM::value.

Referenced by SCIPprintDatatreeAsTable().

◆ SCIPdatatreeGetBoolArray()

SCIP_RETCODE SCIPdatatreeGetBoolArray ( SCIP_DATATREE * datatree,
const char * name,
SCIP_Bool ** values,
int * nvalues )

gets a SCIP_Bool array from a SCIP_DATATREE object

gets a bool array from a SCIP_DATATREE object

Parameters
datatreedata tree
namename to look up
valuesbuffer to store pointer to values
nvaluesbuffer to store number of values

Definition at line 716 of file datatree.c.

References SCIP_DATATREEVALUEUNION::as_boolarray, assert(), SCIP_DATATREEVALUE::data, datatreeValueTypeToString(), i, SCIP_Datatree::items, SCIP_DATATREEITEM::name, SCIP_Datatree::nitems, NULL, SCIP_DATATREEVALUE::nvalues, SCIP_Bool, SCIP_DATATREE_BOOLARRAY, SCIP_ERROR, SCIP_OKAY, SCIPerrorMessage, SCIP_DATATREEVALUE::type, and SCIP_DATATREEITEM::value.

◆ SCIPdatatreeGetLongArray()

SCIP_RETCODE SCIPdatatreeGetLongArray ( SCIP_DATATREE * datatree,
const char * name,
SCIP_Longint ** values,
int * nvalues )

gets a SCIP_Longint array from a SCIP_DATATREE object

Parameters
datatreedata tree
namename to look up
valuesbuffer to store pointer to values
nvaluesbuffer to store number of values

Definition at line 752 of file datatree.c.

References SCIP_DATATREEVALUEUNION::as_longarray, assert(), SCIP_DATATREEVALUE::data, datatreeValueTypeToString(), i, SCIP_Datatree::items, SCIP_DATATREEITEM::name, SCIP_Datatree::nitems, NULL, SCIP_DATATREEVALUE::nvalues, SCIP_DATATREE_LONGARRAY, SCIP_ERROR, SCIP_Longint, SCIP_OKAY, SCIPerrorMessage, SCIP_DATATREEVALUE::type, and SCIP_DATATREEITEM::value.

◆ SCIPdatatreeGetRealArray()

SCIP_RETCODE SCIPdatatreeGetRealArray ( SCIP_DATATREE * datatree,
const char * name,
SCIP_Real ** values,
int * nvalues )

gets a SCIP_Real array from a SCIP_DATATREE object

Parameters
datatreedata tree
namename to look up
valuesbuffer to store pointer to values
nvaluesbuffer to store number of values

Definition at line 788 of file datatree.c.

References SCIP_DATATREEVALUEUNION::as_realarray, assert(), SCIP_DATATREEVALUE::data, datatreeValueTypeToString(), i, SCIP_Datatree::items, SCIP_DATATREEITEM::name, SCIP_Datatree::nitems, NULL, SCIP_DATATREEVALUE::nvalues, SCIP_DATATREE_REALARRAY, SCIP_ERROR, SCIP_OKAY, SCIP_Real, SCIPerrorMessage, SCIP_DATATREEVALUE::type, and SCIP_DATATREEITEM::value.

◆ SCIPdatatreeGetStringArray()

SCIP_RETCODE SCIPdatatreeGetStringArray ( SCIP_DATATREE * datatree,
const char * name,
char *** values,
int * nvalues )

gets a string array from a SCIP_DATATREE object

Parameters
datatreedata tree
namename to look up
valuesbuffer to store pointer to values
nvaluesbuffer to store number of values

Definition at line 825 of file datatree.c.

References SCIP_DATATREEVALUEUNION::as_stringarray, assert(), SCIP_DATATREEVALUE::data, datatreeValueTypeToString(), i, SCIP_Datatree::items, SCIP_DATATREEITEM::name, SCIP_Datatree::nitems, NULL, SCIP_DATATREEVALUE::nvalues, SCIP_DATATREE_STRINGARRAY, SCIP_ERROR, SCIP_OKAY, SCIPerrorMessage, SCIP_DATATREEVALUE::type, and SCIP_DATATREEITEM::value.

◆ SCIPdatatreeGetTree()

SCIP_RETCODE SCIPdatatreeGetTree ( SCIP_DATATREE * datatree,
const char * name,
SCIP_DATATREE ** value )

gets a data tree value from a SCIP_DATATREE object

gets a datatree value from a SCIP_DATATREE object

Parameters
datatreedata tree
namename to look up
valuebuffer to store pointer to datatree

Definition at line 861 of file datatree.c.

References SCIP_DATATREEVALUEUNION::as_dtree, assert(), SCIP_DATATREEVALUE::data, datatreeValueTypeToString(), i, SCIP_Datatree::items, SCIP_DATATREEITEM::name, SCIP_Datatree::nitems, NULL, SCIP_DATATREE_DATATREE, SCIP_ERROR, SCIP_OKAY, SCIPerrorMessage, SCIP_DATATREEVALUE::type, and SCIP_DATATREEITEM::value.

Referenced by SCIPprintDatatreeAsTable().

◆ SCIPcreateDatatree()

SCIP_RETCODE SCIPcreateDatatree ( SCIP * scip,
SCIP_DATATREE ** datatree,
int capacity )

creates a new SCIP_DATATREE

Parameters
scipSCIP data structure
datatreebuffer to store created data tree
capacitydesired capacity, or -1 for default

Definition at line 46 of file scip_datatree.c.

References assert(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPdatatreeCreate().

Referenced by scip::SCIP_DECL_TABLEOUTPUT(), and SCIPprintStatisticsJson().

◆ SCIPcreateDatatreeInTree()

◆ SCIPinsertDatatreeBool()

SCIP_RETCODE SCIPinsertDatatreeBool ( SCIP * scip,
SCIP_DATATREE * datatree,
const char * name,
SCIP_Bool value )

inserts a bool value into a SCIP_DATATREE object

Parameters
scipSCIP data structure
datatreedata tree
namename of entry to add
valuevalue to add

Definition at line 82 of file scip_datatree.c.

References assert(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, and SCIPdatatreeInsertBool().

Referenced by collectNeighborhoodStatistics(), and SCIPcollectSolutionStatistics().

◆ SCIPinsertDatatreeInt()

◆ SCIPinsertDatatreeLong()

◆ SCIPinsertDatatreeReal()

◆ SCIPinsertDatatreeString()

◆ SCIPinsertDatatreeBoolArray()

SCIP_RETCODE SCIPinsertDatatreeBoolArray ( SCIP * scip,
SCIP_DATATREE * datatree,
const char * name,
const SCIP_Bool * values,
int nvalues )

inserts a SCIP_Bool array into a SCIP_DATATREE object

Parameters
scipSCIP data structure
datatreedata tree
namename of entry to add
valuesvalues of entry
nvaluesnumber of values

Definition at line 174 of file scip_datatree.c.

References assert(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, and SCIPdatatreeInsertBoolArray().

◆ SCIPinsertDatatreeIntArray()

SCIP_RETCODE SCIPinsertDatatreeIntArray ( SCIP * scip,
SCIP_DATATREE * datatree,
const char * name,
const int * values,
int nvalues )

inserts an int array into a SCIP_DATATREE object

The value will be stored as array of SCIP_Longint.

Parameters
scipSCIP data structure
datatreedata tree
namename of entry to add
valuesvalues of entry
nvaluesnumber of values

Definition at line 197 of file scip_datatree.c.

References assert(), i, NULL, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIPallocBufferArray, SCIPdatatreeInsertLongArray(), and SCIPfreeBufferArray.

◆ SCIPinsertDatatreeLongArray()

SCIP_RETCODE SCIPinsertDatatreeLongArray ( SCIP * scip,
SCIP_DATATREE * datatree,
const char * name,
const SCIP_Longint * values,
int nvalues )

inserts a SCIP_Longint array into a SCIP_DATATREE object

Parameters
scipSCIP data structure
datatreedata tree
namename of entry to add
valuesvalues of entry
nvaluesnumber of values

Definition at line 246 of file scip_datatree.c.

References assert(), NULL, SCIP_CALL, SCIP_Longint, SCIP_OKAY, and SCIPdatatreeInsertLongArray().

◆ SCIPinsertDatatreeRealArray()

SCIP_RETCODE SCIPinsertDatatreeRealArray ( SCIP * scip,
SCIP_DATATREE * datatree,
const char * name,
const SCIP_Real * values,
int nvalues )

inserts a SCIP_Real array into a SCIP_DATATREE object

Parameters
scipSCIP data structure
datatreedata tree
namename of entry to add
valuesvalues of entry
nvaluesnumber of values

Definition at line 226 of file scip_datatree.c.

References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, and SCIPdatatreeInsertRealArray().

◆ SCIPinsertDatatreeStringArray()

SCIP_RETCODE SCIPinsertDatatreeStringArray ( SCIP * scip,
SCIP_DATATREE * datatree,
const char * name,
const char *const * values,
int nvalues )

inserts a string array into a SCIP_DATATREE object

Parameters
scipSCIP data structure
datatreedata tree
namename of entry to add
valuesvalues of entry
nvaluesnumber of values

Definition at line 266 of file scip_datatree.c.

References assert(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPdatatreeInsertStringArray().

◆ SCIPinsertDatatreeTree()

SCIP_RETCODE SCIPinsertDatatreeTree ( SCIP * scip,
SCIP_DATATREE * datatree,
const char * name,
SCIP_DATATREE * value )

inserts a data tree value into a SCIP_DATATREE object

The data tree assumes ownership of value.

Parameters
scipSCIP data structure
datatreedata tree
namename of entry to add
valuevalue to add

Definition at line 289 of file scip_datatree.c.

References assert(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPdatatreeInsertTree().

◆ SCIPfreeDatatree()

void SCIPfreeDatatree ( SCIP * scip,
SCIP_DATATREE ** datatree )

frees a SCIP_DATATREE object

Parameters
scipSCIP data structure
datatreepointer to data tree to free

Definition at line 307 of file scip_datatree.c.

References assert(), NULL, and SCIPdatatreeFree().

Referenced by scip::SCIP_DECL_TABLEOUTPUT(), and SCIPprintStatisticsJson().

◆ SCIPwriteDatatreeJson()

SCIP_RETCODE SCIPwriteDatatreeJson ( SCIP * scip,
FILE * file,
SCIP_DATATREE * datatree )

writes a SCIP_DATATREE object as JSON to a file

Parameters
scipSCIP data structure
filefile to write to, or NULL for stdout
datatreedata tree to write

Definition at line 319 of file scip_datatree.c.

References assert(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPdatatreeWriteJson().

Referenced by SCIPprintStatisticsJson().

◆ SCIPprintDatatreeAsTable()

SCIP_RETCODE SCIPprintDatatreeAsTable ( SCIP * scip,
SCIP_DATATREE * datatree,
FILE * file,
const char * sectionname,
const char * tablename )