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>) -> IntParameters
groupThe 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
eThe edge to add.
directedIf 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) -> IntParameters
vThe vertex to be added.
Return Value
The index where the vertex was added.
-
Implement
CustomStringConvertibleprotocolNote
Outputs the graph in.dotformatDeclaration
Swift
public var description: String { get }
DependencyGraph Class Reference