hypergraph.c
Go to the documentation of this file.
31/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
63 newcapacity * hypergraph->sizevertexdata / sizeof(*(hypergraph->verticesdata))) ); /*lint --e{737}*/
101 SCIP_ALLOC( BMSallocBlockMemoryArray(hypergraph->blkmem, &hypergraph->edgesverticesbeg, newcapacity + 1) );
111/** @brief enlarges arrays for incident vertex/edge pairs to have capacity for at least \p required */
162 SCIP_ALLOC( BMSallocBlockMemoryArray(hypergraph->blkmem, &hypergraph->overlapsverticesbeg, newcapacity + 1) );
169 newcapacity * hypergraph->sizeoverlapdata / sizeof(*(hypergraph->overlapsdata))) ); /*lint --e{737}*/
174 newcapacity * hypergraph->sizeoverlapdata / sizeof(*(hypergraph->overlapsdata))) ); /*lint --e{737}*/
183/** @brief enlarges overlapVertices array to have capacity for at least \p required overlaps' vertices */
298 BMSfreeBlockMemoryArray(hypergraph->blkmem, &hypergraph->edgesverticesbeg, hypergraph->memedges + 1);
300 BMSfreeBlockMemoryArray(hypergraph->blkmem, &hypergraph->edgesvertices, hypergraph->memedgesvertices);
305 BMSfreeBlockMemoryArray(hypergraph->blkmem, &hypergraph->verticesedges, hypergraph->memverticesedges);
307 BMSfreeBlockMemoryArray(hypergraph->blkmem, &hypergraph->verticesedgesbeg, hypergraph->memvertices + 1);
317 BMSfreeBlockMemoryArray(hypergraph->blkmem, &hypergraph->overlapsverticesbeg, hypergraph->memoverlaps + 1);
322 BMSfreeBlockMemoryArray(hypergraph->blkmem, &hypergraph->overlapsvertices, hypergraph->memoverlapsvertices);
331 BMSfreeBlockMemoryArray(hypergraph->blkmem, &hypergraph->edgesoverlaps, hypergraph->memedgesoverlaps);
337 BMSfreeBlockMemoryArray(hypergraph->blkmem, &hypergraph->overlapsedges, hypergraph->memoverlapsedges);
347 BMSfreeBlockMemoryArray(hypergraph->blkmem, &hypergraph->verticesoverlaps, hypergraph->memverticesoverlaps);
389 SCIP_HYPERGRAPH_VERTEXDATA** pvertexdata /**< Pointer for returning the vertex's data (may be \c NULL). */
402 + hypergraph->nvertices * hypergraph->sizevertexdata / sizeof(*(hypergraph->verticesdata)) ); /*lint --e{737}*/
421 SCIP_HYPERGRAPH_EDGEDATA** pedgedata /**< Pointer for returning the edge's data (may be \c NULL). */
446 hypergraph->nedges * hypergraph->sizeedgedata / sizeof(*(hypergraph->edgesdata))); /*lint --e{737}*/
517 hash = SCIPhashFour(hash, hypergraph->overlapsvertices[i - 2], hypergraph->overlapsvertices[i - 1],
521 hash = SCIPhashThree(hash, hypergraph->overlapsvertices[i - 2], hypergraph->overlapsvertices[i - 1]);
585 * Requires \ref SCIPhypergraphHasVertexEdges to be \c TRUE which results from \ref SCIPhypergraphComputeVerticesEdges.
589 SCIP_DECL_HYPERGRAPH_OVERLAP((*handler)), /**< Function to be called once the overlap is found. */
615 SCIP_CALL( SCIPhashtableCreate(&hypergraph->overlaphashtable, hypergraph->blkmem, 4 * hypergraph->nedges + 4,
621 /* Allocate memory for an array consisting of pairs (e,o) where o is an overlap incident to edge e. */
623 SCIP_ALLOC( BMSallocBlockMemoryArray(hypergraph->blkmem, &edgeOverlapPairs, memEdgeOverlapPairs) );
639 SCIP_ALLOC( BMSreallocBlockMemoryArray(hypergraph->blkmem, &commonVertices, newcapacity, memCommonVertices) );
642 /* We iterate over all vertices v of e and then over all edges f incident to v to avoid scanning all pairs
667 /* We now traverse the sorted lists of vertices of e and f simultaneously to find common vertices. */
706 SCIP_CALL( findOverlap(hypergraph, numCommonVertices, commonVertices, &overlap, TRUE, &added) );
709 SCIP_CALL( handler(hypergraph, overlap, SCIPhypergraphOverlapData(hypergraph, overlap), e, f, added,
715 SCIP_ALLOC( BMSreallocBlockMemoryArray(hypergraph->blkmem, &edgeOverlapPairs, memEdgeOverlapPairs,
720 /* For the pair (overlap,e) we store (e << 40) | (|overlap| << 24) | overlap and sort by it to find
740 SCIPdebugMessage("found %d edge-overlap incidences, including possible duplicates.\n", numEdgeOverlapPairs);
754 if( hypergraph->memedgesoverlapsbeg == 0 || hypergraph->memedgesoverlapsbeg < hypergraph->nedges )
769 SCIP_ALLOC( BMSallocBlockMemoryArray(hypergraph->blkmem, &hypergraph->edgesoverlapsbeg, newcapacity + 1) );
822 if( hypergraph->memverticesedgesbeg == 0 || hypergraph->memverticesedgesbeg < hypergraph->nvertices )
836 SCIP_ALLOC( BMSallocBlockMemoryArray(hypergraph->blkmem, &hypergraph->verticesedgesbeg, newcapacity + 1) );
862 /* We traverse through all incidences (using the edges' vertex arrays) and count the degree deg(v) in beg[v]. */
866 /* This loop sets beg[0] = 0, beg[1] = deg(0), beg[2] = deg(0) + deg(1), beg[v] = deg(0) + ... + deg(v-1). */
877 /* We now traverse through all edges e and their incident vertices v, storing e at beg[v], which is incremented. */
902 * @brief finds the overlap corresponding to vertex set \p vertices; returns -1 if it is not found
904 * Requires \ref SCIPhypergraphHasOverlaps to be \c TRUE which results from \ref SCIPhypergraphComputeOverlaps.
925 * @brief finds the overlap or singleton vertex corresponding to the intersection of edges \p first and \p second
927 * Requires \ref SCIPhypergraphHasOverlaps to be \c TRUE which results from \ref SCIPhypergraphComputeOverlaps.
988 * Requires \ref SCIPhypergraphHasOverlaps to be \c TRUE which results from \ref SCIPhypergraphComputeOverlaps.
1019 SCIP_ALLOC( BMSallocBlockMemoryArray(hypergraph->blkmem, &hypergraph->overlapsedgesbeg, newcapacity + 1) );
1045 /* We traverse through all incidences (using the edges' overlap arrays) and count the degree deg(o) in beg[o],
1050 /* This loop sets beg[0] = 0, beg[1] = deg(0), beg[2] = deg(0) + deg(1), beg[o] = deg(0) + ... + deg(o-1) */
1061 /* We now traverse through all edges e and their incident overlaps o, storing e at beg[o], which is incremented. */
1120 SCIP_ALLOC( BMSallocBlockMemoryArray(hypergraph->blkmem, &hypergraph->verticesoverlapsbeg, newcapacity) );
1146 /* We traverse through all incidences (using the overlaps' vertex arrays) and count the degree deg(v) in beg[v],
1151 /* This loop sets beg[0] = 0, beg[1] = deg(0), beg[2] = deg(0) + deg(1), beg[v] = deg(0) + ... + deg(v-1) */
1162 /* We traverse through all overlaps o and their incident vertices v, storing o at beg[v], which is incremented. */
1258 "number of incidences is claimed to be %d but counting via edges yields %d!\n", nincidences, i1);
1281 "number of incidences is claimed to be %d but counting via vertices yields %d!\n", nincidences, i2);
1299 "incidence #%d is %lld (via edges) and %lld (via vertices)!\n", i, incidences1[i], incidences2[i]);
1338 "number of incidences is claimed to be %d but counting via edges yields %d!\n", nincidences, i1);
1361 "number of incidences is claimed to be %d but counting via vertices yields %d!\n", nincidences, i2);
1379 "incidence #%d is %lld (via edges) and %lld (via vertices)!\n", i, incidences1[i], incidences2[i]);
1421 /* Check if the cardinalities are nontrivial and form a non-decreasing sequences for each edge. */
1433 fprintf(file, "} of cardinality |o%d| = %d, but previous cardinality is %d.\n", o, cardinality,
1502 BMSfreeBlockMemoryArray(hypergraph->blkmem, &iterator->commonvertices, iterator->sizecommonvertices);
1556 assert(iterator->vertexidx == -1 || iterator->vertexidx >= hypergraph->edgesverticesbeg[iterator->base]);
1604 /* Edge index is set to one before the first edge of the next vertex and incremented in the next iteration. */
1700/** @brief returns the minimum vertex in the intersection of the base and the current adjacent edge */
1711 * If the intersection of the two edges has only one element, then -1 is returned, and if overlap information was not
1729 * In debug mode, the following methods are implemented as function calls to ensure type validity.
1822 + vertex * hypergraph->sizevertexdata / sizeof(*(hypergraph->verticesdata))); /*lint --e{737}*/
1846 + overlap * hypergraph->sizeoverlapdata / sizeof(*(hypergraph->overlapsdata))); /*lint --e{737}*/
1919 * See \ref SCIPhypergraphVertexEdgesFirst and \ref SCIPhypergraphVertexEdgesBeyond to obtain such indices for a vertex.
1949 * Requires \ref SCIPhypergraphHasOverlaps to be \c TRUE which results from \ref SCIPhypergraphComputeOverlaps.
1960 return hypergraph->overlapsverticesbeg[overlap + 1] - hypergraph->overlapsverticesbeg[overlap];
1967 * Requires \ref SCIPhypergraphHasOverlaps to be \c TRUE which results from \ref SCIPhypergraphComputeOverlaps.
2010 * See \ref SCIPhypergraphEdgesOverlapsFirst and \ref SCIPhypergraphEdgesOverlapsBeyond to obtain such indices for an
2065 * See \ref SCIPhypergraphOverlapsEdgesFirst and \ref SCIPhypergraphOverlapsEdgesBeyond to obtain such indices for an
2121 * See \ref SCIPhypergraphVertexOverlapsFirst and \ref SCIPhypergraphVertexOverlapsBeyond to obtain such indices for a
SCIP_RETCODE SCIPhashtableCreate(SCIP_HASHTABLE **hashtable, BMS_BLKMEM *blkmem, int tablesize, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr)
Definition: misc.c:2298
void * SCIPhashtableRetrieve(SCIP_HASHTABLE *hashtable, void *key)
Definition: misc.c:2596
SCIP_RETCODE SCIPhashtableInsert(SCIP_HASHTABLE *hashtable, void *element)
Definition: misc.c:2535
void SCIPsortLong(SCIP_Longint *longarray, int len)
void SCIPsortInt(int *intarray, int len)
void SCIPhypergraphIterStart(SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_ITER *iterator, SCIP_HYPERGRAPH_EDGE base, unsigned int minoverlapsize, SCIP_Bool onlylater, SCIP_Bool findoverlaps)
initializes the iterator to the first adjacent edge of base
Definition: hypergraph.c:1506
int SCIPhypergraphEdgesOverlapsBeyond(SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_EDGE edge)
returns an index beyond the last overlap incident to edge
Definition: hypergraph.c:1995
void SCIPhypergraphIterNext(SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_ITER *iterator)
initializes the iterator to the first adjacent edge of base
Definition: hypergraph.c:1547
static SCIP_RETCODE ensureNumEdgesVertices(SCIP_HYPERGRAPH *hypergraph, int required)
enlarges arrays for incident vertex/edge pairs to have capacity for at least required
Definition: hypergraph.c:113
SCIP_RETCODE SCIPhypergraphFree(SCIP_HYPERGRAPH **phypergraph)
frees a hypergraph
Definition: hypergraph.c:281
SCIP_HYPERGRAPH_EDGE SCIPhypergraphIterAdjacent(SCIP_HYPERGRAPH_ITER *iterator)
returns the current adjacent edge
Definition: hypergraph.c:1693
SCIP_HYPERGRAPH_EDGE SCIPhypergraphIterBase(SCIP_HYPERGRAPH_ITER *iterator)
returns the base edge
Definition: hypergraph.c:1685
SCIP_RETCODE SCIPhypergraphAddEdge(SCIP_HYPERGRAPH *hypergraph, int nvertices, SCIP_HYPERGRAPH_VERTEX *vertices, SCIP_HYPERGRAPH_EDGE *pedge, SCIP_HYPERGRAPH_EDGEDATA **pedgedata)
adds a new edge to the hypergraph
Definition: hypergraph.c:416
static SCIP_DECL_HASHGETKEY(overlapHashGetKey)
get-key function for overlap hashtable
Definition: hypergraph.c:456
SCIP_HYPERGRAPH_OVERLAP SCIPhypergraphIterOverlap(SCIP_HYPERGRAPH_ITER *iterator)
returns the overlap for the intersection of the base and the current adjacent edge
Definition: hypergraph.c:1714
int SCIPhypergraphOverlapsEdgesBeyond(SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_OVERLAP overlap)
returns an index beyond the last edge incident to overlap
Definition: hypergraph.c:2051
void SCIPhypergraphIterClear(SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_ITER *iterator)
frees a hypergraph iterator's internal memory
Definition: hypergraph.c:1494
SCIP_HYPERGRAPH_EDGE SCIPhypergraphVertexEdgesGetAtIndex(SCIP_HYPERGRAPH *hypergraph, int idx)
returns the edge corresponding to index that is incident to a vertex
Definition: hypergraph.c:1921
int SCIPhypergraphVertexEdgesBeyond(SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_VERTEX vertex)
returns an index beyond the last edge incident to vertex
Definition: hypergraph.c:1905
static SCIP_DECL_HASHKEYEQ(overlapHashKeyEqPtr)
equality function for overlap hashtable
Definition: hypergraph.c:463
SCIP_RETCODE SCIPhypergraphIntersectEdges(SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_EDGE first, SCIP_HYPERGRAPH_EDGE second, SCIP_HYPERGRAPH_OVERLAP *poverlap, SCIP_HYPERGRAPH_VERTEX *pvertex)
finds the overlap or singleton vertex corresponding to the intersection of edges first and second
Definition: hypergraph.c:929
static SCIP_RETCODE ensureNumVertices(SCIP_HYPERGRAPH *hypergraph, int required)
enlarges vertex arrays to have capacity for at least required vertices
Definition: hypergraph.c:45
SCIP_Bool SCIPhypergraphIterValid(SCIP_HYPERGRAPH_ITER *iterator)
returns whether the iterator is valid
Definition: hypergraph.c:1537
int SCIPhypergraphGetNEdges(SCIP_HYPERGRAPH *hypergraph)
returns the number of edges
Definition: hypergraph.c:1774
int SCIPhypergraphVertexOverlapsBeyond(SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_VERTEX vertex)
returns an index beyond the last overlap incident to vertex
Definition: hypergraph.c:2107
SCIP_RETCODE SCIPhypergraphComputeVerticesEdges(SCIP_HYPERGRAPH *hypergraph)
computes each vertex' list of incident edges
Definition: hypergraph.c:811
SCIP_HYPERGRAPH_OVERLAPDATA * SCIPhypergraphOverlapData(SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_OVERLAP overlap)
returns additional data of overlap
Definition: hypergraph.c:1838
SCIP_RETCODE SCIPhypergraphAddVertex(SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_VERTEX *pvertex, SCIP_HYPERGRAPH_VERTEXDATA **pvertexdata)
adds a new vertex to the hypergraph
Definition: hypergraph.c:386
int SCIPhypergraphEdgeSize(SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_EDGE edge)
returns the number of vertices of edge
Definition: hypergraph.c:1850
static SCIP_RETCODE ensureNumOverlaps(SCIP_HYPERGRAPH *hypergraph, int required)
enlarges overlap arrays to have capacity for at least required overlaps
Definition: hypergraph.c:139
SCIP_Bool SCIPhypergraphHasOverlapsEdges(SCIP_HYPERGRAPH *hypergraph)
returns whether overlaps' incident edges are known.
Definition: hypergraph.c:2029
SCIP_Bool SCIPhypergraphOverlapsDisjoint(SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_OVERLAP overlap1, SCIP_HYPERGRAPH_OVERLAP overlap2)
returns whether overlaps overlap1 and overlap2 are disjoint
Definition: hypergraph.c:1187
SCIP_Bool SCIPhypergraphIsValid(SCIP_HYPERGRAPH *hypergraph, FILE *file)
asserts that the hypergraph data structures are valid
Definition: hypergraph.c:1221
SCIP_RETCODE SCIPhypergraphOverlapFind(SCIP_HYPERGRAPH *hypergraph, int nvertices, SCIP_HYPERGRAPH_VERTEX *vertices, SCIP_HYPERGRAPH_OVERLAP *poverlap)
finds the overlap corresponding to vertex set vertices; returns -1 if it is not found
Definition: hypergraph.c:906
static SCIP_RETCODE ensureNumEdges(SCIP_HYPERGRAPH *hypergraph, int required)
enlarges edge arrays to have capacity for at least required edges
Definition: hypergraph.c:73
SCIP_RETCODE SCIPhypergraphClear(SCIP_HYPERGRAPH *hypergraph)
clears a hypergraph, deleting all vertices and edges
Definition: hypergraph.c:361
SCIP_Bool SCIPhypergraphHasOverlaps(SCIP_HYPERGRAPH *hypergraph)
returns whether edges' overlaps and overlaps' vertices are known.
Definition: hypergraph.c:1937
SCIP_Bool SCIPhypergraphHasVertexOverlaps(SCIP_HYPERGRAPH *hypergraph)
returns whether vertices' incident overlaps are known
Definition: hypergraph.c:2085
SCIP_HYPERGRAPH_VERTEX * SCIPhypergraphEdgeVertices(SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_EDGE edge)
returns the array of vertices of edge
Definition: hypergraph.c:1867
int SCIPhypergraphEdgesOverlapsFirst(SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_EDGE edge)
returns an index for the first overlap incident to edge
Definition: hypergraph.c:1982
int SCIPhypergraphOverlapsEdgesFirst(SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_OVERLAP overlap)
returns an index for the first edge incident to overlap
Definition: hypergraph.c:2039
static SCIP_DECL_HASHKEYVAL(overlapHashKeyValPtr)
hash function for overlap hashtable
Definition: hypergraph.c:498
SCIP_HYPERGRAPH_VERTEX SCIPhypergraphIterMinVertex(SCIP_HYPERGRAPH_ITER *iterator)
returns the minimum vertex in the intersection of the base and the current adjacent edge
Definition: hypergraph.c:1701
SCIP_HYPERGRAPH_VERTEXDATA * SCIPhypergraphVertexData(SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_VERTEX vertex)
returns additional data of vertex
Definition: hypergraph.c:1814
SCIP_HYPERGRAPH_OVERLAP SCIPhypergraphVertexOverlapsGetAtIndex(SCIP_HYPERGRAPH *hypergraph, int idx)
returns the overlap corresponding to idx that is incident to a vertex
Definition: hypergraph.c:2124
int SCIPhypergraphVertexOverlapsFirst(SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_VERTEX vertex)
returns an index for the first overlap containing vertex
Definition: hypergraph.c:2095
SCIP_RETCODE SCIPhypergraphComputeOverlapsEdges(SCIP_HYPERGRAPH *hypergraph)
computes all overlaps' lists of incident edges
Definition: hypergraph.c:990
SCIP_HYPERGRAPH_OVERLAP SCIPhypergraphOverlapsEdgesGetAtIndex(SCIP_HYPERGRAPH *hypergraph, int idx)
returns the edge corresponding to idx that is incident to an overlap
Definition: hypergraph.c:2068
SCIP_RETCODE SCIPhypergraphComputeOverlaps(SCIP_HYPERGRAPH *hypergraph, SCIP_DECL_HYPERGRAPH_OVERLAP((*handler)), void *userdata)
computes all overlaps and stores overlaps' vertices and all edges' overlaps
Definition: hypergraph.c:587
SCIP_RETCODE SCIPhypergraphComputeVerticesOverlaps(SCIP_HYPERGRAPH *hypergraph)
computes all vertices' lists of incident overlaps
Definition: hypergraph.c:1091
int SCIPhypergraphGetNIncidences(SCIP_HYPERGRAPH *hypergraph)
returns the number of edge-vertex incidences
Definition: hypergraph.c:1804
SCIP_Bool SCIPhypergraphHasVertexEdges(SCIP_HYPERGRAPH *hypergraph)
returns whether vertices' incident edges are known.
Definition: hypergraph.c:1883
int SCIPhypergraphGetNVertices(SCIP_HYPERGRAPH *hypergraph)
returns the number of vertices
Definition: hypergraph.c:1764
SCIP_HYPERGRAPH_OVERLAP SCIPhypergraphEdgesOverlapsGetAtIndex(SCIP_HYPERGRAPH *hypergraph, int idx)
returns the overlap corresponding to idx that is incident to an edge
Definition: hypergraph.c:2013
SCIP_RETCODE SCIPhypergraphIterInit(SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_ITER *iterator)
initializes a hypergraph iterator's internal memory
Definition: hypergraph.c:1469
static SCIP_RETCODE findOverlap(SCIP_HYPERGRAPH *hypergraph, int nvertices, int *vertices, int *poverlap, SCIP_Bool add, SCIP_Bool *padded)
finds an overlap specified by a sorted vertex set, potentially adding it
Definition: hypergraph.c:530
int SCIPhypergraphVertexEdgesFirst(SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_VERTEX vertex)
returns an index for the first edge incident to vertex
Definition: hypergraph.c:1893
SCIP_HYPERGRAPH_VERTEX * SCIPhypergraphOverlapVertices(SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_OVERLAP overlap)
returns the array of sorted vertices of overlap
Definition: hypergraph.c:1969
int SCIPhypergraphOverlapSize(SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_OVERLAP overlap)
returns the number of vertices of overlap
Definition: hypergraph.c:1951
static SCIP_RETCODE ensureNumOverlapsVertices(SCIP_HYPERGRAPH *hypergraph, int required)
enlarges overlapVertices array to have capacity for at least required overlaps' vertices
Definition: hypergraph.c:185
int SCIPhypergraphGetNOverlaps(SCIP_HYPERGRAPH *hypergraph)
returns the number of overlaps
Definition: hypergraph.c:1794
SCIP_HYPERGRAPH_EDGEDATA * SCIPhypergraphEdgeData(SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_EDGE edge)
returns additional data of edge
Definition: hypergraph.c:1826
BMS_BLKMEM * SCIPhypergraphBlkmem(SCIP_HYPERGRAPH *hypergraph)
returns the hypergraph's block memory structure
Definition: hypergraph.c:1784
SCIP_RETCODE SCIPhypergraphCreate(SCIP_HYPERGRAPH **phypergraph, BMS_BLKMEM *blkmem, int memvertices, int memedges, int memoverlaps, int memedgesvertices, size_t sizevertexdata, size_t sizeedgedata, size_t sizeoverlapdata)
creates a hypergraph
Definition: hypergraph.c:210
Internal methods for dealing with hypergraphs.
#define BMSreallocBlockMemoryArray(mem, ptr, oldnum, newnum)
Definition: memory.h:458
internal miscellaneous methods
public methods for message output
Definition: type_hypergraph.h:86
SCIP_HYPERGRAPH_VERTEX * commonvertices
Definition: type_hypergraph.h:94
Definition: struct_hypergraph.h:46
SCIP_HYPERGRAPH_EDGE * edgesvertices
Definition: struct_hypergraph.h:64
SCIP_HYPERGRAPH_OVERLAP * verticesoverlaps
Definition: struct_hypergraph.h:94
SCIP_HYPERGRAPH_VERTEX * verticesedges
Definition: struct_hypergraph.h:70
SCIP_HYPERGRAPH_OVERLAP * edgesoverlaps
Definition: struct_hypergraph.h:82
SCIP_HYPERGRAPH_VERTEX * overlapsvertices
Definition: struct_hypergraph.h:77
SCIP_HYPERGRAPH_EDGE * overlapsedges
Definition: struct_hypergraph.h:88
SCIP_HASHTABLE * overlaphashtable
Definition: struct_hypergraph.h:73
datastructures hypergraphs
struct SCIP_Hypergraph_OverlapData SCIP_HYPERGRAPH_OVERLAPDATA
Definition: type_hypergraph.h:55
struct SCIP_Hypergraph_NodeData SCIP_HYPERGRAPH_VERTEXDATA
Definition: type_hypergraph.h:49
struct SCIP_Hypergraph_EdgeData SCIP_HYPERGRAPH_EDGEDATA
Definition: type_hypergraph.h:52