Graph

Usage

use Graph;

Prototype 2-Uniform Hypergraph. Forwards implementation to AdjListHyperGraph and should support simple ‘addEdge(v1,v2)’ and ‘forall (v1, v2) in graph.getEdges()’; everything else should be forwarded to the underlying Hypergraph.

record Graph
var instance
var pid: int = -1
proc init(numVertices: integral, numEdges: integral)
proc init(numVertices: integral, numEdges: integral, mapping)
proc init(numVertices: integral, numEdges: integral, verticesMappings, edgesMappings)
proc _value
proc destroy()
class GraphImpl
var pid: int
var hg
var edgeCounter
type vDescType
var insertAggregator = UninitializedAggregator((hg.vDescType, hg.vDescType, int))
var cachedNeighborListDom: hg.verticesDomain.type
var cachedNeighborList: [cachedNeighborListDom] unmanaged Vector(hg.vDescType)
var privatizedCachedNeighborListInstance = cachedNeighborList._value
var privatizedCachedNeighborListPID = cachedNeighborList._pid
var cacheValid: atomicbool
proc init(numVertices, numEdges, verticesMapping, edgesMapping)
proc init(other: GraphImpl, pid: int)
proc invalidateCache()
proc validateCache()
proc isCacheValid()
proc addEdge(v1: integral, v2: integral)
proc addEdge(v1: hg.vDescType, v2: hg.vDescType)
proc flush()
iter getEdges(): (hg.vDescType, hg.vDescType)
iter getEdges(param tag: iterKind): (hg.vDescType, hg.vDescType)
iter neighbors(v: integral)
iter neighbors(v: integral, param tag: iterKind)
iter neighbors(v: hg.vDescType)
iter neighbors(v: hg.vDescType, param tag: iterKind)
proc hasEdge(v1: integral, v2: integral)
proc hasEdge(v1: integral, v2: hg.vDescType)
proc hasEdge(v1: hg.vDescType, v2: integral)
proc hasEdge(v1: hg.vDescType, v2: hg.vDescType)
proc intersection(_v1, _v2)
proc intersectionSize(_v1, _v2)
proc simplify()
proc degree(v: hg.vDescType)
proc degree(v: integral): int