8000 Feature: Add method for querying toVertex/fromVertex and steps · Issue #174 · dominikbraun/graph · GitHub
[go: up one dir, main page]

Skip to content

Feature: Add method for querying toVertex/fromVertex and steps #174

Open

Description

@kcmvp

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

Activity

  1. davemcphee commented on May 21, 2024

    @davemcphee

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0