GraphProtocol
public protocol GraphProtocol
Represents a Graph data structure.
This is modeled off of the Boost Graph Library; see https://www.boost.org/doc/libs/1_72_0/libs/graph/doc/Graph.html.
-
A handle to refer to a vertex in the graph.
Declaration
Swift
associatedtype VertexId : Equatable
-
A handle to rever to an edge in the graph.
Declaration
Swift
associatedtype EdgeId : Equatable
-
filterEdges(_:
Extension method) Returns a graph where all edges that do not pass a filter are excluded.
Declaration
Swift
public func filterEdges<EdgeFilter: EdgeFilterProtocol>( _ filter: EdgeFilter ) -> EdgeFilterGraph<Self, EdgeFilter> where EdgeFilter.Graph == Self