Skip to content

Behavior of getSuccessors() #1746

Answered by alexandernst
alexandernst asked this question in Q&A
Discussion options

You must be logged in to vote

IMHO, in your first example, C and D being successors of A doesn't sound logical, even if deep is set to true. The successors of A should be any elements that are connected to A. If deep is set to true, nested elements should also be considered. But in no reasonable way the parent of A should be considered as a starting point when traversing the graph. Even the semantics of the word deep already provide enough evidence that the direction of the traversal should go down / deep, not up / narrow.

If I had the following graph:

┌────────────────────────────────┐
│          A                     │
│                                │
│    ┌───────────────────────┐   │
│    │                      …

Replies: 3 comments 7 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@kumilingus
Comment options

Comment options

You must be logged in to vote
6 replies
@kumilingus
Comment options

@alexandernst
Comment options

@kumilingus
Comment options

@alexandernst
Comment options

@kumilingus
Comment options

Answer selected by alexandernst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants