GOBNILP
f164d83
|
Contains functions related to managing PropertyData. More...
#include "property_data.h"
#include "parent_set_data.h"
#include "utils.h"
#include <stdint.h>
#include <string.h>
Functions | |
SCIP_RETCODE | PR_copyPropertyData (SCIP *scip, PropertyData *original, PropertyData **duplicate) |
Makes a deep copy of a PropertyData structure. More... | |
SCIP_RETCODE | PR_deallocatePropertyData (SCIP *scip, PropertyData **pd) |
Deallocates the memory associated with a PropertyData structure. More... | |
char * | PR_getGlobalProperty (SCIP *scip, PropertyData *pd, const char *name) |
Get the value of a global property. More... | |
char * | PR_getProperty (SCIP *scip, PropertyData *pd, int individual, const char *name) |
Returns the value of a given property for a given individual. More... | |
SCIP_Bool | PR_hasGlobalProperty (SCIP *scip, PropertyData *pd, const char *name) |
Find out whether a string is a global property. More... | |
SCIP_Bool | PR_hasProperty (SCIP *scip, PropertyData *pd, int individual, const char *name) |
Does a property data structure have a given property for a given individual? More... | |
void | PR_initialise (PropertyData *pd) |
Initialises a data structure with empty values. More... | |
SCIP_RETCODE | PR_parse (SCIP *scip, char *str, PropertyData **pd) |
Parses a PropertyData structure from a sting. More... | |
SCIP_RETCODE | PR_setGlobalProperty (SCIP *scip, PropertyData *pd, const char *name, const char *value) |
Set a global property to a given value. More... | |
SCIP_RETCODE | PR_setGlobalPropertyFromArray (SCIP *scip, PropertyData *pd, const char *name, const char **value, int length) |
Set a global property to a given value Value is converted from an array of strings to a string. More... | |
SCIP_RETCODE | PR_setGlobalPropertyFromBool (SCIP *scip, PropertyData *pd, const char *name, SCIP_Bool value) |
Set a global property to a given value Value is converted from a SCIP_Bool to a string. More... | |
SCIP_RETCODE | PR_setGlobalPropertyFromInt (SCIP *scip, PropertyData *pd, const char *name, int value) |
Set a global property to a given value. More... | |
SCIP_RETCODE | PR_setGlobalPropertyFromReal (SCIP *scip, PropertyData *pd, const char *name, SCIP_Real value) |
Set a global property to a given value Value is converted from a SCIP_Real to a string. More... | |
SCIP_RETCODE | PR_setGlobalPropertyFromRealArray (SCIP *scip, PropertyData *pd, const char *name, SCIP_Real *value, int length) |
Set a global property to a given value Value is converted from an array of reals to a string. More... | |
SCIP_RETCODE | PR_setProperty (SCIP *scip, PropertyData *pd, int individual, const char *name, const char *value) |
Set a property for an individual to a given value. More... | |
SCIP_RETCODE | PR_setPropertyFromArray (SCIP *scip, PropertyData *pd, int individual, const char *name, const char **value, int length) |
Set a property for an individual to a given value Value is converted from an array of strings to a string. More... | |
SCIP_RETCODE | PR_setPropertyFromBool (SCIP *scip, PropertyData *pd, int individual, const char *name, SCIP_Bool value) |
Set a property for an individual to a given value Value is converted from a SCIP_Bool to a string. More... | |
SCIP_RETCODE | PR_setPropertyFromInt (SCIP *scip, PropertyData *pd, int individual, const char *name, int value) |
Set a property for an individual to a given value Value is converted from an int to a string. More... | |
SCIP_RETCODE | PR_setPropertyFromReal (SCIP *scip, PropertyData *pd, int individual, const char *name, SCIP_Real value) |
Set a property for an individual to a given value Value is converted from a SCIP_Real to a string. More... | |
SCIP_RETCODE | PR_setPropertyFromRealArray (SCIP *scip, PropertyData *pd, int individual, const char *name, SCIP_Real *value, int length) |
Set a property for an individual to a given value Value is converted from an array of reals to a string. More... | |
SCIP_RETCODE | PR_writeToFile (SCIP *scip, FILE *file, PropertyData *pd) |
Writes a PropertyData structure to file. More... | |
Contains functions related to managing PropertyData.
SCIP_RETCODE PR_copyPropertyData | ( | SCIP * | scip, |
PropertyData * | original, | ||
PropertyData ** | duplicate | ||
) |
Makes a deep copy of a PropertyData structure.
scip | The SCIP instance to which the data belongs. |
original | The original data structure. |
duplicate | A pointer to the duplicated data structure. |
References PropertyData::global_property_names, PropertyData::global_property_values, PropertyData::n, PropertyData::num_global, PropertyData::num_properties, PropertyData::property_names, and PropertyData::property_values.
Referenced by MD_setPropertyData().
SCIP_RETCODE PR_deallocatePropertyData | ( | SCIP * | scip, |
PropertyData ** | pd | ||
) |
Deallocates the memory associated with a PropertyData structure.
scip | The SCIP instance which the data refers to. |
pd | A pointer to the data structure to deallocate. |
Referenced by readProblemInNonCIPFormat(), and SCIP_DECL_CONSFREE().
char* PR_getGlobalProperty | ( | SCIP * | scip, |
PropertyData * | pd, | ||
const char * | name | ||
) |
Get the value of a global property.
scip | SCIP data structure (not used) |
pd | Property data structure |
name | Global property whose value is sought |
References PropertyData::global_property_names, PropertyData::global_property_values, and PropertyData::num_global.
char* PR_getProperty | ( | SCIP * | scip, |
PropertyData * | pd, | ||
int | individual, | ||
const char * | name | ||
) |
Returns the value of a given property for a given individual.
scip | SCIP data structure |
pd | Property data structure |
individual | Individual |
name | Property name |
References PropertyData::num_properties, PropertyData::property_names, and PropertyData::property_values.
SCIP_Bool PR_hasGlobalProperty | ( | SCIP * | scip, |
PropertyData * | pd, | ||
const char * | name | ||
) |
Find out whether a string is a global property.
scip | SCIP data structure (not used) |
pd | Property data structure |
name | String to be queried |
References PropertyData::global_property_names, and PropertyData::num_global.
SCIP_Bool PR_hasProperty | ( | SCIP * | scip, |
PropertyData * | pd, | ||
int | individual, | ||
const char * | name | ||
) |
Does a property data structure have a given property for a given individual?
scip | SCIP data structure |
pd | Property data structure |
individual | Individual |
name | Property name |
References PropertyData::num_properties, and PropertyData::property_names.
void PR_initialise | ( | PropertyData * | pd | ) |
Initialises a data structure with empty values.
pd | The data structure to initialise. |
References PropertyData::global_property_names, PropertyData::global_property_values, PropertyData::n, PropertyData::num_global, PropertyData::num_properties, PropertyData::property_names, and PropertyData::property_values.
Referenced by readProblemInNonCIPFormat().
SCIP_RETCODE PR_parse | ( | SCIP * | scip, |
char * | str, | ||
PropertyData ** | pd | ||
) |
Parses a PropertyData structure from a sting.
scip | The SCIP instance the data will belong to. |
str | The string to parse. |
pd | A pointer to the data structure resulting from parsing. |
References UT_parseArray(), and UT_parseStringArray().
Referenced by SCIP_DECL_CONSPARSE().
SCIP_RETCODE PR_setGlobalProperty | ( | SCIP * | scip, |
PropertyData * | pd, | ||
const char * | name, | ||
const char * | value | ||
) |
Set a global property to a given value.
scip | SCIP data structure |
pd | Property data structure |
name | Global property to be set |
value | Value of global property |
References PropertyData::global_property_names, PropertyData::global_property_values, and PropertyData::num_global.
Referenced by PR_setGlobalPropertyFromArray(), PR_setGlobalPropertyFromBool(), PR_setGlobalPropertyFromInt(), PR_setGlobalPropertyFromReal(), and PR_setGlobalPropertyFromRealArray().
SCIP_RETCODE PR_setGlobalPropertyFromArray | ( | SCIP * | scip, |
PropertyData * | pd, | ||
const char * | name, | ||
const char ** | value, | ||
int | length | ||
) |
Set a global property to a given value Value is converted from an array of strings to a string.
scip | SCIP data structure |
pd | Property data structure |
name | Global property to be set |
value | Value for the global property |
length | Length of the array |
References PR_setGlobalProperty().
SCIP_RETCODE PR_setGlobalPropertyFromBool | ( | SCIP * | scip, |
PropertyData * | pd, | ||
const char * | name, | ||
SCIP_Bool | value | ||
) |
Set a global property to a given value Value is converted from a SCIP_Bool to a string.
scip | SCIP data structure |
pd | Property data structure |
name | Global property to be set |
value | Value for the global property |
References PR_setGlobalProperty().
SCIP_RETCODE PR_setGlobalPropertyFromInt | ( | SCIP * | scip, |
PropertyData * | pd, | ||
const char * | name, | ||
int | value | ||
) |
Set a global property to a given value.
Value is converted from an int to a string
scip | SCIP data structure |
pd | Property data structure |
name | Global property to be set |
value | Value for the global property |
References PR_setGlobalProperty().
SCIP_RETCODE PR_setGlobalPropertyFromReal | ( | SCIP * | scip, |
PropertyData * | pd, | ||
const char * | name, | ||
SCIP_Real | value | ||
) |
Set a global property to a given value Value is converted from a SCIP_Real to a string.
scip | SCIP data structure |
pd | Property data structure |
name | Global property to be set |
value | Value for the global property |
References PR_setGlobalProperty().
SCIP_RETCODE PR_setGlobalPropertyFromRealArray | ( | SCIP * | scip, |
PropertyData * | pd, | ||
const char * | name, | ||
SCIP_Real * | value, | ||
int | length | ||
) |
Set a global property to a given value Value is converted from an array of reals to a string.
scip | SCIP data structure |
pd | Property data structure |
name | Global property to be set |
value | Value for the global property |
length | Length of the array |
References PR_setGlobalProperty().
SCIP_RETCODE PR_setProperty | ( | SCIP * | scip, |
PropertyData * | pd, | ||
int | individual, | ||
const char * | name, | ||
const char * | value | ||
) |
Set a property for an individual to a given value.
scip | SCIP data structure |
pd | Property data structure |
individual | Individual |
name | Property name |
value | Property value |
References PropertyData::n, PropertyData::num_properties, PropertyData::property_names, and PropertyData::property_values.
Referenced by PR_setPropertyFromArray(), PR_setPropertyFromBool(), PR_setPropertyFromInt(), PR_setPropertyFromReal(), and PR_setPropertyFromRealArray().
SCIP_RETCODE PR_setPropertyFromArray | ( | SCIP * | scip, |
PropertyData * | pd, | ||
int | individual, | ||
const char * | name, | ||
const char ** | value, | ||
int | length | ||
) |
Set a property for an individual to a given value Value is converted from an array of strings to a string.
scip | SCIP data structure |
pd | Property data structure |
individual | Individual |
name | Property name |
value | Property value |
length | Length of the array |
References PR_setProperty().
SCIP_RETCODE PR_setPropertyFromBool | ( | SCIP * | scip, |
PropertyData * | pd, | ||
int | individual, | ||
const char * | name, | ||
SCIP_Bool | value | ||
) |
Set a property for an individual to a given value Value is converted from a SCIP_Bool to a string.
scip | SCIP data structure |
pd | Property data structure |
individual | Individual |
name | Property name |
value | Property value |
References PR_setProperty().
SCIP_RETCODE PR_setPropertyFromInt | ( | SCIP * | scip, |
PropertyData * | pd, | ||
int | individual, | ||
const char * | name, | ||
int | value | ||
) |
Set a property for an individual to a given value Value is converted from an int to a string.
scip | SCIP data structure |
pd | Property data structure |
individual | Individual |
name | Property name |
value | Property value |
References PR_setProperty().
SCIP_RETCODE PR_setPropertyFromReal | ( | SCIP * | scip, |
PropertyData * | pd, | ||
int | individual, | ||
const char * | name, | ||
SCIP_Real | value | ||
) |
Set a property for an individual to a given value Value is converted from a SCIP_Real to a string.
scip | SCIP data structure |
pd | Property data structure |
individual | Individual |
name | Property name |
value | Property value |
References PR_setProperty().
SCIP_RETCODE PR_setPropertyFromRealArray | ( | SCIP * | scip, |
PropertyData * | pd, | ||
int | individual, | ||
const char * | name, | ||
SCIP_Real * | value, | ||
int | length | ||
) |
Set a property for an individual to a given value Value is converted from an array of reals to a string.
scip | SCIP data structure |
pd | Property data structure |
individual | Individual |
name | Property name |
value | Property value |
length | Length of the array |
References PR_setProperty().
SCIP_RETCODE PR_writeToFile | ( | SCIP * | scip, |
FILE * | file, | ||
PropertyData * | pd | ||
) |
Writes a PropertyData structure to file.
scip | The SCIP instance the data belongs to. |
file | The file to write to. |
pd | The data to write. |
Referenced by SCIP_DECL_CONSPRINT().