The following is the sample expression to create a basic graph.
MOGraphStructure new nodeClass: MOGraphNode; edgeClass: MOGraphEdge; nodes: #(1 2 3); edges: #((1 2) (2 1) (3 1)) from: #first to: #second.
Oh, this is cool!!! I wasn't aware of this.
Alexandre
Cheers, Doru
On 21 Apr 2010, at 15:41, Alexandre Bergel wrote:
Cool! It works for me.
dSMMatrix := DSMMatrix withNodes: #(#1 #2 #3) edges: #(#(#1 #2) #(#2 #1) #(#3 #1)).
I was wondering why not to use the Mondrian convention for specifying edges. In mondrian you can specify edges with: view edges: nodes from: #selector1 to: #selector2.
For each node contained in nodes, it creates an edge going from 'node selector1' to 'node selector2'. This is quite convenient, because I do not have to specify how each edge is defined within the script. The domain I wish to represent is in charge of defining the edges.
If you still wish to explicitly defining edges, you can always do:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= view shape rectangle size: 30; withText. view nodes: (1 to: 3). view shape arrowedLine. view edges: {1 -> 2. 2 -> 1 . 3 ->1} from: #key to: #value. view treeLayout -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Also, maybe it would be nice to have a DSMShape in Mondrian, that draw a DSM for a particular node (e.g., a group of packages). But maybe this could be quite some work to adapt your implementation.
Cheers, Alexandre
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"What is more important: To be happy, or to make happy?"
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- Simon
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev