Skip to content

[Q&A] How to capture path length? #842

@morristai

Description

@morristai

How to let pygrahistry to preserve the path length from root to each given node? Suppose I want to search 3 hops starting from Niaj. Using hops=3 will return all the nodes that occur in the result, but it won’t include the path lengths. To include path lengths, I could perform the hops step by step in order to add tag columns(hop1, hop2, etc.). However, if a node is the last one before the final step, it will be dropped after performing the next hop. As a result, only nodes that can actually be reached within the given number of hops are captured.

Image Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions