On Jun 20, 2011, at 2:46 PM, Tudor Girba wrote:
Hi,
I am repeating for the n-th time: The input to Mondrian are not nodes & edges. The input are only entities which can be anything. The engine simply provides a means to transform your entities into nodes and edges.
Yes I know :) still some entities map to edges and to nodes. and pther to both
Take this point of view, and you will see that it becomes consistent :)
You keep on repeating that you are passing nodes to the edges:, but you are not. You are always passing some entities from which the edges are to be constructed. That is all. It just happens that you choose to use the same entity as a model for both an node and an edge. It is clear that if there is no easy mapping between the entity model and the graph model, the script can become cumbersome.
Let's take your example: view node: 'node' forIt: [ view interaction whenEnteringUpdateNode: [ :aValue | view edges: {aValue} from: #yourself toAll: ((1 to: 9) copyWithout: aValue ) ].
view shape rectangle size: 30. view nodes: (1 to: 9). view gridLayout gapSize: 10.
First, this example is not instructive because it takes several shortcuts, but let's just focus on aValue.
Why it is not instructive this is what I was trying to build. I asked and I got that.
In your script, aValue is the value behind the node, not the node.
I know so what
The node is another object.
I know that luckily
Then you use it also as the model for the edge because you do not have anything else.
Yes
So, you will have the same aValue object used both for creating the node and for creating the edge.
Yes
So, a method like buildEdgesFromVertices: nodes fromAccessor: aValuable toAccessor: aValuable is wrong in the context of Mondrian, because it uses the wrong vocabulary.
How is that? :)
Does not help because I knew that more or less. I even put an self inspect to understand what was node.
I think that mondrian DSL violates basic assumption about vertex and edges that the user can have. So we will rape his cognitive load. Ok. Let us rape him.
Of course I know that arguments are not nodes and edges still there is a mismatch between nodes: acollectionOfEntitiesThatConceptuallyPlayTheRoelOfNodes and edges: acollectionOfEntitiesThatDoNotConceptuallyPlayTheRoelOfEdgesButAreTheNodesOnes.
So we will learn by heart that the arguments of edges is not an entity representing an edge.
No need to reply because all your explanations does not change that fact.
Stef