Hi,
A few days ago, I added new graph algorithms into MooseAlgos but I did not communicate about that. I added 2 complementary algorithms: - MalGraphReducer : it takes as input a graph and ouputs a graph without circuits. Nodes forming a circuit (or cycle if you prefer) are merged into a single node. A merge node has a reference to merged nodes. It uses the MalTarjan algorithm. - MalTopologicalSorting : the well known graph sorting algorithm that can only be applied on graphs without circuits (cycles).
the latter could be useful for some layouting strategies of graphs for example.
Regards, Christophe.
Hi!
Can you provide some (graphical) illustrations about the graph algo?
I know that Moose has some, but they are presented in a very cryptic way.
Graph algos are very important, and we are seriously under-using them.
Cheers, Alexandre
On Apr 8, 2015, at 12:53 PM, Christophe Demarey Christophe.Demarey@inria.fr wrote:
Hi,
A few days ago, I added new graph algorithms into MooseAlgos but I did not communicate about that. I added 2 complementary algorithms:
- MalGraphReducer : it takes as input a graph and ouputs a graph without circuits. Nodes forming a circuit (or cycle if you prefer) are merged into a single node. A merge node has a reference to merged nodes. It uses the MalTarjan algorithm.
- MalTopologicalSorting : the well known graph sorting algorithm that can only be applied on graphs without circuits (cycles).
the latter could be useful for some layouting strategies of graphs for example.
Regards, Christophe._______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
hi,
Le 8 avr. 2015 à 17:59, Alexandre Bergel a écrit :
Hi!
Can you provide some (graphical) illustrations about the graph algo?
I added 2 examples method on the MalGraphReducer class to easily display the graph with roassal but the default layouting is not very good. The best I got was with the circle layout. Here is the graph I gave as input to the graph reducer:
and the output:
With the same input graph, the MalToplogicalSorting gives this result: #($h #($f $d $e $b) $i $a $g $c).
Cheers, Christophe.
I know that Moose has some, but they are presented in a very cryptic way.
Graph algos are very important, and we are seriously under-using them.
Cheers, Alexandre
On Apr 8, 2015, at 12:53 PM, Christophe Demarey Christophe.Demarey@inria.fr wrote:
Hi,
A few days ago, I added new graph algorithms into MooseAlgos but I did not communicate about that. I added 2 complementary algorithms:
- MalGraphReducer : it takes as input a graph and ouputs a graph without circuits. Nodes forming a circuit (or cycle if you prefer) are merged into a single node. A merge node has a reference to merged nodes. It uses the MalTarjan algorithm.
- MalTopologicalSorting : the well known graph sorting algorithm that can only be applied on graphs without circuits (cycles).
the latter could be useful for some layouting strategies of graphs for example.
Regards, Christophe._______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Hi!
This is great!!
I have improved a bit your scripts. For example: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | graphReducer view | graphReducer := MalGraphReducer new. MalGraphFixture complexCycleGraph2: graphReducer. graphReducer run.
view := RTMondrian new. view shape rectangle withText: [:n| n model printString]. view nodes: graphReducer nodes.
view shape arrowedLine color: (Color gray alpha: 0.5). view shape shortestDistanceAttachPoint. view edges moveBehind; objects: graphReducer nodes from: #yourself toAll: #nextNodes.
view layout forceWithCharge: -3000. ^ view -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The produced graphs are now:
This leads to an interesting points. Where should we put these examples? Examples are crucially missing in Moose.
I could create an example browser that is hooked into the roassal example world menu. Opinion on this?
Cheers, Alexandre
Hi!
This is great!!
I have improved a bit your scripts. For example: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | graphReducer view | graphReducer := MalGraphReducer new. MalGraphFixture complexCycleGraph2: graphReducer. graphReducer run.
view := RTMondrian new. view shape rectangle withText: [:n| n model printString]. view nodes: graphReducer nodes.
view shape arrowedLine color: (Color gray alpha: 0.5). view shape shortestDistanceAttachPoint. view edges moveBehind; objects: graphReducer nodes from: #yourself toAll: #nextNodes.
view layout forceWithCharge: -3000. ^ view -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The produced graphs are now:
This leads to an interesting points. Where should we put these examples? Examples are crucially missing in Moose.
I could create an example browser that is hooked into the roassal example world menu. Opinion on this?
Cheers, Alexandre
I can integrate my own graph generators if you want :
http://smalltalkhub.com/#!/~SergeStinckwich/Moose-Algos-Graph-Generators
On Wed, Apr 8, 2015 at 5:53 PM, Christophe Demarey Christophe.Demarey@inria.fr wrote:
Hi,
A few days ago, I added new graph algorithms into MooseAlgos but I did not communicate about that. I added 2 complementary algorithms:
- MalGraphReducer : it takes as input a graph and ouputs a graph without circuits. Nodes forming a circuit (or cycle if you prefer) are merged into a single node. A merge node has a reference to merged nodes. It uses the MalTarjan algorithm.
- MalTopologicalSorting : the well known graph sorting algorithm that can only be applied on graphs without circuits (cycles).
the latter could be useful for some layouting strategies of graphs for example.
Regards, Christophe. _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Question to all: Would it make sense to have Serge’s package into Moose?
@ Serge: Is your code dependent on Moose? If no, how large is it? Maybe we could add it to Roassal.
Alexandre
On Apr 9, 2015, at 12:36 PM, Serge Stinckwich serge.stinckwich@gmail.com wrote:
I can integrate my own graph generators if you want :
http://smalltalkhub.com/#!/~SergeStinckwich/Moose-Algos-Graph-Generators
On Wed, Apr 8, 2015 at 5:53 PM, Christophe Demarey Christophe.Demarey@inria.fr wrote:
Hi,
A few days ago, I added new graph algorithms into MooseAlgos but I did not communicate about that. I added 2 complementary algorithms:
- MalGraphReducer : it takes as input a graph and ouputs a graph without circuits. Nodes forming a circuit (or cycle if you prefer) are merged into a single node. A merge node has a reference to merged nodes. It uses the MalTarjan algorithm.
- MalTopologicalSorting : the well known graph sorting algorithm that can only be applied on graphs without circuits (cycles).
the latter could be useful for some layouting strategies of graphs for example.
Regards, Christophe. _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- Serge Stinckwich UCBN & UMI UMMISCO 209 (IRD/UPMC) Every DSL ends up being Smalltalk http://www.doesnotunderstand.org/ _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev