Graphs
-
Unweighted, undirected graph.
See moreDeclaration
Swift
public struct Graph<Node> : UnweightedGraphProtocol, UndirectedGraphProtocol where Node : Hashableextension Graph: Equatableextension Graph: Hashable -
Weighted, undirected graph.
See moreDeclaration
Swift
public struct WeightedGraph <Node: Hashable, Weight>: WeightedGraphProtocol, UndirectedGraphProtocolextension WeightedGraph: Equatable where Weight: Equatableextension WeightedGraph: Hashable where Weight: Hashable -
Unweighted, directed graph.
See moreDeclaration
Swift
public struct DirectedGraph<Node> : UnweightedGraphProtocol, DirectedGraphProtocol where Node : Hashableextension DirectedGraph: Equatableextension DirectedGraph: Hashable -
Weighted, directed graph.
See moreDeclaration
Swift
public struct WeightedDirectedGraph <Node: Hashable, Weight>: WeightedGraphProtocol, DirectedGraphProtocolextension WeightedDirectedGraph: Equatable where Weight: Equatableextension WeightedDirectedGraph: Hashable where Weight: Hashable -
See more
Todo
Make Generic over some type.Declaration
Swift
public class ReferenceGraph -
Interface for graph-like tyes.
See moreDeclaration
Swift
public protocol GraphProtocol -
Interface for weighted graphs.
See moreDeclaration
Swift
public protocol WeightedGraphProtocol : GraphProtocol -
Interface for unweighted graphs.
See moreDeclaration
Swift
public protocol UnweightedGraphProtocol : GraphProtocol -
Interface for directed graphs.
Declaration
Swift
public protocol DirectedGraphProtocol : GraphProtocol where Self.Edge == OrderedPair<Self.Node> -
Interface for undirected graphs.
Declaration
Swift
public protocol UndirectedGraphProtocol : GraphProtocol where Self.Edge == UnorderedPair<Self.Node>
View on GitHub
Install in Dash
Graphs Reference