GOBNILP
f164d83
|
Contains some useful functions that may be needed in several other files. More...
Macros | |
#define | BUCKET_BLOCK_LENGTH 1 |
#define | ESC_CHAR '\\' |
The character used to escape special characters when writing to a file. More... | |
#define | SPARSE_MATRIX_SIZE 20 |
Functions | |
SCIP_RETCODE | allsubsets (SCIP *scip, const int *set, const int n, int ***subsets_ptr) |
static int | convertToSimpleForm (char *line, char *splitters, int num_splitters, SCIP_Bool multiple_splitters_as_one, char **output_line) |
static int | countNumberOfSegments (char *line, int length, char splitter) |
static SCIP_RETCODE | escapeString (char *input_string, char **output_string) |
Adds an necessary escape characters to a string so it will be re-read correctly. More... | |
SCIP_RETCODE | free_allsubsets (SCIP *scip, int ***subsets_ptr) |
SCIP_VAR * | get_arrow (const ParentSetData *psd, const int i, const int j) |
Retrieve an arrow variable for specified child and parent or NULL if none exists. More... | |
SCIP_VAR * | get_arrowedge (const ParentSetData *psd, int i, int j, SCIP_Bool arrow) |
Retrieve an arrow or edge variable for specified child and parent or NULL if none exists. More... | |
SCIP_VAR * | get_edge (const ParentSetData *psd, const int i, const int j) |
Retrieve an edge variable for specified child and parent or NULL if none exists. More... | |
int | get_index (char *nodeName, ParentSetData *psd) |
Gets the index of a named variable. More... | |
SCIP_RETCODE | hashtableCreateArrow (SCIP *scip, ParentSetData *psd) |
Creates a hash table. More... | |
SCIP_RETCODE | hashtablefreeArrow (SCIP *scip, ParentSetData *psd) |
Frees memory (previously) used by a hash table. More... | |
SCIP_Bool | is_dr_feasible (SCIP *scip, const ParentSetData *psd, SCIP_SOL *sol, SCIP_Bool constructing, SCIP_SOL *dr_sol) |
static SCIP_Bool | isSplitter (char item, char *splitters, int num_splitters) |
static SCIP_Bool | needsEscaping (char item) |
Whether a character needs an escape character adding before it can be written to fiel. More... | |
SCIP_RETCODE | put_arrow (SCIP *scip, ParentSetData *psd, const int i, const int j, SCIP_VAR *arrow_i_j) |
Store an arrow variable for specified child and parent. More... | |
static SCIP_RETCODE | put_arrowedge (SCIP *scip, ParentSetData *psd, int i, int j, SCIP_VAR *arrow_i_j, SCIP_Bool arrow) |
Store an arrow or edge variable for specified child and parent. More... | |
SCIP_RETCODE | put_edge (SCIP *scip, ParentSetData *psd, const int i, const int j, SCIP_VAR *arrow_i_j) |
Store an edge variable for specified child and parent. More... | |
static SCIP_RETCODE | readNextLine (SCIP *scip, FILE *file, int *length, char **buffer, char **status) |
char * | SCIPstrdup (SCIP *scip, const char *str) |
static SCIP_RETCODE | unescapeString (char *input_string, char **output_string) |
Removes an escape charcters from a string to return the string before it was escaped. More... | |
SCIP_RETCODE | UT_addBoolParam (SCIP *scip, const char *name, const char *desc, SCIP_Bool value) |
Adds a boolean parameter to those recognised by SCIP. More... | |
SCIP_RETCODE | UT_addIntParam (SCIP *scip, const char *name, const char *desc, int value, int min, int max) |
Adds an integer parameter to those recognised by SCIP. More... | |
SCIP_RETCODE | UT_addLongintParam (SCIP *scip, const char *name, const char *desc, SCIP_Longint value, SCIP_Longint min, SCIP_Longint max) |
Adds a long integer parameter to those recognised by SCIP. More... | |
SCIP_RETCODE | UT_addRealParam (SCIP *scip, const char *name, const char *desc, SCIP_Real value, SCIP_Real min, SCIP_Real max) |
Adds a real valued parameter to those recognised by SCIP. More... | |
SCIP_RETCODE | UT_addStringParam (SCIP *scip, const char *name, const char *desc, const char *value) |
Adds a string parameter to those recognised by SCIP. More... | |
SCIP_RETCODE | UT_createEmptyGTEConstraint (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_Real lhs) |
Creates an initially empty greater than or equal to linear constraint with most options set to sensible defaults. More... | |
SCIP_RETCODE | UT_createEmptyLinearConstraint (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_Real lhs, SCIP_Real rhs) |
Creates an initially empty linear constraint with most options set to sensible defaults. More... | |
SCIP_RETCODE | UT_createEmptyLTEConstraint (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_Real rhs) |
Creates an initially empty less than or equal to linear constraint with most options set to sensible defaults. More... | |
SCIP_RETCODE | UT_parseArray (char *input_string, char ***output_array) |
Parses an array from a string. More... | |
SCIP_RETCODE | UT_parseCharArray (char *input_string, char **output_array, int length) |
Parses a character array from a string. More... | |
SCIP_RETCODE | UT_parseIntArray (char *input_string, int **output_array, int length) |
Parses an integer array from a string. More... | |
SCIP_RETCODE | UT_parseIntArrayArray (char *input_string, int ***output_array, int *lengths, int length) |
Parses an array of integer arrays from a string. More... | |
SCIP_RETCODE | UT_parseIntArrayArrayArray (char *input_string, int ****output_array, int **lengths, int *lengths_of_lengths, int length) |
Parses an array of arrays of integer arrays from a string. More... | |
SCIP_RETCODE | UT_parseStringArray (char *input_string, char ***output_array, int length) |
Parses a string array from a string. More... | |
SCIP_RETCODE | UT_parseVarArray (SCIP *scip, char *input_string, SCIP_VAR ***output_array, int length) |
Parses a variable array from a string. More... | |
SCIP_RETCODE | UT_parseVarArrayArray (SCIP *scip, char *input_string, SCIP_VAR ****output_array, int *lengths, int length) |
Parses an array of variable arrays from a string. More... | |
SCIP_RETCODE | UT_readFileAndSplit (SCIP *scip, FILE *file, char *splitters, int num_splitters, SCIP_Bool multiple_splitters_as_one, char ****lines, int *num_lines, int **line_lengths) |
Reads a file and splits it into lines, which are themselves split into white space delimited tokens. More... | |
SCIP_RETCODE | UT_writeCharArray (SCIP *scip, FILE *file, char *input_array, int length) |
Writes an array of characters to a file. More... | |
SCIP_RETCODE | UT_writeIntArray (SCIP *scip, FILE *file, int *input_array, int length) |
Writes an array of integers to a file. More... | |
SCIP_RETCODE | UT_writeIntArrayArray (SCIP *scip, FILE *file, int **input_array, int *lengths, int length) |
Writes an array of arrays of integers to a file. More... | |
SCIP_RETCODE | UT_writeIntArrayArrayArray (SCIP *scip, FILE *file, int ***input_array, int **lengths, int *lengths_of_lengths, int length) |
Writes an array of arrays of arrays of integers to a file. More... | |
SCIP_RETCODE | UT_writeStringArray (SCIP *scip, FILE *file, char **input_array, int length) |
Writes an array of strings to a file. More... | |
SCIP_RETCODE | UT_writeVarArray (SCIP *scip, FILE *file, SCIP_VAR **input_array, int length) |
Writes the names of an array of variables to a file. More... | |
SCIP_RETCODE | UT_writeVarArrayArray (SCIP *scip, FILE *file, SCIP_VAR ***input_array, int *lengths, int length) |
Writes an array of arrays of variables to a file. More... | |
Contains some useful functions that may be needed in several other files.
Currently, there are four sorts of function included in this file.
#define ESC_CHAR '\\' |
The character used to escape special characters when writing to a file.
Referenced by escapeString(), and unescapeString().
SCIP_RETCODE allsubsets | ( | SCIP * | scip, |
const int * | set, | ||
const int | n, | ||
int *** | subsets_ptr | ||
) |
scip | SCIP instance |
set | set whose subsets we want |
n | number of elements in set |
subsets_ptr | (pointer to ) output subsets[0][0] is the number of subsets subsets[j][0] is the size of the jth subset subsets[j][i] is the ith element of the jth subset |
References allsubsets().
Referenced by allsubsets(), and makeimsetvars().
|
static |
Adds an necessary escape characters to a string so it will be re-read correctly.
input_string | The initial string. |
output_string | A copy of the string after any escape characters have been added. |
References ESC_CHAR, and needsEscaping().
SCIP_RETCODE free_allsubsets | ( | SCIP * | scip, |
int *** | subsets_ptr | ||
) |
scip | SCIP instance |
subsets_ptr | data to free |
Referenced by makeimsetvars().
SCIP_VAR* get_arrow | ( | const ParentSetData * | psd, |
const int | i, | ||
const int | j | ||
) |
Retrieve an arrow variable for specified child and parent or NULL if none exists.
psd | the parent sets data structure |
i | child variable |
j | parent variable |
References get_arrowedge().
Referenced by addArrowVariables(), addNChildrenVars(), addOrderedCoveredArcConstraints(), addParentNumberConstraints(), addPosindVariables(), addPosVariables(), addTotalorderVariables(), edge_constraint(), is_dr_feasible(), isFeasible_arrows(), PS_copyParentSetData(), PS_deallocateParentSetData(), PS_specialiseFor(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPROP(), setBranchingPriorities(), and setSpecialProperties().
SCIP_VAR* get_arrowedge | ( | const ParentSetData * | psd, |
int | i, | ||
int | j, | ||
SCIP_Bool | arrow | ||
) |
Retrieve an arrow or edge variable for specified child and parent or NULL if none exists.
psd | the parent sets data structure |
i | child variable |
j | parent variable |
arrow | If TRUE return arrow variable for i and j, else return edge variable for i and j |
References ParentSetData::arrow, and ParentSetData::edge.
Referenced by get_arrow(), get_edge(), is_dr_feasible(), and SCIP_DECL_HEUREXEC().
SCIP_VAR* get_edge | ( | const ParentSetData * | psd, |
const int | i, | ||
const int | j | ||
) |
Retrieve an edge variable for specified child and parent or NULL if none exists.
psd | the parent sets data structure |
i | child variable |
j | parent variable |
References get_arrowedge().
Referenced by addEdgeNumberConstraints(), addGeneralDAGConstraints(), addImsetVariables(), addKBestMECVariables(), BN_addMECNonRepetitionConstraint(), edge_constraint(), immorality_constraint(), is_dr_feasible(), is_feasible(), makeimsetvars(), PS_copyParentSetData(), PS_deallocateParentSetData(), PS_specialiseFor(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPROP(), setBranchingPriorities(), and setSpecialProperties().
int get_index | ( | char * | nodeName, |
ParentSetData * | psd | ||
) |
Gets the index of a named variable.
Adapted from function of same name in probdata_bn
nodeName | (the name of ) the variable |
psd | the parent sets data structure, only nodeNames is set |
References ParentSetData::n, and ParentSetData::nodeNames.
Referenced by parseSet(), and process_constraint().
SCIP_RETCODE hashtableCreateArrow | ( | SCIP * | scip, |
ParentSetData * | psd | ||
) |
Creates a hash table.
scip | SCIP instance |
psd | Parent set data structure containing hashtable |
References ParentSetData::arrow, ParentSetData::edge, and ParentSetData::n.
Referenced by addArrowVariables(), PS_copyParentSetData(), PS_parse(), and PS_specialiseFor().
SCIP_RETCODE hashtablefreeArrow | ( | SCIP * | scip, |
ParentSetData * | psd | ||
) |
Frees memory (previously) used by a hash table.
scip | SCIP instance |
psd | Parent set data structure containing hashtable |
References ParentSetData::n.
Referenced by PS_deallocateParentSetData().
SCIP_Bool is_dr_feasible | ( | SCIP * | scip, |
const ParentSetData * | psd, | ||
SCIP_SOL * | sol, | ||
SCIP_Bool | constructing, | ||
SCIP_SOL * | dr_sol | ||
) |
scip | SCIP data structure |
psd | Parent set data structure |
sol | DAG to check/use as input |
constructing | whether we are constructing the distinguished representative (if any) |
dr_sol | dr_sol is the constructed distinguished representative (if any) |
References get_arrow(), get_arrowedge(), get_edge(), ParentSetData::n, ParentSetData::nParents, ParentSetData::nParentSets, ParentSetData::ParentSets, and ParentSetData::PaVars.
Referenced by SCIP_DECL_HEUREXEC().
|
static |
Whether a character needs an escape character adding before it can be written to fiel.
item | The character to consider |
Referenced by escapeString().
SCIP_RETCODE put_arrow | ( | SCIP * | scip, |
ParentSetData * | psd, | ||
const int | i, | ||
const int | j, | ||
SCIP_VAR * | arrow_i_j | ||
) |
Store an arrow variable for specified child and parent.
scip | SCIP instance |
psd | the parent sets data structure |
i | child variable |
j | parent variable |
arrow_i_j | variable to store |
References put_arrowedge().
Referenced by addArrowVariables(), PS_copyParentSetData(), PS_parse(), and PS_specialiseFor().
|
static |
Store an arrow or edge variable for specified child and parent.
scip | SCIP instance |
psd | the parent sets data structure |
i | child variable |
j | parent variable |
arrow_i_j | variable to store |
arrow | If TRUE store arrow variable for i and j, else store edge variable for i and j |
References ParentSetData::arrow, and ParentSetData::edge.
Referenced by put_arrow(), and put_edge().
SCIP_RETCODE put_edge | ( | SCIP * | scip, |
ParentSetData * | psd, | ||
const int | i, | ||
const int | j, | ||
SCIP_VAR * | arrow_i_j | ||
) |
Store an edge variable for specified child and parent.
psd | the parent sets data structure |
i | child variable |
j | parent variable |
arrow_i_j | variable to store |
References put_arrowedge().
Referenced by addArrowVariables(), PS_copyParentSetData(), PS_parse(), and PS_specialiseFor().
|
static |
Removes an escape charcters from a string to return the string before it was escaped.
input_string | The initial string. |
output_string | A copy of the string after any escape characters have been removed. |
References ESC_CHAR.
Referenced by UT_parseStringArray().
SCIP_RETCODE UT_addBoolParam | ( | SCIP * | scip, |
const char * | name, | ||
const char * | desc, | ||
SCIP_Bool | value | ||
) |
Adds a boolean parameter to those recognised by SCIP.
This is just a shortcut for SCIPaddBoolParam() with various options set to their most common values. Use the full function if you need any of the more advanced options.
scip | The SCIP instance to add the parameter to. |
name | The parameter's name. |
desc | A description of the parameter. |
value | The parameter's default value. |
Referenced by BN_addParameters(), CC_addParams(), FC_addParams(), IO_addOutputParameters(), PD_addPedigreeParameters(), and SC_addScoringParameters().
SCIP_RETCODE UT_addIntParam | ( | SCIP * | scip, |
const char * | name, | ||
const char * | desc, | ||
int | value, | ||
int | min, | ||
int | max | ||
) |
Adds an integer parameter to those recognised by SCIP.
This is just a shortcut for SCIPaddIntParam() with various options set to their most common values. Use the full function if you need any of the more advanced options.
scip | The SCIP instance to add the parameter to. |
name | The parameter's name. |
desc | A description of the parameter. |
value | The parameter's default value. |
min | The parameter's minimum value. |
max | The parameter's maximum value. |
Referenced by BN_addParameters(), IO_addOutputParameters(), PD_addPedigreeParameters(), and SC_addScoringParameters().
SCIP_RETCODE UT_addLongintParam | ( | SCIP * | scip, |
const char * | name, | ||
const char * | desc, | ||
SCIP_Longint | value, | ||
SCIP_Longint | min, | ||
SCIP_Longint | max | ||
) |
Adds a long integer parameter to those recognised by SCIP.
This is just a shortcut for SCIPaddLongintParam() with various options set to their most common values. Use the full function if you need any of the more advanced options.
scip | The SCIP instance to add the parameter to. |
name | The parameter's name. |
desc | A description of the parameter. |
value | The parameter's default value. |
min | The parameter's minimum value. |
max | The parameter's maximum value. |
Referenced by BN_addParameters().
SCIP_RETCODE UT_addRealParam | ( | SCIP * | scip, |
const char * | name, | ||
const char * | desc, | ||
SCIP_Real | value, | ||
SCIP_Real | min, | ||
SCIP_Real | max | ||
) |
Adds a real valued parameter to those recognised by SCIP.
This is just a shortcut for SCIPaddRealParam() with various options set to their most common values. Use the full function if you need any of the more advanced options.
scip | The SCIP instance to add the parameter to. |
name | The parameter's name. |
desc | A description of the parameter. |
min | The parameter's minimum value. |
max | The parameter's maximum value. |
value | The parameter's default value. |
Referenced by BN_addParameters(), PD_addPedigreeParameters(), and SC_addScoringParameters().
SCIP_RETCODE UT_addStringParam | ( | SCIP * | scip, |
const char * | name, | ||
const char * | desc, | ||
const char * | value | ||
) |
Adds a string parameter to those recognised by SCIP.
This is just a shortcut for SCIPaddStringParam() with various options set to their most common values. Use the full function if you need any of the more advanced options.
scip | The SCIP instance to add the parameter to. |
name | The parameter's name. |
desc | A description of the parameter. |
value | The parameter's default value. |
Referenced by BN_addParameters(), IO_addOutputParameters(), and PD_addPedigreeParameters().
SCIP_RETCODE UT_createEmptyGTEConstraint | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
SCIP_Real | lhs | ||
) |
Creates an initially empty greater than or equal to linear constraint with most options set to sensible defaults.
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
lhs | The value the constraint should be greater than or equal to |
References UT_createEmptyLinearConstraint().
SCIP_RETCODE UT_createEmptyLinearConstraint | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
SCIP_Real | lhs, | ||
SCIP_Real | rhs | ||
) |
Creates an initially empty linear constraint with most options set to sensible defaults.
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
lhs | left hand side of constraint |
rhs | right hand side of constraint |
Referenced by UT_createEmptyGTEConstraint(), and UT_createEmptyLTEConstraint().
SCIP_RETCODE UT_createEmptyLTEConstraint | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
SCIP_Real | rhs | ||
) |
Creates an initially empty less than or equal to linear constraint with most options set to sensible defaults.
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
rhs | The value the constraint should be less than or equal to |
References UT_createEmptyLinearConstraint().
Referenced by addFullSiblingAgeGapConstraint(), addHalfSiblingAgeGapConstraint(), addMaximumNumberOfOffspringConstraint(), addMaximumSibsetSizeConstraint(), and addSexConsistencyConstraint().
SCIP_RETCODE UT_parseArray | ( | char * | input_string, |
char *** | output_array | ||
) |
Parses an array from a string.
Use this function only if the array contains multiple types of items, or items that none of the other UT_parseXXXArray()
functions deals with.
input_string | The string representation of the array to parse. |
output_array | The array represented by the string. |
Referenced by PE_parse(), PR_parse(), PS_parse(), UT_parseIntArrayArray(), UT_parseIntArrayArrayArray(), UT_parseStringArray(), and UT_parseVarArrayArray().
SCIP_RETCODE UT_parseCharArray | ( | char * | input_string, |
char ** | output_array, | ||
int | length | ||
) |
Parses a character array from a string.
input_string | The string representation of the array to parse. |
output_array | The array represented by the string. |
length | The number of items in the array. |
References UT_parseStringArray().
Referenced by PE_parse().
SCIP_RETCODE UT_parseIntArray | ( | char * | input_string, |
int ** | output_array, | ||
int | length | ||
) |
Parses an integer array from a string.
input_string | The string representation of the array to parse. |
output_array | The array represented by the string. |
length | The number of items in the array. |
References UT_parseStringArray().
Referenced by PE_parse(), PS_parse(), and UT_parseIntArrayArray().
SCIP_RETCODE UT_parseIntArrayArray | ( | char * | input_string, |
int *** | output_array, | ||
int * | lengths, | ||
int | length | ||
) |
Parses an array of integer arrays from a string.
input_string | The string representation of the array to parse. |
output_array | The array represented by the string. |
lengths | The number of items in each sub array. |
length | The number of items in the array. |
References UT_parseArray(), and UT_parseIntArray().
Referenced by PS_parse(), and UT_parseIntArrayArrayArray().
SCIP_RETCODE UT_parseIntArrayArrayArray | ( | char * | input_string, |
int **** | output_array, | ||
int ** | lengths, | ||
int * | lengths_of_lengths, | ||
int | length | ||
) |
Parses an array of arrays of integer arrays from a string.
input_string | The string representation of the array to parse. |
output_array | The array represented by the string. |
lengths | The number of items in each sub sub array. |
lengths_of_lengths | The number of items in each sub array. |
length | The number of items in the array. |
References UT_parseArray(), and UT_parseIntArrayArray().
Referenced by PS_parse().
SCIP_RETCODE UT_parseStringArray | ( | char * | input_string, |
char *** | output_array, | ||
int | length | ||
) |
Parses a string array from a string.
input_string | The string representation of the array to parse. |
output_array | The array represented by the string. |
length | The number of items in the array. |
References unescapeString(), and UT_parseArray().
Referenced by PR_parse(), PS_parse(), UT_parseCharArray(), UT_parseIntArray(), and UT_parseVarArray().
SCIP_RETCODE UT_parseVarArray | ( | SCIP * | scip, |
char * | input_string, | ||
SCIP_VAR *** | output_array, | ||
int | length | ||
) |
Parses a variable array from a string.
The variables are found from their names in the input. It is therefore important that the SCIP instance knows the variables so that they can be found from these names.
scip | The SCIP instance in which the variables appear. |
input_string | The string representation of the array to parse. |
output_array | The array represented by the string. |
length | The number of items in the array. |
References UT_parseStringArray().
Referenced by PE_parse(), and UT_parseVarArrayArray().
SCIP_RETCODE UT_parseVarArrayArray | ( | SCIP * | scip, |
char * | input_string, | ||
SCIP_VAR **** | output_array, | ||
int * | lengths, | ||
int | length | ||
) |
Parses an array of variable arrays from a string.
The variables are found from their names in the input. It is therefore important that the SCIP instance knows the variables so that they can be found from these names.
scip | The SCIP instance in which the variables appear. |
input_string | The string representation of the array to parse. |
output_array | The array represented by the string. |
lengths | The number of items in each sub array. |
length | The number of items in the array. |
References UT_parseArray(), and UT_parseVarArray().
Referenced by PS_parse().
SCIP_RETCODE UT_readFileAndSplit | ( | SCIP * | scip, |
FILE * | file, | ||
char * | splitters, | ||
int | num_splitters, | ||
SCIP_Bool | multiple_splitters_as_one, | ||
char **** | lines, | ||
int * | num_lines, | ||
int ** | line_lengths | ||
) |
Reads a file and splits it into lines, which are themselves split into white space delimited tokens.
scip | The SCIP instance being used. |
file | The file to read. |
lines | A pointer to the lines of text that are read from the file. |
splitters | The field delimiters to use. |
num_splitters | The number of field delimiters to use. |
multiple_splitters_as_one | Whether multiple field delimiters should be merged in to one. |
num_lines | The number of lines of text read. |
line_lengths | The number of tokens in each line. |
Referenced by lookup(), readFrequencyFile(), and readProblemFromFile().
SCIP_RETCODE UT_writeCharArray | ( | SCIP * | scip, |
FILE * | file, | ||
char * | input_array, | ||
int | length | ||
) |
Writes an array of characters to a file.
scip | The SCIP instance that the data belongs to. |
file | The file to write to. |
input_array | The character array to write to file. |
length | The number of items in the array. |
References UT_writeStringArray().
SCIP_RETCODE UT_writeIntArray | ( | SCIP * | scip, |
FILE * | file, | ||
int * | input_array, | ||
int | length | ||
) |
Writes an array of integers to a file.
scip | The SCIP instance that the data belongs to. |
file | The file to write to. |
input_array | The integer array to write to file. |
length | The number of items in the array. |
References UT_writeStringArray().
SCIP_RETCODE UT_writeIntArrayArray | ( | SCIP * | scip, |
FILE * | file, | ||
int ** | input_array, | ||
int * | lengths, | ||
int | length | ||
) |
Writes an array of arrays of integers to a file.
scip | The SCIP instance that the data belongs to. |
file | The file to write to. |
input_array | The integer array array to write to file. |
lengths | The number of items in each sub array. |
length | The number of items in the array. |
SCIP_RETCODE UT_writeIntArrayArrayArray | ( | SCIP * | scip, |
FILE * | file, | ||
int *** | input_array, | ||
int ** | lengths, | ||
int * | lengths_of_lengths, | ||
int | length | ||
) |
Writes an array of arrays of arrays of integers to a file.
scip | The SCIP instance that the data belongs to. |
file | The file to write to. |
input_array | The integer array array array to write to file. |
lengths | The number of items in each sub sub array. |
lengths_of_lengths | The number of items in each sub array. |
length | The number of items in the array. |
SCIP_RETCODE UT_writeStringArray | ( | SCIP * | scip, |
FILE * | file, | ||
char ** | input_array, | ||
int | length | ||
) |
Writes an array of strings to a file.
scip | The SCIP instance that the data belongs to. |
file | The file to write to. |
input_array | The string array to write to file. |
length | The number of items in the array. |
Referenced by UT_writeCharArray(), UT_writeIntArray(), and UT_writeVarArray().
SCIP_RETCODE UT_writeVarArray | ( | SCIP * | scip, |
FILE * | file, | ||
SCIP_VAR ** | input_array, | ||
int | length | ||
) |
Writes the names of an array of variables to a file.
scip | The SCIP instance that the data belongs to. |
file | The file to write to. |
input_array | The variable array to write to file. |
length | The number of items in the array. |
References UT_writeStringArray().
SCIP_RETCODE UT_writeVarArrayArray | ( | SCIP * | scip, |
FILE * | file, | ||
SCIP_VAR *** | input_array, | ||
int * | lengths, | ||
int | length | ||
) |
Writes an array of arrays of variables to a file.
scip | The SCIP instance that the data belongs to. |
file | The file to write to. |
input_array | The variable array array to write to file. |
lengths | The number of items in each sub array. |
length | The number of items in the array. |