CompleteGraph

public enum CompleteGraph<V> where V : Decodable, V : Encodable, V : Equatable

A type used to construct UnweightedGraph with vertices of type V that is isomorphic to a complete graph. https://en.wikipedia.org/wiki/Complete_graph

  • Constructs an undirected UnweightedGraph isomorphic to a complete graph.

    Declaration

    Swift

    public static func build(withVertices vertices: [V]) -> UnweightedGraph<V>

    Parameters

    vertices

    The set of vertices of the graph.

    Return Value

    An UnweightedGraph complete graph, a graph with each vertex connected to all the vertices except itself.