Butterfly

Usage

use Butterfly;
proc combinations(_n: integral, _k: integral)

Calculates the maximum number of inclusions that the AdjListHyperGraph object can contain without duplicates

Returns:an integer representing the number of possible combinations
proc AdjListHyperGraphImpl.vertexHasNeighbor(v, e)

Checks if the given vertex and edge are neighbors

Arguments:
  • v : int(64) – ID of vertex to check
  • e : int(64) – ID of edge to check
Returns:

True if the vertex and edge are neighbors or false if vertex and edge are not neighbors

Return type:

boolean

proc getVertexButterflies(graph: AdjListHyperGraph)

Counts the number of 4-cycles for each vertex and stores that number as an int(64) in an array under the ID of that vertex

Returns:An array of range 0..N where N is the highest vertex ID int the AdjListHyperGraph object
Return type:array of int(64)
iter AdjListHyperGraphImpl.getAdjacentVertices(v)

Yields all vertices that share a neighboring edge with this vertex

Arguments:v : int(64) – ID of the target vertex
Yields:All vertices that share at least one neighboring edge with this vertex
Yield type:array of int(64)
iter AdjListHyperGraphImpl.getAdjacentVertices(v, param tag)

Yields all vertices that share a neighboring edge with this vertex

Arguments:v : int(64) – ID of the target vertex
Yields:All vertices that share at least one neighboring edge with this vertex
Yield type:array of int(64)
proc AdjListHyperGraphImpl.areAdjacentVertices(v, w)

Checks if two vertices share a common neighboring edge

Arguments:
  • v : int(64) – first vertex to compare neighborlists
  • w : int(64) – second vertex to compare neighborlists
Returns:

boolean value indicating the truth of the two input vertices sharing an edge neighbor

Return type:

boolean

proc AdjListHyperGraphImpl.getInclusionNumButterflies(v, e)

Calculates the number of 4-cycles that contain the inclusion defined by the given vertex and edge

Arguments:
  • v : vDescType – the vertex contained in the inclusion to be tested
  • e : eDescType – the edge contained in the inclusion to be tested
Returns:

the number of 4 cylces containing the given inclusion

Return type:

int(64)

proc AdjListHyperGraphImpl.getInclusionNumCaterpillars(v, e)

Calculates the number of 3 cycles that contains the inclusion defined by the given vertex and edge

Arguments:
  • v : vDescType – the vertex contained within the inclusion to be tested
  • e : eDescType – the edge contained within the inclusion to be tested
Returns:

the number of 3 cycles containing the given inclusion

Return type:

int(64)

proc AdjListHyperGraphImpl.getInclusionMetamorphCoef(v, e)

Calculates the metamorphosis coefficient of the inclusion defined by the given vertex and edge

Arguments:
  • v : vDescType – the vertex contained within the inclusion to be tested
  • e : eDescType – the edge contained within the inclusion to be tested
Returns:

the metamorphosis coefficient of the tested inclusion

Return type:

real(64)

proc AdjListHyperGraphImpl.getVertexMetamorphCoefs()

Calcuates the metamorphosis coefficient for every vertex in the AdjListHyperGraph object

Returns:an array of metamorphosis coefficients where the index of each value is the ID of the associated vertex
Return type:real
proc AdjListHyperGraphImpl.getEdgeMetamorphCoefs()

Calcuates the metamorphosis coefficient for every edge in the AdjListHyperGraph object

Returns:an array of metamorphosis coefficients where the index of each value is the ID of the associated edge
Return type:real
iter AdjListHyperGraphImpl.verticesWithDegree(value: int(64))

Fetches all vertices that have the degree queried

Arguments:value : any numeric type that can be cast as int(64) – The desired degree
Yields:Vertices with desired degree
Yield type:vDescType
iter AdjListHyperGraphImpl.verticesWithDegree(value: int(64), param tag: iterKind)

Fetches all vertices that have the degree queried

Arguments:value : any numeric type that can be cast as int(64) – The desired degree
Yields:Vertices with the desired degree
Yield type:vDescType
iter AdjListHyperGraphImpl.edgesWithDegree(value: int(64))

Fetches all edges that have the degree queried

Arguments:value : any numeric type that can be cast as int(64) – The desired degree
Yields:Edges with the desired degree
Yield type:eDescType
iter AdjListHyperGraphImpl.edgesWithDegree(value: int(64), param tag: iterKind)

Fetches all edges that have the degree queried

Arguments:value : any numeric type that can be cast as int(64) – The desired degree
Yields:Edges with the desired degree
Yield type:eDescType
proc AdjListHyperGraphImpl.getVertexPerDegreeMetamorphosisCoefficients()

Calcuates the per degree metamorphosis coefficient for the vertices in the AdjListHyperGraph object

Returns:a list of range 1..n where n is the value of the highest existing degree of all vertices in the AdjListHyperGraph object
Return type:array of int(64)
proc AdjListHyperGraphImpl.getEdgePerDegreeMetamorphosisCoefficients()

Calcuates the per degree metamorphosis coefficient for the edges in the AdjListHyperGraph object

Returns:a list of range 1..n where n is the value of the highest existing degree of all edges in the AdjListHyperGraph object
Return type:array of int(64)
proc getEdgeButterflies(graph: AdjListHyperGraph)

Counts the number of 4-cycles for each edge and stores that number as an int(64) in an array under the ID of that edge

Returns:An array of range 0..N where N is the highest edge ID int the AdjListHyperGraph object
Return type:array of int(64)
proc getVertexCaterpillars(graph: AdjListHyperGraph)

Calcuates the number of 3-cycles that include each vertex

Returns:An array of range 0..n where n is the highest ID of all vertices in the AdjListHyperGraph object
Return type:array of int(64)
proc getEdgeCaterpillars(graph: AdjListHyperGraph)

Calculates the number of 3-cycles that include each edge

Returns:An array of range 0..n where n is the highest ID of all edges in the AdjListHyperGraph object
Return type:array of int(64)