Conversation
|
I hope we can add such tests to verify that it works properly. At a glance, it seems like we'd not get the intended results. |
|
Because the tracking array is per |
|
I see! That means it should work the same. The only problem is the order of traversal then. I imagined it would only work properly if we do a BFS instead of a DFS, because otherwise deeper paths would prevent shallower paths from being created. Take for example with the following relations to be exposed as subresources: With BFS, we'd have:
But with DFS, we get instead:
Which is not what we want. |
| ]; | ||
|
|
||
| $visiting = "$resourceClass$subresource"; | ||
| $visiting = "$resourceClass$property$subresource"; |
There was a problem hiding this comment.
Let's add spaces to aid debugging? IMO it's not worth the memory savings lol...
32ce9ab to
cd5a8a4
Compare
|
Thanks @soyuka! |
@teohhanhui I don't see the point of setting up a complex
visitedarray for this task. I mean, I could populate an array like in your example, but if I then want to use it to compute the RouteCollection, won't I do the job twice?