Scippy

SCIP

Solving Constraint Integer Programs

hypergraph.h File Reference

Detailed Description

Internal methods for dealing with hypergraphs.

Author
Matthias Walter

A hypergraph \( G \) is a pair \( (V,E) \) of vertices \( v \in V \) and (hyper-)edges \( e \in E \) such that \( e \subseteq V \) holds. We say that a vertex \( v \) and an edge \( e \) are incident if \( v \in e \) holds. A subset \( U \subseteq V \) is called an overlap set if it is a nontrivial intersection of two distinct edges, i.e., if \( U = e \cap f \) for \( e,f \in E \) and \( |U| \geq 2 \). In this case, we say that \( U \) and \( e \) are incident (same for \( f \). We denote the set of overlap sets by \( \mathcal{U} \).

A SCIP_HYPERGRAPH struct defines such a hypergraph \( G = (V,E) \), potentially with the set \( \mathcal{U} \) of overlaps. Efficient access for retrieving elements is provided, e.g., the vertices incident to an edge, the edges incident to a vertex, or the edges incident to an overlap.

Definition in file hypergraph.h.

Go to the source code of this file.

Functions

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 More...
 
SCIP_RETCODE SCIPhypergraphFree (SCIP_HYPERGRAPH **phypergraph)
 frees a hypergraph More...
 
SCIP_RETCODE SCIPhypergraphClear (SCIP_HYPERGRAPH *hypergraph)
 clears a hypergraph, deleting all vertices and edges More...
 
SCIP_RETCODE SCIPhypergraphAddVertex (SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_VERTEX *pvertex, SCIP_HYPERGRAPH_VERTEXDATA **pvertexdata)
 adds a new vertex to the hypergraph More...
 
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 More...
 
SCIP_RETCODE SCIPhypergraphComputeVerticesEdges (SCIP_HYPERGRAPH *hypergraph)
 computes each vertex' list of incident edges More...
 
SCIP_RETCODE SCIPhypergraphComputeOverlaps (SCIP_HYPERGRAPH *hypergraph, SCIP_DECL_HYPERGRAPH_OVERLAP((*handler)), void *userdata)
 computes all overlaps and stores overlaps' vertices and all edges' overlaps More...
 
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 More...
 
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 More...
 
SCIP_RETCODE SCIPhypergraphComputeOverlapsEdges (SCIP_HYPERGRAPH *hypergraph)
 computes all overlaps' lists of incident edges More...
 
SCIP_RETCODE SCIPhypergraphComputeVerticesOverlaps (SCIP_HYPERGRAPH *hypergraph)
 computes all vertices' lists of incident overlaps More...
 
SCIP_Bool SCIPhypergraphOverlapsDisjoint (SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_OVERLAP overlap1, SCIP_HYPERGRAPH_OVERLAP overlap2)
 returns whether overlaps overlap1 and overlap2 are disjoint More...
 
SCIP_Bool SCIPhypergraphIsValid (SCIP_HYPERGRAPH *hypergraph, FILE *file)
 asserts that the hypergraph data structures are valid More...
 
SCIP_RETCODE SCIPhypergraphIterInit (SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_ITER *iterator)
 initializes a hypergraph iterator's internal memory More...
 
void SCIPhypergraphIterClear (SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_ITER *iterator)
 frees a hypergraph iterator's internal memory More...
 
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 More...
 
SCIP_Bool SCIPhypergraphIterValid (SCIP_HYPERGRAPH_ITER *iterator)
 returns whether the iterator is valid More...
 
void SCIPhypergraphIterNext (SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_ITER *iterator)
 initializes the iterator to the first adjacent edge of base More...
 
SCIP_HYPERGRAPH_EDGE SCIPhypergraphIterBase (SCIP_HYPERGRAPH_ITER *iterator)
 returns the base edge More...
 
SCIP_HYPERGRAPH_EDGE SCIPhypergraphIterAdjacent (SCIP_HYPERGRAPH_ITER *iterator)
 returns the current adjacent edge More...
 
SCIP_HYPERGRAPH_VERTEX SCIPhypergraphIterMinVertex (SCIP_HYPERGRAPH_ITER *iterator)
 returns the minimum vertex in the intersection of the base and the current adjacent edge More...
 
SCIP_HYPERGRAPH_OVERLAP SCIPhypergraphIterOverlap (SCIP_HYPERGRAPH_ITER *iterator)
 returns the overlap for the intersection of the base and the current adjacent edge More...
 
SCIP_Bool SCIPhypergraphHasVertexEdges (SCIP_HYPERGRAPH *hypergraph)
 returns whether vertices' incident edges are known. More...
 
SCIP_Bool SCIPhypergraphHasOverlaps (SCIP_HYPERGRAPH *hypergraph)
 returns whether edges' overlaps and overlaps' vertices are known. More...
 
SCIP_Bool SCIPhypergraphHasOverlapsEdges (SCIP_HYPERGRAPH *hypergraph)
 returns whether overlaps' incident edges are known. More...
 
SCIP_Bool SCIPhypergraphHasVertexOverlaps (SCIP_HYPERGRAPH *hypergraph)
 returns whether vertices' incident overlaps are known More...
 
int SCIPhypergraphGetNVertices (SCIP_HYPERGRAPH *hypergraph)
 returns the number of vertices More...
 
int SCIPhypergraphGetNEdges (SCIP_HYPERGRAPH *hypergraph)
 returns the number of edges More...
 
BMS_BLKMEMSCIPhypergraphBlkmem (SCIP_HYPERGRAPH *hypergraph)
 returns the hypergraph's block memory structure More...
 
int SCIPhypergraphGetNOverlaps (SCIP_HYPERGRAPH *hypergraph)
 returns the number of overlaps More...
 
int SCIPhypergraphGetNIncidences (SCIP_HYPERGRAPH *hypergraph)
 returns the number of vertex-edge incidences. More...
 
SCIP_HYPERGRAPH_VERTEXDATASCIPhypergraphVertexData (SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_VERTEX vertex)
 returns additional data of vertex More...
 
SCIP_HYPERGRAPH_EDGEDATASCIPhypergraphEdgeData (SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_EDGE edge)
 returns additional data of edge More...
 
int SCIPhypergraphEdgeSize (SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_EDGE edge)
 returns the number of vertices of edge More...
 
SCIP_HYPERGRAPH_VERTEXSCIPhypergraphEdgeVertices (SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_EDGE edge)
 returns the array of vertices of edge More...
 
int SCIPhypergraphVertexEdgesFirst (SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_VERTEX vertex)
 returns an index for the first edge incident to vertex More...
 
int SCIPhypergraphVertexEdgesBeyond (SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_VERTEX vertex)
 returns an index beyond the last edge incident to vertex More...
 
SCIP_HYPERGRAPH_EDGE SCIPhypergraphVertexEdgesGetAtIndex (SCIP_HYPERGRAPH *hypergraph, int idx)
 returns the edge corresponding to index that is incident to a vertex More...
 
SCIP_HYPERGRAPH_OVERLAPDATASCIPhypergraphOverlapData (SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_OVERLAP overlap)
 returns additional data of overlap More...
 
int SCIPhypergraphOverlapSize (SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_OVERLAP overlap)
 returns the number of vertices of overlap More...
 
SCIP_HYPERGRAPH_VERTEXSCIPhypergraphOverlapVertices (SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_OVERLAP overlap)
 returns the array of sorted vertices of overlap More...
 
int SCIPhypergraphEdgesOverlapsFirst (SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_EDGE edge)
 returns an index for the first overlap incident to edge More...
 
int SCIPhypergraphEdgesOverlapsBeyond (SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_EDGE edge)
 returns an index beyond the last overlap incident to edge More...
 
SCIP_HYPERGRAPH_OVERLAP SCIPhypergraphEdgesOverlapsGetAtIndex (SCIP_HYPERGRAPH *hypergraph, int idx)
 returns the overlap corresponding to index that is incident to an edge More...
 
int SCIPhypergraphOverlapsEdgesFirst (SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_OVERLAP overlap)
 returns an index for the first edge incident to overlap More...
 
int SCIPhypergraphOverlapsEdgesBeyond (SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_OVERLAP overlap)
 returns an index beyond the last edge incident to overlap More...
 
SCIP_HYPERGRAPH_OVERLAP SCIPhypergraphOverlapsEdgesGetAtIndex (SCIP_HYPERGRAPH *hypergraph, int idx)
 returns the edge corresponding to index that is incident to an overlap More...
 
int SCIPhypergraphVertexOverlapsFirst (SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_VERTEX vertex)
 returns an index for the first overlap containing vertex More...
 
int SCIPhypergraphVertexOverlapsBeyond (SCIP_HYPERGRAPH *hypergraph, SCIP_HYPERGRAPH_VERTEX vertex)
 returns an index beyond the last overlap incident to vertex More...
 
SCIP_HYPERGRAPH_OVERLAP SCIPhypergraphVertexOverlapsGetAtIndex (SCIP_HYPERGRAPH *hypergraph, int idx)
 returns the overlap corresponding to index that is incident to a vertex More...
 

Function Documentation

◆ SCIPhypergraphCreate()

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

Parameters
phypergraphPointer for storing the hypergraph.
blkmemBlock memory for storage.
memverticesUpper bound on expected number of vertices.
memedgesUpper bound on expected number of edges.
memoverlapsUpper bound on expected number of overlaps.
memedgesverticesUpper bound on expected average size of edges.
sizevertexdataSize (in bytes) of additional vertex data.
sizeedgedataSize (in bytes) of additional edge data.
sizeoverlapdataSize (in bytes) of additional overlap data.

Definition at line 210 of file hypergraph.c.

References SCIP_Hypergraph::blkmem, BMSallocBlockMemory, SCIP_Hypergraph::edgesdata, SCIP_Hypergraph::edgesoverlaps, SCIP_Hypergraph::edgesoverlapsbeg, SCIP_Hypergraph::edgesvertices, SCIP_Hypergraph::edgesverticesbeg, ensureNumEdges(), ensureNumEdgesVertices(), ensureNumOverlaps(), ensureNumVertices(), SCIP_Hypergraph::memedges, SCIP_Hypergraph::memedgesoverlaps, SCIP_Hypergraph::memedgesoverlapsbeg, SCIP_Hypergraph::memedgesvertices, SCIP_Hypergraph::memoverlaps, SCIP_Hypergraph::memoverlapsedges, SCIP_Hypergraph::memoverlapsedgesbeg, SCIP_Hypergraph::memoverlapsvertices, SCIP_Hypergraph::memvertices, SCIP_Hypergraph::memverticesedges, SCIP_Hypergraph::memverticesedgesbeg, SCIP_Hypergraph::memverticesoverlaps, SCIP_Hypergraph::memverticesoverlapsbeg, NULL, SCIP_Hypergraph::overlaphashtable, SCIP_Hypergraph::overlapsdata, SCIP_Hypergraph::overlapsedges, SCIP_Hypergraph::overlapsedgesbeg, SCIP_Hypergraph::overlapsvertices, SCIP_Hypergraph::overlapsverticesbeg, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIPhypergraphClear(), SCIP_Hypergraph::sizeedgedata, SCIP_Hypergraph::sizeoverlapdata, SCIP_Hypergraph::sizevertexdata, SCIP_Hypergraph::verticesdata, SCIP_Hypergraph::verticesedges, SCIP_Hypergraph::verticesedgesbeg, SCIP_Hypergraph::verticesoverlaps, and SCIP_Hypergraph::verticesoverlapsbeg.

Referenced by constructHypergraph().

◆ SCIPhypergraphFree()

SCIP_RETCODE SCIPhypergraphFree ( SCIP_HYPERGRAPH **  phypergraph)

◆ SCIPhypergraphClear()

◆ SCIPhypergraphAddVertex()

SCIP_RETCODE SCIPhypergraphAddVertex ( SCIP_HYPERGRAPH hypergraph,
SCIP_HYPERGRAPH_VERTEX pvertex,
SCIP_HYPERGRAPH_VERTEXDATA **  pvertexdata 
)

adds a new vertex to the hypergraph

Parameters
hypergraphThe hypergraph.
pvertexPointer for storing the new vertex.
pvertexdataPointer for returning the vertex's data (may be NULL).

Definition at line 386 of file hypergraph.c.

References ensureNumVertices(), FALSE, SCIP_Hypergraph::hasvertexedges, NULL, SCIP_Hypergraph::nvertices, SCIP_CALL, SCIP_OKAY, SCIP_Hypergraph::sizevertexdata, and SCIP_Hypergraph::verticesdata.

Referenced by constructHypergraph().

◆ SCIPhypergraphAddEdge()

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

Does not update the vertices' or overlaps' lists of incident edges.

Parameters
hypergraphThe hypergraph.
nverticesNumber of vertices of this edge.
verticesArray with vertices.
pedgePointer for storing the new edge.
pedgedataPointer for returning the edge's data (may be NULL).

Definition at line 416 of file hypergraph.c.

References SCIP_Hypergraph::edgesdata, SCIP_Hypergraph::edgesvertices, SCIP_Hypergraph::edgesverticesbeg, ensureNumEdges(), ensureNumEdgesVertices(), FALSE, SCIP_Hypergraph::hasvertexedges, SCIP_Hypergraph::nedges, NULL, SCIP_CALL, SCIP_OKAY, SCIPsortInt(), and SCIP_Hypergraph::sizeedgedata.

Referenced by constructHypergraph().

◆ SCIPhypergraphComputeVerticesEdges()

◆ SCIPhypergraphComputeOverlaps()

◆ SCIPhypergraphOverlapFind()

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

Requires SCIPhypergraphHasOverlaps to be TRUE which results from SCIPhypergraphComputeOverlaps.

Parameters
hypergraphThe hypergraph.
nverticesNumber of vertices.
verticesSorted array of vertices.
poverlapPointer for storing the overlap.

Definition at line 906 of file hypergraph.c.

References FALSE, findOverlap(), SCIP_Hypergraph::hasoverlaps, NULL, SCIP_CALL, and SCIP_OKAY.

◆ SCIPhypergraphIntersectEdges()

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

Requires SCIPhypergraphHasOverlaps to be TRUE which results from SCIPhypergraphComputeOverlaps.

Parameters
hypergraphThe hypergraph.
firstFirst edge to intersect.
secondSecond edge to intersect.
poverlapPointer for storing the overlap.
pvertexPointer for storing the vertex.

Definition at line 929 of file hypergraph.c.

References SCIP_Hypergraph::blkmem, BMSallocBlockMemoryArray, BMSfreeBlockMemoryArray, SCIP_Hypergraph::edgesvertices, SCIP_Hypergraph::edgesverticesbeg, FALSE, findOverlap(), SCIP_Hypergraph::hasoverlaps, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIPhypergraphEdgeSize(), and w.

◆ SCIPhypergraphComputeOverlapsEdges()

◆ SCIPhypergraphComputeVerticesOverlaps()

◆ SCIPhypergraphOverlapsDisjoint()

SCIP_Bool SCIPhypergraphOverlapsDisjoint ( SCIP_HYPERGRAPH hypergraph,
SCIP_HYPERGRAPH_OVERLAP  overlap1,
SCIP_HYPERGRAPH_OVERLAP  overlap2 
)

returns whether overlaps overlap1 and overlap2 are disjoint

Parameters
hypergraphThe hypergraph.
overlap1First overlap.
overlap2Second overlap.

Definition at line 1187 of file hypergraph.c.

References FALSE, SCIPhypergraphOverlapSize(), SCIPhypergraphOverlapVertices(), and TRUE.

Referenced by separateTwoFlower().

◆ SCIPhypergraphIsValid()

◆ SCIPhypergraphIterInit()

◆ SCIPhypergraphIterClear()

void SCIPhypergraphIterClear ( SCIP_HYPERGRAPH hypergraph,
SCIP_HYPERGRAPH_ITER iterator 
)

frees a hypergraph iterator's internal memory

Parameters
hypergraphThe hypergraph of this iterator.
iteratorIterator to be cleared.

Definition at line 1494 of file hypergraph.c.

References SCIP_Hypergraph::blkmem, BMSfreeBlockMemoryArray, SCIP_Hypergraph_Iter::commonvertices, and SCIP_Hypergraph_Iter::sizecommonvertices.

◆ SCIPhypergraphIterStart()

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

findoverlaps indicates whether the overlap corresponding to each edge intersection shall be determined. This requires SCIPhypergraphHasOverlaps.

Parameters
hypergraphThe hypergraph of this iterator.
iteratorIterator to be initialized.
baseBase edge.
minoverlapsizeMinimum size of the overlap.
onlylaterWhether to only consider edges greater than base.
findoverlapsWhether to compute the overlap sets.

Definition at line 1506 of file hypergraph.c.

References SCIP_Hypergraph_Iter::adjacent, SCIP_Hypergraph_Iter::base, SCIP_Hypergraph_Iter::edgeidx, SCIP_Hypergraph_Iter::findoverlaps, SCIP_Hypergraph::hasoverlaps, SCIP_Hypergraph::hasvertexedges, SCIP_Hypergraph_Iter::minoverlapsize, SCIP_Hypergraph_Iter::minvertex, SCIP_Hypergraph_Iter::ncommonvertices, SCIP_Hypergraph_Iter::onlylater, SCIP_Hypergraph_Iter::overlap, SCIPhypergraphIterNext(), and SCIP_Hypergraph_Iter::vertexidx.

◆ SCIPhypergraphIterValid()

SCIP_Bool SCIPhypergraphIterValid ( SCIP_HYPERGRAPH_ITER iterator)

returns whether the iterator is valid

Parameters
iteratorIterator.

Definition at line 1537 of file hypergraph.c.

References SCIP_Hypergraph_Iter::vertexidx.

◆ SCIPhypergraphIterNext()

◆ SCIPhypergraphIterBase()

SCIP_HYPERGRAPH_EDGE SCIPhypergraphIterBase ( SCIP_HYPERGRAPH_ITER iterator)

returns the base edge

Parameters
iteratorIterator.

Definition at line 1685 of file hypergraph.c.

References SCIP_Hypergraph_Iter::base.

◆ SCIPhypergraphIterAdjacent()

SCIP_HYPERGRAPH_EDGE SCIPhypergraphIterAdjacent ( SCIP_HYPERGRAPH_ITER iterator)

returns the current adjacent edge

Parameters
iteratorIterator.

Definition at line 1693 of file hypergraph.c.

References SCIP_Hypergraph_Iter::adjacent.

◆ SCIPhypergraphIterMinVertex()

SCIP_HYPERGRAPH_VERTEX SCIPhypergraphIterMinVertex ( SCIP_HYPERGRAPH_ITER iterator)

returns the minimum vertex in the intersection of the base and the current adjacent edge

Parameters
iteratorIterator.

Definition at line 1701 of file hypergraph.c.

References SCIP_Hypergraph_Iter::minvertex.

◆ SCIPhypergraphIterOverlap()

SCIP_HYPERGRAPH_OVERLAP SCIPhypergraphIterOverlap ( SCIP_HYPERGRAPH_ITER iterator)

returns the overlap for the intersection of the base and the current adjacent edge

If the intersection of the two edges has only one element, then -1 is returned, and if overlap information was not requested in SCIPhypergraphIterStart, then -2 is returned.

Parameters
iteratorIterator.

Definition at line 1714 of file hypergraph.c.

References SCIP_Hypergraph_Iter::overlap.

◆ SCIPhypergraphHasVertexEdges()

SCIP_Bool SCIPhypergraphHasVertexEdges ( SCIP_HYPERGRAPH hypergraph)

returns whether vertices' incident edges are known.

Use SCIPhypergraphComputeVerticesEdges to compute them.

Parameters
hypergraphThe hypergraph.

Definition at line 1883 of file hypergraph.c.

References SCIP_Hypergraph::hasvertexedges.

Referenced by SCIPhypergraphIsValid().

◆ SCIPhypergraphHasOverlaps()

SCIP_Bool SCIPhypergraphHasOverlaps ( SCIP_HYPERGRAPH hypergraph)

returns whether edges' overlaps and overlaps' vertices are known.

Use SCIPhypergraphComputeOverlaps to compute them.

Parameters
hypergraphThe hypergraph.

Definition at line 1937 of file hypergraph.c.

References SCIP_Hypergraph::hasoverlaps.

Referenced by SCIPhypergraphIsValid().

◆ SCIPhypergraphHasOverlapsEdges()

SCIP_Bool SCIPhypergraphHasOverlapsEdges ( SCIP_HYPERGRAPH hypergraph)

returns whether overlaps' incident edges are known.

Use SCIPhypergraphComputeOverlapsEdges to compute them.

Parameters
hypergraphThe hypergraph.

Definition at line 2029 of file hypergraph.c.

References SCIP_Hypergraph::hasoverlapsedges.

◆ SCIPhypergraphHasVertexOverlaps()

SCIP_Bool SCIPhypergraphHasVertexOverlaps ( SCIP_HYPERGRAPH hypergraph)

returns whether vertices' incident overlaps are known

Use SCIPhypergraphComputeOverlaps to compute them.

Parameters
hypergraphThe hypergraph.

Definition at line 2085 of file hypergraph.c.

References SCIP_Hypergraph::hasverticesoverlaps.

◆ SCIPhypergraphGetNVertices()

int SCIPhypergraphGetNVertices ( SCIP_HYPERGRAPH hypergraph)

returns the number of vertices

Parameters
hypergraphThe hypergraph.

Definition at line 1764 of file hypergraph.c.

References SCIP_Hypergraph::nvertices.

Referenced by constructHypergraph(), prepareSeparation(), and SCIPhypergraphIsValid().

◆ SCIPhypergraphGetNEdges()

int SCIPhypergraphGetNEdges ( SCIP_HYPERGRAPH hypergraph)

returns the number of edges

Parameters
hypergraphThe hypergraph.

Definition at line 1774 of file hypergraph.c.

References SCIP_Hypergraph::nedges.

Referenced by constructHypergraph(), prepareSeparation(), SCIPhypergraphIsValid(), separateOneFlower(), separateStandard(), and separateTwoFlower().

◆ SCIPhypergraphBlkmem()

BMS_BLKMEM * SCIPhypergraphBlkmem ( SCIP_HYPERGRAPH hypergraph)

returns the hypergraph's block memory structure

Parameters
hypergraphThe hypergraph.

Definition at line 1784 of file hypergraph.c.

References SCIP_Hypergraph::blkmem, and NULL.

◆ SCIPhypergraphGetNOverlaps()

int SCIPhypergraphGetNOverlaps ( SCIP_HYPERGRAPH hypergraph)

returns the number of overlaps

Parameters
hypergraphThe hypergraph.

Definition at line 1794 of file hypergraph.c.

References SCIP_Hypergraph::noverlaps.

Referenced by constructHypergraph(), prepareSeparation(), and separate().

◆ SCIPhypergraphGetNIncidences()

int SCIPhypergraphGetNIncidences ( SCIP_HYPERGRAPH hypergraph)

returns the number of vertex-edge incidences.

returns the number of vertex-edge incidences.

Parameters
hypergraphThe hypergraph.

Definition at line 1804 of file hypergraph.c.

References SCIP_Hypergraph::edgesverticesbeg, and SCIP_Hypergraph::nedges.

Referenced by SCIPhypergraphIsValid().

◆ SCIPhypergraphVertexData()

SCIP_HYPERGRAPH_VERTEXDATA * SCIPhypergraphVertexData ( SCIP_HYPERGRAPH hypergraph,
SCIP_HYPERGRAPH_VERTEX  vertex 
)

returns additional data of vertex

Parameters
hypergraphThe hypergraph.
vertexA vertex.

Definition at line 1814 of file hypergraph.c.

References NULL, SCIP_Hypergraph::sizevertexdata, and SCIP_Hypergraph::verticesdata.

Referenced by prepareSeparation(), separateOneFlower(), separateStandard(), and separateTwoFlower().

◆ SCIPhypergraphEdgeData()

SCIP_HYPERGRAPH_EDGEDATA * SCIPhypergraphEdgeData ( SCIP_HYPERGRAPH hypergraph,
SCIP_HYPERGRAPH_EDGE  edge 
)

returns additional data of edge

Parameters
hypergraphThe hypergraph.
edgeEdge.

Definition at line 1826 of file hypergraph.c.

References SCIP_Hypergraph::edgesdata, NULL, and SCIP_Hypergraph::sizeedgedata.

Referenced by prepareSeparation(), separateOneFlower(), separateStandard(), and separateTwoFlower().

◆ SCIPhypergraphEdgeSize()

int SCIPhypergraphEdgeSize ( SCIP_HYPERGRAPH hypergraph,
SCIP_HYPERGRAPH_EDGE  edge 
)

returns the number of vertices of edge

Parameters
hypergraphThe hypergraph.
edgeEdge.

Definition at line 1850 of file hypergraph.c.

References SCIP_Hypergraph::edgesverticesbeg.

Referenced by prepareSeparation(), SCIPhypergraphIntersectEdges(), SCIPhypergraphIsValid(), separateOneFlower(), separateStandard(), and separateTwoFlower().

◆ SCIPhypergraphEdgeVertices()

SCIP_HYPERGRAPH_VERTEX * SCIPhypergraphEdgeVertices ( SCIP_HYPERGRAPH hypergraph,
SCIP_HYPERGRAPH_EDGE  edge 
)

returns the array of vertices of edge

The length of the array is SCIPhypergraphEdgeSize.

Parameters
hypergraphThe hypergraph.
edgeAn edge.

Definition at line 1867 of file hypergraph.c.

References SCIP_Hypergraph::edgesvertices, and SCIP_Hypergraph::edgesverticesbeg.

Referenced by prepareSeparation(), SCIPhypergraphIsValid(), separateOneFlower(), separateStandard(), and separateTwoFlower().

◆ SCIPhypergraphVertexEdgesFirst()

int SCIPhypergraphVertexEdgesFirst ( SCIP_HYPERGRAPH hypergraph,
SCIP_HYPERGRAPH_VERTEX  vertex 
)

returns an index for the first edge incident to vertex

Parameters
hypergraphThe hypergraph.
vertexA vertex.

Definition at line 1893 of file hypergraph.c.

References SCIP_Hypergraph::hasvertexedges, and SCIP_Hypergraph::verticesedgesbeg.

Referenced by SCIPhypergraphIsValid().

◆ SCIPhypergraphVertexEdgesBeyond()

int SCIPhypergraphVertexEdgesBeyond ( SCIP_HYPERGRAPH hypergraph,
SCIP_HYPERGRAPH_VERTEX  vertex 
)

returns an index beyond the last edge incident to vertex

Parameters
hypergraphThe hypergraph.
vertexA vertex.

Definition at line 1905 of file hypergraph.c.

References SCIP_Hypergraph::hasvertexedges, and SCIP_Hypergraph::verticesedgesbeg.

Referenced by SCIPhypergraphIsValid().

◆ SCIPhypergraphVertexEdgesGetAtIndex()

SCIP_HYPERGRAPH_EDGE SCIPhypergraphVertexEdgesGetAtIndex ( SCIP_HYPERGRAPH hypergraph,
int  idx 
)

returns the edge corresponding to index that is incident to a vertex

See SCIPhypergraphVertexEdgesFirst and SCIPhypergraphVertexEdgesBeyond to obtain such indices for a vertex.

Parameters
hypergraphThe hypergraph.
idxIndex.

Definition at line 1921 of file hypergraph.c.

References SCIP_Hypergraph::hasvertexedges, and SCIP_Hypergraph::verticesedges.

Referenced by SCIPhypergraphIsValid().

◆ SCIPhypergraphOverlapData()

SCIP_HYPERGRAPH_OVERLAPDATA * SCIPhypergraphOverlapData ( SCIP_HYPERGRAPH hypergraph,
SCIP_HYPERGRAPH_OVERLAP  overlap 
)

returns additional data of overlap

Parameters
hypergraphThe hypergraph.
overlapOverlap.

Definition at line 1838 of file hypergraph.c.

References NULL, SCIP_Hypergraph::overlapsdata, and SCIP_Hypergraph::sizeoverlapdata.

Referenced by prepareSeparation(), SCIPhypergraphComputeOverlaps(), separateOneFlower(), and separateTwoFlower().

◆ SCIPhypergraphOverlapSize()

int SCIPhypergraphOverlapSize ( SCIP_HYPERGRAPH hypergraph,
SCIP_HYPERGRAPH_OVERLAP  overlap 
)

returns the number of vertices of overlap

Requires SCIPhypergraphHasOverlaps to be TRUE which results from SCIPhypergraphComputeOverlaps.

Parameters
hypergraphThe hypergraph.
overlapOverlap.

Definition at line 1951 of file hypergraph.c.

References SCIP_Hypergraph::hasoverlaps, and SCIP_Hypergraph::overlapsverticesbeg.

Referenced by prepareSeparation(), SCIPhypergraphIsValid(), SCIPhypergraphOverlapsDisjoint(), separateOneFlower(), and separateTwoFlower().

◆ SCIPhypergraphOverlapVertices()

SCIP_HYPERGRAPH_VERTEX * SCIPhypergraphOverlapVertices ( SCIP_HYPERGRAPH hypergraph,
SCIP_HYPERGRAPH_OVERLAP  overlap 
)

returns the array of sorted vertices of overlap

The length of the array is SCIPhypergraphOverlapSize. Requires SCIPhypergraphHasOverlaps to be TRUE which results from SCIPhypergraphComputeOverlaps.

Parameters
hypergraphThe hypergraph.
overlapOverlap.

Definition at line 1969 of file hypergraph.c.

References SCIP_Hypergraph::hasoverlaps, SCIP_Hypergraph::overlapsvertices, and SCIP_Hypergraph::overlapsverticesbeg.

Referenced by prepareSeparation(), SCIPhypergraphIsValid(), SCIPhypergraphOverlapsDisjoint(), separateOneFlower(), and separateTwoFlower().

◆ SCIPhypergraphEdgesOverlapsFirst()

int SCIPhypergraphEdgesOverlapsFirst ( SCIP_HYPERGRAPH hypergraph,
SCIP_HYPERGRAPH_EDGE  edge 
)

returns an index for the first overlap incident to edge

Parameters
hypergraphThe hypergraph.
edgeEdge.

Definition at line 1982 of file hypergraph.c.

References SCIP_Hypergraph::edgesoverlapsbeg, and SCIP_Hypergraph::hasoverlaps.

Referenced by prepareSeparation(), SCIPhypergraphIsValid(), separateOneFlower(), and separateTwoFlower().

◆ SCIPhypergraphEdgesOverlapsBeyond()

int SCIPhypergraphEdgesOverlapsBeyond ( SCIP_HYPERGRAPH hypergraph,
SCIP_HYPERGRAPH_EDGE  edge 
)

returns an index beyond the last overlap incident to edge

Parameters
hypergraphThe hypergraph.
edgeEdge.

Definition at line 1995 of file hypergraph.c.

References SCIP_Hypergraph::edgesoverlapsbeg, and SCIP_Hypergraph::hasoverlaps.

Referenced by prepareSeparation(), SCIPhypergraphIsValid(), separateOneFlower(), and separateTwoFlower().

◆ SCIPhypergraphEdgesOverlapsGetAtIndex()

SCIP_HYPERGRAPH_OVERLAP SCIPhypergraphEdgesOverlapsGetAtIndex ( SCIP_HYPERGRAPH hypergraph,
int  idx 
)

returns the overlap corresponding to index that is incident to an edge

See SCIPhypergraphEdgesOverlapsFirst and SCIPhypergraphEdgesOverlapsBeyond to obtain such indices for an edge.

returns the overlap corresponding to index that is incident to an edge

See SCIPhypergraphEdgesOverlapsFirst and SCIPhypergraphEdgesOverlapsBeyond to obtain such indices for an edge.

Parameters
hypergraphThe hypergraph.
idxIndex.

Definition at line 2013 of file hypergraph.c.

References SCIP_Hypergraph::edgesoverlaps, and SCIP_Hypergraph::hasoverlaps.

Referenced by prepareSeparation(), SCIPhypergraphIsValid(), separateOneFlower(), and separateTwoFlower().

◆ SCIPhypergraphOverlapsEdgesFirst()

int SCIPhypergraphOverlapsEdgesFirst ( SCIP_HYPERGRAPH hypergraph,
SCIP_HYPERGRAPH_OVERLAP  overlap 
)

returns an index for the first edge incident to overlap

Parameters
hypergraphThe hypergraph.
overlapOverlap.

Definition at line 2039 of file hypergraph.c.

References SCIP_Hypergraph::hasoverlapsedges, and SCIP_Hypergraph::overlapsedgesbeg.

◆ SCIPhypergraphOverlapsEdgesBeyond()

int SCIPhypergraphOverlapsEdgesBeyond ( SCIP_HYPERGRAPH hypergraph,
SCIP_HYPERGRAPH_OVERLAP  overlap 
)

returns an index beyond the last edge incident to overlap

Parameters
hypergraphThe hypergraph.
overlapOverlap.

Definition at line 2051 of file hypergraph.c.

References SCIP_Hypergraph::hasoverlapsedges, and SCIP_Hypergraph::overlapsedgesbeg.

◆ SCIPhypergraphOverlapsEdgesGetAtIndex()

SCIP_HYPERGRAPH_OVERLAP SCIPhypergraphOverlapsEdgesGetAtIndex ( SCIP_HYPERGRAPH hypergraph,
int  idx 
)

returns the edge corresponding to index that is incident to an overlap

See SCIPhypergraphOverlapsEdgesFirst and SCIPhypergraphOverlapsEdgesBeyond to obtain such indices for an overlap.

returns the edge corresponding to index that is incident to an overlap

See SCIPhypergraphOverlapsEdgesFirst and SCIPhypergraphOverlapsEdgesBeyond to obtain such indices for an overlap.

Parameters
hypergraphThe hypergraph.
idxIndex.

Definition at line 2068 of file hypergraph.c.

References SCIP_Hypergraph::hasoverlapsedges, and SCIP_Hypergraph::overlapsedges.

◆ SCIPhypergraphVertexOverlapsFirst()

int SCIPhypergraphVertexOverlapsFirst ( SCIP_HYPERGRAPH hypergraph,
SCIP_HYPERGRAPH_VERTEX  vertex 
)

returns an index for the first overlap containing vertex

Parameters
hypergraphThe hypergraph.
vertexA vertex.

Definition at line 2095 of file hypergraph.c.

References SCIP_Hypergraph::hasverticesoverlaps, and SCIP_Hypergraph::verticesoverlapsbeg.

◆ SCIPhypergraphVertexOverlapsBeyond()

int SCIPhypergraphVertexOverlapsBeyond ( SCIP_HYPERGRAPH hypergraph,
SCIP_HYPERGRAPH_VERTEX  vertex 
)

returns an index beyond the last overlap incident to vertex

Parameters
hypergraphThe hypergraph.
vertexA vertex.

Definition at line 2107 of file hypergraph.c.

References SCIP_Hypergraph::hasverticesoverlaps, and SCIP_Hypergraph::verticesoverlapsbeg.

◆ SCIPhypergraphVertexOverlapsGetAtIndex()

SCIP_HYPERGRAPH_OVERLAP SCIPhypergraphVertexOverlapsGetAtIndex ( SCIP_HYPERGRAPH hypergraph,
int  idx 
)

returns the overlap corresponding to index that is incident to a vertex

See SCIPhypergraphVertexOverlapsFirst and SCIPhypergraphVertexOverlapsBeyond to obtain such indices for a vertex.

returns the overlap corresponding to index that is incident to a vertex

See SCIPhypergraphVertexOverlapsFirst and SCIPhypergraphVertexOverlapsBeyond to obtain such indices for a vertex.

Parameters
hypergraphThe hypergraph.
idxIndex.

Definition at line 2124 of file hypergraph.c.

References SCIP_Hypergraph::hasverticesoverlaps, and SCIP_Hypergraph::verticesoverlaps.