EdgeListGraph
public protocol EdgeListGraph : GraphProtocol
An EdgeListGraph is a graph that can enumerate all edges within it.
-
The collection of all edge identifiers.
Declaration
Swift
associatedtype EdgeCollection : Collection where Self.EdgeId == Self.EdgeCollection.Element -
edgeCountDefault implementationThe total number of edges within the graph.
Note:
edgeCountmight have O(|V| + |E|) complexity.Default Implementation
The total number of edges within the graph.
Note:
edgeCountmight have O(|V| + |E|) complexity.Declaration
Swift
var edgeCount: Int { get } -
A collection of edges.
Declaration
Swift
var edges: EdgeCollection { get } -
Returns the source vertex of
edge.Declaration
Swift
func source(of edge: EdgeId) -> VertexId -
Returns the destination vertex of
edge.Declaration
Swift
func destination(of edge: EdgeId) -> VertexId
View on GitHub
EdgeListGraph Protocol Reference