GraphStream Users

Archives de la liste Aide

Re: graph cycle checking?

Chronologique Discussions 
  • From: Yoann Pigné <yoann.pigne AT>
  • To: graphstream-users AT, org.graphstream AT
  • Subject: Re: graph cycle checking?
  • Date: Thu, 30 Jan 2014 17:42:45 +0100

Hi M,

No cycle checking implemented in GS, no.

Maybe you can create a pipe that will filter event before the graph : SOURCE

In that filter (Pipe) for each new edge event, check the 2 nodes, see their
already existing incoming connections, and you'll be able to decide if that
new edge **would** create a cycle. If true, drop the event. If not, then
forward the event.

This Pipe should extend the default Pipe :
and overwrite the "edgeAdded" method.



On Dec 12, 2013, at 3:08 PM,
org.graphstream AT

> 'Lo.
> I'm evaluating graphstream for use in a real-time 3D renderer. I've had
> look through the documentation and can't seem to see if graphstream
> implements cycle checking. That is, is it possible to build a graph
> one node at a time and reject the graph as soon as a cycle is created?
> M

  • Re: graph cycle checking?, Yoann Pigné, 30/01/2014

Archives gérées par MHonArc 2.6.16.

Top of page