graph-traversal

How can I order a list of connections

ぃ、小莉子 提交于 2019-11-30 07:13:41
问题 I currently have a list of connections stored in a list where each connection is a directed link that connects two points and no point ever links to more than one point or is linked to by more than one point. For example: connections = [ (3, 7), (6, 5), (4, 6), (5, 3), (7, 8), (1, 2), (2, 1) ] Should produce: ordered = [ [ 4, 6, 5, 3, 7, 8 ], [ 1, 2, 1 ] ] I have attempt to do this using an algorithm that takes an input point and a list of connections and recursively calls itself to find the

GremlinPipeLine java API chain traversal in Titan graph use cases

泪湿孤枕 提交于 2019-11-29 07:48:46
I have use case where in I have to traverse a chain of vertices starting from a particular vertex. Its a linear chain (like a train) with only one vertex connected to the previous.While traversing I have to emit certain vertices based on some criteria until I reach the end of the chain. The second use case is the extension of the above use case but instead of a single chain starting from a single vertex, there are multiple such chains , again starting from a single vertex. I have to traverse each chain and check for a particular property value in the vertices. When that property match is found

How can I order a list of connections

我怕爱的太早我们不能终老 提交于 2019-11-29 02:04:37
I currently have a list of connections stored in a list where each connection is a directed link that connects two points and no point ever links to more than one point or is linked to by more than one point. For example: connections = [ (3, 7), (6, 5), (4, 6), (5, 3), (7, 8), (1, 2), (2, 1) ] Should produce: ordered = [ [ 4, 6, 5, 3, 7, 8 ], [ 1, 2, 1 ] ] I have attempt to do this using an algorithm that takes an input point and a list of connections and recursively calls itself to find the next point and add it to the growing ordered list. However, my algorithm breaks down when I don't start

GremlinPipeLine java API chain traversal in Titan graph use cases

﹥>﹥吖頭↗ 提交于 2019-11-28 01:35:57
问题 I have use case where in I have to traverse a chain of vertices starting from a particular vertex. Its a linear chain (like a train) with only one vertex connected to the previous.While traversing I have to emit certain vertices based on some criteria until I reach the end of the chain. The second use case is the extension of the above use case but instead of a single chain starting from a single vertex, there are multiple such chains , again starting from a single vertex. I have to traverse