DirectedAdjacencyListProtocol
public protocol DirectedAdjacencyListProtocol: AdjacencyListProtocol, ParallelGraph
where
VertexEdgeCollection == _AdjacencyList_DirectedVertexEdgeCollection<_EdgeData>,
ParallelProjection == _DirectedAdjacencyList_ParallelProjection<_VertexData>,
EdgeCollection == _AdjacencyList_DirectedEdgeCollection<_Storage>
Adjacency lists whose edges are directed.
-
edgeCountExtension methodThe total number of edges within the graph.
Complexity
O(|V|)Declaration
Swift
public var edgeCount: Int { get } -
edgesExtension methodA collection of all edges in
self.Declaration
Swift
public var edges: EdgeCollection { get } -
source(of:Extension method) Returns the source vertex of
edge.Declaration
Swift
public func source(of edge: EdgeId) -> VertexId -
destination(of:Extension method) Returns the destination vertex of
edge.Declaration
Swift
public func destination(of edge: EdgeId) -> VertexId
-
step(mailboxes:Extension methodglobalState: _: ) Declaration
Swift
public mutating func step< Mailboxes: MailboxesProtocol, GlobalState: MergeableMessage & DefaultInitializable >( mailboxes: inout Mailboxes, globalState: GlobalState, _ fn: VertexParallelFunction<Mailboxes.Mailbox, GlobalState> ) rethrows -> GlobalState where Mailboxes.Mailbox.Graph == ParallelProjection -
parallelStep(mailboxes:Extension methodglobalState: _: ) Executes
fnin parallel across all vertices, usingmailboxesandglobalState; returns the computed newGlobalState.Declaration
Swift
public mutating func parallelStep< Mailboxes: MailboxesProtocol, GlobalState: MergeableMessage & DefaultInitializable >( mailboxes: inout Mailboxes, globalState: GlobalState, _ fn: VertexParallelFunction<Mailboxes.Mailbox, GlobalState> ) rethrows -> GlobalState where Mailboxes.Mailbox.Graph == ParallelProjection -
sequentialStep(mailboxes:Extension methodglobalState: _: ) Executes
fnacross all vertices using only a single thread, usingmailboxesandglobalState; returns the newGlobalState.See also
parallelStepDeclaration
Swift
public mutating func sequentialStep< Mailboxes: MailboxesProtocol, GlobalState: MergeableMessage & DefaultInitializable >( mailboxes: inout Mailboxes, globalState: GlobalState, _ fn: VertexParallelFunction<Mailboxes.Mailbox, GlobalState> ) rethrows -> GlobalState where Mailboxes.Mailbox.Graph == ParallelProjection -
sequentialStep(mailboxes:Extension method_: ) Executes
fnacross all vertices using only a single thread usingmailboxes.Declaration
Swift
public mutating func sequentialStep<Mailboxes: MailboxesProtocol>( mailboxes: inout Mailboxes, _ fn: NoGlobalVertexParallelFunction<Mailboxes.Mailbox> ) rethrows where Mailboxes.Mailbox.Graph == ParallelProjection
View on GitHub
DirectedAdjacencyListProtocol Protocol Reference