DependencyGraph
open class DependencyGraph<V> : Graph where V : Decodable, V : Encodable, V : Equatable
Extension of SwiftGraph‘s Graph
class that models a swift dependency graph
-
Undocumented
Declaration
Swift
public var vertices: [V]
-
Undocumented
Declaration
Swift
public var edges: [[DependencyEdge]]
-
Undocumented
Declaration
Swift
public var groupMap: [Int : DependencyGraph<Node>]
-
Undocumented
Declaration
Swift
public init()
-
Undocumented
Declaration
Swift
required public init(vertices: [V])
-
Adds a new group of clustered nodes to the refined graph
Declaration
Swift
public func addGroup(group: DependencyGraph<Node>) -> Int
Parameters
group
The group of clustered nodes
Return Value
The groupID of the newly added group
-
Add an edge to the graph.
Declaration
Swift
public func addEdge(_ e: DependencyEdge, directed: Bool)
Parameters
e
The edge to add.
directed
If false, undirected edges are created. If true, a reversed edge is also created. Default is false.
-
Add a vertex to the graph.
Declaration
Swift
public func addVertex(_ v: V) -> Int
Parameters
v
The vertex to be added.
Return Value
The index where the vertex was added.
-
Implement
CustomStringConvertible
protocolNote
Outputs the graph in.dot
formatDeclaration
Swift
public var description: String { get }