GraphProtocol
public protocol GraphProtocolInterface for graph-like tyes.
- 
                  
                  The type of nodes contained herein. DeclarationSwift associatedtype Node : Hashable where Self.Node == Self.Edge.A
- 
                  
                  The type of edges contained herein. DeclarationSwift associatedtype Edge : SymmetricPair, Hashable
- 
                  remove(_:Default implementation) Removes edgefrom graph.Default ImplementationRemoves the given nodeand removes all edges that contain it.DeclarationSwift mutating func remove(_ edge: Edge)
- 
                  insert(_:Extension method) Inserts the given nodewithout making any connections to other nodes contained herein.DeclarationSwift @inlinable public mutating func insert(_ node: Node)
- 
                  removeEdge(from:Extension methodto: ) 
- 
                  contains(_:Extension method) DeclarationSwift @inlinable public func contains(_ node: Node) -> BoolReturn Valuetrueif theGraphProtocol-conforming type value contains the givennode. Otherwise,false.
- 
                  containsEdge(from:Extension methodto: ) 
- 
                  contains(_:Extension method) Returns: trueif theGraphProtocol-conforming type value contains the givenedge. Otherwise,false.DeclarationSwift @inlinable public func contains(_ edge: Edge) -> Bool
- 
                  neighbors(of:Extension methodin: ) 
- 
                  edges(from:Extension method) 
- 
                  edges(to:Extension method) 
- 
                  breadthFirstSearch(from:Extension methodto: ) 
- 
                  shortestUnweightedPath(from:Extension methodto: ) In the case that there are more than one paths from the given sourceto the givendestination, the path with the fewest edges is returned.DeclarationReturn ValueAn array of Nodevalues from the givensourceto the givendestination.
 View on GitHub
            View on GitHub
           Install in Dash
            Install in Dash
           GraphProtocol Protocol Reference
      GraphProtocol Protocol Reference