MailboxesProtocol

public protocol MailboxesProtocol

Represents the computation-wide communication abstraction for vertex-parallel algorithms.

  • The per-vertex representation of this communication abstraction.

    Declaration

    Swift

    associatedtype Mailbox : MailboxProtocol
  • Transfers messages that were previously sent into the inboxes of the verticies; returns true iff there are messages to be delivered.

    This function is called between every super-step of the vertex-parallel algorithms.

    Declaration

    Swift

    mutating func deliver() -> Bool

    Return Value

    true if there are messages waiting in inboxes; false otherwise.

  • Executes fn passing in the Mailbox for vertex.

    Declaration

    Swift

    mutating func withMailbox(for vertex: Graph.VertexId, _ fn: (inout Mailbox) throws -> Void)
      rethrows

Mailboxes

  • Graph Extension method

    The graph associated with the mailboxes.

    Declaration

    Swift

    public typealias Graph = Mailbox.Graph
  • Message Extension method

    The type of messages that can be sent using this mailbox.

    Declaration

    Swift

    public typealias Message = Mailbox.Message