Hi,
On 1 May 2011, at 00:25, Alexandre Bergel wrote:
> Hi!
>
> I often bump into a problem having the following gist:
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> view nodes: #( $a $b $a).
> view edgesFromAssociations: { $a -> $b . $b -> $a}
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
> How can I express the the second $a and not the first when defining edges? I have the impression this limitation comes from the fact that two different nodes have the same model behind ($a), and there is no way to distinguish between them.
Yes. But that is not a limitation, it is a feature that comes from the following idea: we want by default the user to manipulate the domain objects, not the graph model. This is why the edges* selectors provide a lookup based on the heuristic that a domain object will appear only once in the graph.
> An easy and backward compatible solution would be to permit to provide nodes:
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> nodes := view nodes: #( $a $b $a).
> view edgesFromAssociations: { nodes first -> nodes second . nodes second -> nodes third }
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
> Opinion?
Well, edges* selectors are meant to be used as transformations as explained above. For direct edges, we should use another class. I would suggest:
- directEdges
- rawEdges
Cheers,
Doru
> Cheers,
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel
http://www.bergel.eu> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
>
[hidden email]
>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev--
www.tudorgirba.com
"We can create beautiful models in a vacuum.
But, to get them effective we have to deal with the inconvenience of reality."
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev