Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 13:31 Go to next message
Lafleur du versaille is currently offline Lafleur du versailleFriend
Messages: 35
Registered: July 2015
Member
No Message Body

[Updated on: Mon, 23 November 2015 09:27]

Report message to a 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 16:24 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
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


Ed Merks
Professional Support: https://www.macromodeling.com/
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 11:32 Go to previous messageGo to next message
Lafleur du versaille is currently offline Lafleur du versailleFriend
Messages: 35
Registered: July 2015
Member
No Message Body

[Updated on: Mon, 23 November 2015 09:27]

Report message to a 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 12:57 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
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: Fri Apr 26 12:31:55 GMT 2024

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

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

Back to the top