Graphs
-
Unweighted, undirected graph.
See moreDeclaration
Swift
public struct Graph<Node> : UnweightedGraphProtocol, UndirectedGraphProtocol where Node : Hashable
extension Graph: Equatable
extension Graph: Hashable
-
Weighted, undirected graph.
See moreDeclaration
Swift
public struct WeightedGraph <Node: Hashable, Weight>: WeightedGraphProtocol, UndirectedGraphProtocol
extension WeightedGraph: Equatable where Weight: Equatable
extension WeightedGraph: Hashable where Weight: Hashable
-
Unweighted, directed graph.
See moreDeclaration
Swift
public struct DirectedGraph<Node> : UnweightedGraphProtocol, DirectedGraphProtocol where Node : Hashable
extension DirectedGraph: Equatable
extension DirectedGraph: Hashable
-
Weighted, directed graph.
See moreDeclaration
Swift
public struct WeightedDirectedGraph <Node: Hashable, Weight>: WeightedGraphProtocol, DirectedGraphProtocol
extension WeightedDirectedGraph: Equatable where Weight: Equatable
extension WeightedDirectedGraph: Hashable where Weight: Hashable
-
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>