GOBNILP  f164d83
Functions
pedigree_data.c File Reference

Contains functions related to managing PedigreeData. More...

#include "pedigree_data.h"
#include "utils.h"
Include dependency graph for pedigree_data.c:

Functions

SCIP_RETCODE PE_copyPedigreeData (SCIP *scip, PedigreeData *original, PedigreeData **duplicate)
 Makes a deep copy of a PedigreeData structure. More...
 
SCIP_RETCODE PE_deallocatePedigreeData (SCIP *scip, PedigreeData **pd)
 Deallocates the memory associated with a PedigreeData structure. More...
 
SCIP_RETCODE PE_parse (SCIP *scip, char *str, PedigreeData **pd)
 Parses a PedigreeData structure from a sting. More...
 
SCIP_RETCODE PE_writeToFile (SCIP *scip, FILE *file, PedigreeData *pd)
 Writes a PedigreeData structure to file. More...
 

Detailed Description

Contains functions related to managing PedigreeData.

Function Documentation

◆ PE_copyPedigreeData()

SCIP_RETCODE PE_copyPedigreeData ( SCIP *  scip,
PedigreeData original,
PedigreeData **  duplicate 
)

Makes a deep copy of a PedigreeData structure.

Parameters
scipThe SCIP instance to which the data belongs.
originalThe original data structure.
duplicateA pointer to the duplicated data structure.
Returns
SCIP_OKAY if copying suceeded.

References PedigreeData::ages, PedigreeData::n, PedigreeData::sexes, and PedigreeData::SexVars.

Referenced by MD_setPedigreeData().

◆ PE_deallocatePedigreeData()

SCIP_RETCODE PE_deallocatePedigreeData ( SCIP *  scip,
PedigreeData **  pd 
)

Deallocates the memory associated with a PedigreeData structure.

Parameters
scipThe SCIP instance which the data refers to.
pdA pointer to the data structure to deallocate.
Returns
SCIP_OKAY if the allocation succeeded.

Referenced by PD_addPedigreeSpecificConstraints(), and SCIP_DECL_CONSFREE().

◆ PE_parse()

SCIP_RETCODE PE_parse ( SCIP *  scip,
char *  str,
PedigreeData **  pd 
)

Parses a PedigreeData structure from a sting.

Parameters
scipThe SCIP instance the data will belong to.
strThe string to parse.
pdA pointer to the data structure resulting from parsing.
Returns
SCIP_OKAY if parsing succeeded.

References UT_parseArray(), UT_parseCharArray(), UT_parseIntArray(), and UT_parseVarArray().

Referenced by SCIP_DECL_CONSPARSE().

Here is the call graph for this function:

◆ PE_writeToFile()

SCIP_RETCODE PE_writeToFile ( SCIP *  scip,
FILE *  file,
PedigreeData pd 
)

Writes a PedigreeData structure to file.

Parameters
scipThe SCIP instance the data belongs to.
fileThe file to write to.
pdThe data to write.
Returns
SCIP_OKAY if the writing succeeded.

Referenced by SCIP_DECL_CONSPRINT().