StarGraph
public enum StarGraph<V> where V : Decodable, V : Encodable, V : Equatable
A type used to construct an UnweightedGraph with vertices of type V that is isomorphic to a star graph. https://en.wikipedia.org/wiki/Star_(graph_theory)
-
Constructs an undirected UnweightedGraph isomorphic to a star graph.
Declaration
Swift
public static func build(withCenter center: V, andLeafs leafs: [V]) -> UnweightedGraph<V>Parameters
centerThe vertex that is connected to all vertices except itself.
leafsThe set of vertices that are connected only to the center vertex.
Return Value
An UnweightedGraph star graph with the center vertex connected to all the leafs. The leafs are only connected to the center
View on GitHub
StarGraph Enumeration Reference