GOBNILP  f164d83
Data Structures | Functions
parent_set_data.h File Reference

Function and type declarations for parent_set_data.c. More...

#include <scip/scip.h>
Include dependency graph for parent_set_data.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  BUCKET
 bucket in a hash table More...
 
struct  ParentSetData
 The basic data needed to record a collection of parent sets associated with a problem. More...
 

Functions

SCIP_RETCODE PS_copyParentSetData (SCIP *scip, ParentSetData *original, ParentSetData **duplicate)
 Makes a deep copy of a ParentSetData structure. More...
 
SCIP_RETCODE PS_deallocateParentSetData (SCIP *scip, ParentSetData **psd, SCIP_Bool releasevars)
 Deallocates the memory associated with a ParentSetData structure. More...
 
SCIP_RETCODE PS_parse (SCIP *scip, char *str, ParentSetData **psd)
 Parses a ParentSetData structure from a sting. More...
 
SCIP_RETCODE PS_specialiseFor (SCIP *scip, ParentSetData *original, int *nodes, int num_nodes, ParentSetData **specialisation)
 Creates a subset of parent set data mentioning only the given nodes. More...
 
SCIP_RETCODE PS_splitToComponents (SCIP *scip, ParentSetData *original, int *num_components, ParentSetData ***components)
 Splits a single set of parent set data in to its strongly connected components. More...
 
SCIP_RETCODE PS_writeToFile (SCIP *scip, FILE *file, ParentSetData *psd)
 Writes a ParentSetData structure to file. More...
 

Detailed Description

Function and type declarations for parent_set_data.c.

Function Documentation

◆ PS_copyParentSetData()

SCIP_RETCODE PS_copyParentSetData ( SCIP *  scip,
ParentSetData original,
ParentSetData **  duplicate 
)

Makes a deep copy of a ParentSetData 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 ParentSetData::arrow, ParentSetData::edge, get_arrow(), get_edge(), hashtableCreateArrow(), ParentSetData::n, ParentSetData::nodeNames, ParentSetData::nParents, ParentSetData::nParentSets, ParentSetData::ParentSets, ParentSetData::PaVars, put_arrow(), and put_edge().

Referenced by createConsData(), and MD_setParentSetData().

Here is the call graph for this function:

◆ PS_deallocateParentSetData()

SCIP_RETCODE PS_deallocateParentSetData ( SCIP *  scip,
ParentSetData **  psd,
SCIP_Bool  releasevars 
)

Deallocates the memory associated with a ParentSetData structure.

Parameters
scipThe SCIP instance which the data refers to.
psdA pointer to the data structure to deallocate.
releasevarsWhether to release the variables (family, arrow and edge)
Returns
SCIP_OKAY if the allocation succeeded.

References get_arrow(), get_edge(), and hashtablefreeArrow().

Referenced by addAcyclicityConstraints(), DC_tryToSplit(), SCIP_DECL_CONSDELETE(), SCIP_DECL_CONSFREE(), SCIP_DECL_CONSPARSE(), and SCIP_DECL_PROBDELORIG().

Here is the call graph for this function:

◆ PS_parse()

SCIP_RETCODE PS_parse ( SCIP *  scip,
char *  str,
ParentSetData **  psd 
)

Parses a ParentSetData structure from a sting.

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

References hashtableCreateArrow(), put_arrow(), put_edge(), UT_parseArray(), UT_parseIntArray(), UT_parseIntArrayArray(), UT_parseIntArrayArrayArray(), UT_parseStringArray(), and UT_parseVarArrayArray().

Referenced by SCIP_DECL_CONSPARSE().

Here is the call graph for this function:

◆ PS_specialiseFor()

SCIP_RETCODE PS_specialiseFor ( SCIP *  scip,
ParentSetData original,
int *  nodes,
int  num_nodes,
ParentSetData **  specialisation 
)

Creates a subset of parent set data mentioning only the given nodes.

Parameters
scipThe SCIP instance the parent set dtaa is used in.
originalThe original data from which the subset will be taken.
nodesThe nodes which the new subset should be limited to.
num_nodesThe number of nodes the subset will be limited to.
specialisationThe subset of the parent set data containing only references to the requested nodes.
Returns
SCIP_OKAY if the procedure worked, or an appropriate error otherwise.

References get_arrow(), get_edge(), hashtableCreateArrow(), ParentSetData::n, ParentSetData::nodeNames, ParentSetData::nParents, ParentSetData::nParentSets, ParentSetData::ParentSets, ParentSetData::PaVars, put_arrow(), and put_edge().

Referenced by PS_splitToComponents().

Here is the call graph for this function:

◆ PS_splitToComponents()

SCIP_RETCODE PS_splitToComponents ( SCIP *  scip,
ParentSetData original,
int *  num_components,
ParentSetData ***  components 
)

Splits a single set of parent set data in to its strongly connected components.

If any variables are fixed at zero locally, the parent set the variable refers to is treated as if it did not exist for the purposes of finding the components.

Parameters
scipThe SCIP instance being used.
originalThe parent set data to search for components in.
num_componentsThe number of strongly connected components found.
componentsThe strongly connected components of the data.
Returns
SCIP_OKAY if the procedure worked, or an appropriate error message otherwise.

References findStronglyConnectedComponents(), Vector::items, VectorList::items, ParentSetData::n, ParentSetData::nParents, ParentSetData::nParentSets, ParentSetData::ParentSets, ParentSetData::PaVars, PS_specialiseFor(), Vector::size, VectorList::size, StackCreate(), StackDelete(), VectorCreate(), VectorDelete(), VectorListCreate(), and VectorListDelete().

Referenced by addAcyclicityConstraints(), and DC_tryToSplit().

Here is the call graph for this function:

◆ PS_writeToFile()

SCIP_RETCODE PS_writeToFile ( SCIP *  scip,
FILE *  file,
ParentSetData psd 
)

Writes a ParentSetData structure to file.

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

References ParentSetData::n.

Referenced by SCIP_DECL_CONSPRINT().