UndirectedAdjacencyList

public struct UndirectedAdjacencyList<
  Vertex: DefaultInitializable,
  Edge: DefaultInitializable,
  RawId: BinaryInteger & IdIndexable
>: UndirectedAdjacencyListProtocol, SearchDefaultsGraph where RawId.Stride: SignedInteger

Undocumented

EdgeListGraph

PropertyGraph

SearchDefaultsGraph

MutablePropertyGraph

  • Adds a new vertex with associated vertexProperty, returning its identifier.

    Complexity

    O(1) (amortized)

    Declaration

    Swift

    public mutating func addVertex(storing vertexProperty: Vertex) -> VertexId
  • Adds a new edge from source to destination and associated edgeProperty, returning its identifier.

    Complexity

    O(1) (amortized)

    Declaration

    Swift

    public mutating func addEdge(
      from source: VertexId, to destination: VertexId, storing edgeProperty: Edge
    ) -> EdgeId

Mutable graph operations