Open kcmvp opened 5 months ago
It sounds like PredecessorMap
and AdjacencyMap
already do this. Both return a map[K]map[K]Edge[K]
of incoming (for PredecessorMap
) and outgoing (for AdjacencyMap
) Edges.
Edges have a Source and Target, so you can grab the corresponding Vertices from the Graph using either of those.
right now I haave two cases, which dont have simple way to ahieve 1: query all the direct vertexs( from vertexes) to a specified Vertex 2: query all the direct vertexes(target Vertexs) from a specified Vertex.
there may be similar requirements for different steps, so hope it supplies two method
1: Vertexes.To(hash K, steps int) []Vertex 1: Vertexes.From(hash K, steps int) []Vertex