graph
graph copied to clipboard
added Vertices() to Graph interface
This is a proposed solution to #130. Alternatively I could see renaming this to ListVertices() and adding a Vertices() that returns the actual vertices, though that might be more challenging since there is currently no Vertex type so conveying the VertexProperties would not happen as it does with Edges() and their corresponding EdgeProperties.
Building on the earlier idea, it might be beneficial to introduce a Vertex type:
type Vertex[T any] struct {
Value T
Properties VertexProperties
}
Then this would enable the ability to create a Vertices() like this:
func Vertices() ([]Vertex[T], error)
Hey @dominikbraun, can this be merged ? I want this method more than ever.