Fetching all trees


Daniel Kuppitz <me@...>
 

Check out the connected components recipe.

Cheers,
Daniel

On Tue, Oct 31, 2017 at 10:53 PM, Ankur Goel <ankur...@...> wrote:
Thnx Marc,

I am also using this, but with this, mentioned query should be aware about all possible connections between vertices in a connected graph. 
Pros: with this approach if any new edge connection happen than for each we have to alter query, time is another dimension also.

I am looking a method that give me all different connected graph by  any vertices without knowing intricacy of the graph: just all connected vertex.

~

On Friday, October 27, 2017 at 4:52:17 PM UTC+5:30, Ankur Goel wrote:
Hi,
i have a graph with following connection ex:

  1. n1--> n2--->n3
  2. n4-->n5
  3. n5
Where n represent node and line between them is edge.

What i am looking janus query should return all connected tree. Does Janus support this?

In above graph it should return 3 trees.

~


 

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/2b187968-97c0-4bb3-aa8c-770853ae1f8e%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


Ankur Goel <ankur...@...>
 

Thnx Marc,

I am also using this, but with this, mentioned query should be aware about all possible connections between vertices in a connected graph. 
Pros: with this approach if any new edge connection happen than for each we have to alter query, time is another dimension also.

I am looking a method that give me all different connected graph by  any vertices without knowing intricacy of the graph: just all connected vertex.

~


On Friday, October 27, 2017 at 4:52:17 PM UTC+5:30, Ankur Goel wrote:
Hi,
i have a graph with following connection ex:

  1. n1--> n2--->n3
  2. n4-->n5
  3. n5
Where n represent node and line between them is edge.

What i am looking janus query should return all connected tree. Does Janus support this?

In above graph it should return 3 trees.

~


 


HadoopMarc <bi...@...>
 

Hi Ankur,

You can experiment witth the repeat step:

gremlin>  g=TinkerFactory.createModern().traversal()
==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
gremlin
> g.V().emit().repeat(out()).times(2).path().by('name')
==>[marko]
==>[marko,lop]
==>[marko,vadas]
==>[marko,josh]
==>[marko,josh,ripple]
==>[marko,josh,lop]
==>[vadas]
==>[lop]
==>[josh]
==>[josh,ripple]
==>[josh,lop]
==>[ripple]
==>[peter]
==>[peter,lop]

Cheers,    Marc

Op vrijdag 27 oktober 2017 13:22:17 UTC+2 schreef Ankur Goel:

Hi,
i have a graph with following connection ex:

  1. n1--> n2--->n3
  2. n4-->n5
  3. n5
Where n represent node and line between them is edge.

What i am looking janus query should return all connected tree. Does Janus support this?

In above graph it should return 3 trees.

~


 


Ankur Goel <ankur...@...>
 

Hi,
i have a graph with following connection ex:

  1. n1--> n2--->n3
  2. n4-->n5
  3. n5
Where n represent node and line between them is edge.

What i am looking janus query should return all connected tree. Does Janus support this?

In above graph it should return 3 trees.

~