strange output when running the example from [https://github.com/jgrapht/jgrapht/wiki/LabeledEdges]

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

strange output when running the example from [https://github.com/jgrapht/jgrapht/wiki/LabeledEdges]

Jim - FooBar();
Hi everyone,

this is my very first post on this list so I apologise if this has been asked before but I couldn't find anything relevant on the web...

I followed the example found here : https://github.com/jgrapht/jgrapht/wiki/LabeledEdges but I am getting the following output:

//I have replaced "is a friend of" with "likes" & "is an enemy of" with "hates"

John likes John
John hates John
John likes James
John hates James
John likes Sarah
John hates Sarah
John likes Jessica
John hates Jessica
James likes John
James hates John
Jessica likes James
Jessica hates James
Jessica likes Sarah
Jessica hates Sarah
Sarah likes James
Sarah hates James

Surely something is wrong here... For starters, I should only have 8 edges, not 16 and simply  doing graph.edgeSet() does confirm 8 edges! But the loop prints 16 and I have no idea where the non-underlined ones come from...

Has anyone else run into this? I am extremely confused...I'm trying to get up to speed with JGraphT but such a simple example fails miserably... :(

thanks a lot in advance,

Jim

------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
jgrapht-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgrapht-users
Reply | Threaded
Open this post in threaded view
|

Re: strange output when running the example from [https://github.com/jgrapht/jgrapht/wiki/LabeledEdges]

Jim - FooBar();
I am so sorry guys - my bad....the code wasn't exactly the same per ce...

massive apologies for the noise :(

Jim


On 20/05/13 21:13, Jim - FooBar(); wrote:
Hi everyone,

this is my very first post on this list so I apologise if this has been asked before but I couldn't find anything relevant on the web...

I followed the example found here : https://github.com/jgrapht/jgrapht/wiki/LabeledEdges but I am getting the following output:

//I have replaced "is a friend of" with "likes" & "is an enemy of" with "hates"

John likes John
John hates John
John likes James
John hates James
John likes Sarah
John hates Sarah
John likes Jessica
John hates Jessica
James likes John
James hates John
Jessica likes James
Jessica hates James
Jessica likes Sarah
Jessica hates Sarah
Sarah likes James
Sarah hates James

Surely something is wrong here... For starters, I should only have 8 edges, not 16 and simply  doing graph.edgeSet() does confirm 8 edges! But the loop prints 16 and I have no idea where the non-underlined ones come from...

Has anyone else run into this? I am extremely confused...I'm trying to get up to speed with JGraphT but such a simple example fails miserably... :(

thanks a lot in advance,

Jim


------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
jgrapht-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgrapht-users