Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带有 :node-left 和 :node-right 的树结构,它们连接相同类型的实体,直到这些属性不存在。
我有兴趣查询从根到叶子的路径,因此结果将是一个类型为 ([root, node1, leaf11] [root, node2, leaf21]) 的向量。
虽然您可以使用查询来做到这一点,但您也可以看看直接实现图形算法。这篇博文展示了这两种方法的示例。