Quantcast

Edge identity

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

Edge identity

Yossi K
Hello,

   AbstractBaseGraph.containsEdge() checks whetehr edgeMap contains
   the edge in its key set.

    public boolean containsEdge(E e)
    {
        return edgeMap.containsKey(e);
    }

   When the edges are strings, this test makes it impossible for a graph
   to have two edges with the same label. For example, when the edges
   are words in a sentence and one of the words appears more than once.

  Doesn't the identity of an edge include its start and end vertices as well?

    Thanks,
       Y

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
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: Edge identity

Joris Kinable
That depends on how you define an edge. You can just define a new type of "Labeled" edge. For an example, refer to: https://github.com/jgrapht/jgrapht/wiki/LabeledEdges

br,

Joris

On Wed, Jan 28, 2015 at 3:50 PM, Yossi K <[hidden email]> wrote:
Hello,

   AbstractBaseGraph.containsEdge() checks whetehr edgeMap contains
   the edge in its key set.

    public boolean containsEdge(E e)
    {
        return edgeMap.containsKey(e);
    }

   When the edges are strings, this test makes it impossible for a graph
   to have two edges with the same label. For example, when the edges
   are words in a sentence and one of the words appears more than once.

  Doesn't the identity of an edge include its start and end vertices as well?

    Thanks,
       Y

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
jgrapht-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgrapht-users



------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
jgrapht-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgrapht-users
Loading...