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
|