Skip to main content



      Home
Home » Modeling » EMF » how to define a source node and a target node in emf
how to define a source node and a target node in emf [message #1708440] Wed, 16 September 2015 09:31 Go to next message
Eclipse UserFriend
No Message Body

[Updated on: Mon, 23 November 2015 04:27] by Moderator

Re: how to define a source node and a target node in emf [message #1708455 is a reply to message #1708440] Wed, 16 September 2015 12:24 Go to previous messageGo to next message
Eclipse UserFriend
Sonnia,

You have too many containment references. I don't think the Edges
should contain Nodes because the Graph already contains the Nodes and
the Edges. Also, unless the Edges need to carry other data (has other
features) you don't need to model them as classes at all. Node could
just have incomingReferences and outgoingReferences each of type Node
and opposites of each other.

On 16/09/2015 3:31 PM, sonnia anderson wrote:
> duty is to represent an emf of a adjazenzmatrix, but the problem is how to make directions (that is to say indicates that the node A moves to the node B, B to C, D to B,.....)
> in gross I have to set a source node and a target node.
> This is an example of adjazenzmatrix
>
> and the second problem is that I'm not sure if my emf model that I'm doing is right
>
> thanks for help
Re: how to define a source node and a target node in emf [message #1708541 is a reply to message #1708455] Thu, 17 September 2015 07:32 Go to previous messageGo to next message
Eclipse UserFriend
No Message Body

[Updated on: Mon, 23 November 2015 04:27] by Moderator

Re: how to define a source node and a target node in emf [message #1708559 is a reply to message #1708541] Thu, 17 September 2015 08:57 Go to previous message
Eclipse UserFriend
Hi

What's the problem with a straightforward sparse encoding.

class Node {
reference nextNodes : Node[*];
}

initialized as

node1.nextNodes = {node2,node3};
node2.nextNodes = {};
node3.nextNodes = {node1,node4,node6};
node4.nextNodes = {node1};
node5.nextNodes = {node3,node5};
node6.nextNodes = {node2,node4,node5};

Regards

Ed Willink

On 17/09/2015 12:32, sonnia anderson wrote:
> hello
> here is an example matrix below, the edge must determine the direction that is to say the first node to the second node, the first node to the third and sixth or the first node to the second {(1,2) (1 , 3)} or {(1.2) (6.2)}. in my case the number of nodes is not fixed his may vary (that is undefined)
>
> the problem is that I do not know how directions ((1.2) (6.2))
> thanks you in advance
> sonnia
Previous Topic:reduce loading time of an xmi file
Next Topic:Applying ATL Transformation
Goto Forum:
  


Current Time: Mon Jul 14 08:06:03 EDT 2025

Powered by FUDForum. Page generated in 0.03726 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top