Quantcast

help on using getSource and/or getTarget for edge

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

help on using getSource and/or getTarget for edge

Kuan Yang
Hi all,

I am having problem accessing these two methods in all edge classes
since they are protected.
My scenario is that, by some way I get a list of edges, e.g.
shortestPath, and then I want to process the edges one by one. By
processing I mean I need to at least know the source and target of
each edge.

I don't want to write a parser to parse the output from the
toString(), since the node name can get very messy in my case. I just
want a clean way to grab the source and target information for each
edge.

Can anyone help? Thanks in advance.

Kuan

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
jgrapht-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgrapht-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: help on using getSource and/or getTarget for edge

John Sichi
Administrator
http://www.jgrapht.org/javadoc/org/jgrapht/Graph.html#getEdgeSource(E)

JVS

On Wed, Oct 27, 2010 at 9:50 PM, Kuan Yang <[hidden email]> wrote:

> Hi all,
>
> I am having problem accessing these two methods in all edge classes
> since they are protected.
> My scenario is that, by some way I get a list of edges, e.g.
> shortestPath, and then I want to process the edges one by one. By
> processing I mean I need to at least know the source and target of
> each edge.
>
> I don't want to write a parser to parse the output from the
> toString(), since the node name can get very messy in my case. I just
> want a clean way to grab the source and target information for each
> edge.
>
> Can anyone help? Thanks in advance.
>
> Kuan
>
> ------------------------------------------------------------------------------
> Nokia and AT&T present the 2010 Calling All Innovators-North America contest
> Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
> http://p.sf.net/sfu/nokia-dev2dev
> _______________________________________________
> jgrapht-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jgrapht-users
>

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
jgrapht-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgrapht-users
Loading...