jgrapht-users Mailing List for JGraphT (Page 37)
Brought to you by:
barak_naveh,
perfecthash
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(2) |
2005 |
Jan
|
Feb
(1) |
Mar
(5) |
Apr
(1) |
May
|
Jun
(12) |
Jul
(6) |
Aug
(7) |
Sep
(2) |
Oct
|
Nov
(1) |
Dec
|
2006 |
Jan
(4) |
Feb
(3) |
Mar
(2) |
Apr
(3) |
May
(6) |
Jun
(2) |
Jul
(3) |
Aug
(12) |
Sep
(6) |
Oct
(3) |
Nov
(12) |
Dec
|
2007 |
Jan
(6) |
Feb
|
Mar
(6) |
Apr
(8) |
May
(2) |
Jun
(8) |
Jul
(2) |
Aug
(3) |
Sep
(7) |
Oct
(3) |
Nov
|
Dec
(1) |
2008 |
Jan
(11) |
Feb
(4) |
Mar
(8) |
Apr
(3) |
May
(4) |
Jun
(1) |
Jul
|
Aug
(3) |
Sep
(1) |
Oct
(4) |
Nov
(5) |
Dec
(5) |
2009 |
Jan
(3) |
Feb
(12) |
Mar
(14) |
Apr
(9) |
May
(8) |
Jun
(1) |
Jul
(4) |
Aug
(10) |
Sep
|
Oct
(10) |
Nov
|
Dec
(4) |
2010 |
Jan
(9) |
Feb
(16) |
Mar
(14) |
Apr
(19) |
May
(1) |
Jun
(3) |
Jul
(17) |
Aug
(9) |
Sep
(4) |
Oct
(4) |
Nov
(11) |
Dec
(8) |
2011 |
Jan
(10) |
Feb
(11) |
Mar
(10) |
Apr
(14) |
May
(6) |
Jun
(8) |
Jul
(9) |
Aug
(11) |
Sep
(13) |
Oct
(7) |
Nov
(9) |
Dec
(1) |
2012 |
Jan
(5) |
Feb
(14) |
Mar
(4) |
Apr
(25) |
May
(18) |
Jun
(18) |
Jul
(3) |
Aug
(6) |
Sep
(3) |
Oct
(16) |
Nov
(5) |
Dec
(12) |
2013 |
Jan
(1) |
Feb
(6) |
Mar
(14) |
Apr
(34) |
May
(9) |
Jun
(3) |
Jul
(8) |
Aug
|
Sep
(10) |
Oct
(11) |
Nov
(11) |
Dec
(15) |
2014 |
Jan
(2) |
Feb
(6) |
Mar
(11) |
Apr
(12) |
May
(6) |
Jun
(7) |
Jul
|
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
(5) |
Dec
(6) |
2015 |
Jan
(15) |
Feb
(4) |
Mar
(7) |
Apr
(8) |
May
(1) |
Jun
(18) |
Jul
(27) |
Aug
(13) |
Sep
(4) |
Oct
(8) |
Nov
(7) |
Dec
(6) |
2016 |
Jan
(4) |
Feb
(5) |
Mar
|
Apr
(15) |
May
(5) |
Jun
(4) |
Jul
(1) |
Aug
(1) |
Sep
(7) |
Oct
(2) |
Nov
(4) |
Dec
(2) |
2017 |
Jan
(7) |
Feb
(1) |
Mar
(17) |
Apr
(2) |
May
(1) |
Jun
|
Jul
|
Aug
(3) |
Sep
(3) |
Oct
|
Nov
(5) |
Dec
(6) |
2018 |
Jan
(23) |
Feb
(17) |
Mar
(4) |
Apr
(5) |
May
(6) |
Jun
(3) |
Jul
(5) |
Aug
(2) |
Sep
(3) |
Oct
(2) |
Nov
(5) |
Dec
|
2019 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
(2) |
Mar
|
Apr
(1) |
May
(1) |
Jun
(8) |
Jul
(8) |
Aug
|
Sep
(2) |
Oct
(9) |
Nov
|
Dec
(1) |
2021 |
Jan
|
Feb
(4) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
(3) |
Oct
(3) |
Nov
(1) |
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
|
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Claudio M. <cla...@gm...> - 2009-05-06 10:35:42
|
Hi, I'm implementing a few algorithms that make extensive use of local neighborhoods of Vertexes. Therefore I'd like to use DirectedNeighborIndex class to speed up the computation. At the moment I've extended SimpleDirectedWeightedGraph and added the methods outgoingVertexesOf(V) and incomingVertexesOf(V), both cycling over the results of outgoingEdgesOf() and incomingEdgesOf(). What I'm trying to understand is re-implementing these outgoingVertexesOf() and incomingVertexesOf() with calls to predecessorOf() and successorOf() of DirectedNeighborhorIndex is the smartest way to optimize my code. My second question, connected to the first one, is if it's possible, if it's not already been used, to ask the graph to cache the calls internally for some computation. TIA /CM -- Claudio Martella cla...@gm... |
From: John V. S. <js...@gm...> - 2009-04-30 19:28:37
|
Claudio Martella wrote: > yes, that's what i want. i guess i should first transform my graph > into adjacent matrix representation in order to do so. Is there an > efficient way in jgrapht? We don't currently have the code for that; you could consider contributing it if you develop it. JVS |
From: Claudio M. <cla...@gm...> - 2009-04-30 15:01:44
|
yes, that's what i want. i guess i should first transform my graph into adjacent matrix representation in order to do so. Is there an efficient way in jgrapht? On Wed, Apr 29, 2009 at 9:10 PM, John V. Sichi <js...@gm...> wrote: > Hi Claudio, > > You probably want to first run an all-pairs shortest path algorithm such as > Floyd-Warshall and then analyze the results from that. > > http://en.wikipedia.org/wiki/Floyd-Warshall_algorithm > > JGraphT does not yet have this in the library. > > JVS > > Claudio Martella wrote: >> >> Hello list! >> >> I'm trying to calculate the average path length of my graph and the >> diameter (longest shortest path). >> >> At the moment it's non-optimized: >> >> for(Vertex source: graph.vertexSet()){ >> for(Vertex destination: graph.vertexSet()){ >> if(!source.equals(destination)){ >> List<DefaultWeightedEdge> path = >> DijkstraShortestPath.findPathBetween(graph, source, destination); >> if(path != null) >> averagePathLength += path.size(); >> } >> } >> } >> N = graph.vertexSet().size(); >> averagePathLength /= (N*(N-1)); >> >> This code is simplified to explain you what I'm doing now. There's of >> course a misusage of resources and computational time. Any idea what >> is the best way to calculate average path lengths, diameter and every >> kind of graph property that would need to calculate paths reusing >> resources and partial solutions? >> >> TIA >> >> /CM >> >> > > -- Claudio Martella cla...@gm... |
From: John V. S. <js...@gm...> - 2009-04-29 19:10:38
|
Hi Claudio, You probably want to first run an all-pairs shortest path algorithm such as Floyd-Warshall and then analyze the results from that. http://en.wikipedia.org/wiki/Floyd-Warshall_algorithm JGraphT does not yet have this in the library. JVS Claudio Martella wrote: > Hello list! > > I'm trying to calculate the average path length of my graph and the > diameter (longest shortest path). > > At the moment it's non-optimized: > > for(Vertex source: graph.vertexSet()){ > for(Vertex destination: graph.vertexSet()){ > if(!source.equals(destination)){ > List<DefaultWeightedEdge> path = > DijkstraShortestPath.findPathBetween(graph, source, destination); > if(path != null) > averagePathLength += path.size(); > } > } > } > N = graph.vertexSet().size(); > averagePathLength /= (N*(N-1)); > > This code is simplified to explain you what I'm doing now. There's of > course a misusage of resources and computational time. Any idea what > is the best way to calculate average path lengths, diameter and every > kind of graph property that would need to calculate paths reusing > resources and partial solutions? > > TIA > > /CM > > |
From: Claudio M. <cla...@gm...> - 2009-04-29 17:09:10
|
Hello list! I'm trying to calculate the average path length of my graph and the diameter (longest shortest path). At the moment it's non-optimized: for(Vertex source: graph.vertexSet()){ for(Vertex destination: graph.vertexSet()){ if(!source.equals(destination)){ List<DefaultWeightedEdge> path = DijkstraShortestPath.findPathBetween(graph, source, destination); if(path != null) averagePathLength += path.size(); } } } N = graph.vertexSet().size(); averagePathLength /= (N*(N-1)); This code is simplified to explain you what I'm doing now. There's of course a misusage of resources and computational time. Any idea what is the best way to calculate average path lengths, diameter and every kind of graph property that would need to calculate paths reusing resources and partial solutions? TIA /CM -- Claudio Martella cla...@gm... |
From: Leo S. <leo...@ya...> - 2009-04-27 19:54:31
|
Hi all, In JGraphAdapterDemo, there is a JScrollPane with jgraph object as its component. When I drag a vertex into an invisible part of JFrame, the scroll doesn't appear. It seems don't work. So, a dragged vertex can't be seen again after that. How can I show the scroll bar when a vertex is dragged to invisible area of JFrame? So, I can use this scroll bar to see a dragged vertex.... Thanks... Terhubung langsung dengan banyak teman di blog dan situs pribadi Anda? Buat Pingbox terbaru Anda sekarang! http://id.messenger.yahoo.com/pingbox/ |
From: Claudio M. <cla...@gm...> - 2009-04-14 11:02:35
|
thank you john, i ended up extending the Graph with the encapsulation: good solution. On Tue, Apr 7, 2009 at 11:14 PM, John V. Sichi <js...@gm...> wrote: > Your mission, should you choose to accept it, is to get Sun (IBM?) to change > java.util.Set to allow you to "look up" an object already in the set. Good > luck. JGraphT strives to follow the patterns set by java.util. > > For cases like this, I usually take the approach you mention of maintaining > my own HashMap outside of the graph (in an encapsulating class). If someone > wanted to contributed something like a generic "KeyedGraph", that would be > fine, but I think we should leave the existing interfaces alone. > > JVS > > Claudio Martella wrote: >> >> Hello to the list members. >> >> I write for a topic that looks kind of hot in here: the >> Graph.getVertex() method. >> I'm using a SimpleDirectedWeightedGraph ecl to represent words with >> my own WordNode class and their relationships (with a >> DefaultWeightedEdge). Each graph vertex (a word for me) has a payload >> for some statistics (i.e. the number of occurences in the >> document/corpus). >> >> While parsing the document ( or while the application is running ) i >> want to get access to the node to read its data. I've overidden the >> .equals() for my WordNode class, so that it actually checks the >> WordNode.getWord() - String, so the idea is to do a >> graph.getVertex(new WordNode("whatever")).getOccurences() without >> the need to hold all the vertexes in another datastructure (like a >> HashMap), or without surfing the expensive graph.vertexSet(). >> AFAIK, this is not possible in jgrapht. I don't actually want the >> getVertex() to work for reference-equality, but for my value-equality >> through the equals() "interface". >> >> Any suggestions? >> >> TIA >> >> Claudio Martella >> > > -- Claudio Martella cla...@gm... |
From: John V. S. <js...@gm...> - 2009-04-07 21:14:28
|
Your mission, should you choose to accept it, is to get Sun (IBM?) to change java.util.Set to allow you to "look up" an object already in the set. Good luck. JGraphT strives to follow the patterns set by java.util. For cases like this, I usually take the approach you mention of maintaining my own HashMap outside of the graph (in an encapsulating class). If someone wanted to contributed something like a generic "KeyedGraph", that would be fine, but I think we should leave the existing interfaces alone. JVS Claudio Martella wrote: > Hello to the list members. > > I write for a topic that looks kind of hot in here: the > Graph.getVertex() method. > I'm using a SimpleDirectedWeightedGraph ecl to represent words with > my own WordNode class and their relationships (with a > DefaultWeightedEdge). Each graph vertex (a word for me) has a payload > for some statistics (i.e. the number of occurences in the > document/corpus). > > While parsing the document ( or while the application is running ) i > want to get access to the node to read its data. I've overidden the > .equals() for my WordNode class, so that it actually checks the > WordNode.getWord() - String, so the idea is to do a > graph.getVertex(new WordNode("whatever")).getOccurences() without > the need to hold all the vertexes in another datastructure (like a > HashMap), or without surfing the expensive graph.vertexSet(). > AFAIK, this is not possible in jgrapht. I don't actually want the > getVertex() to work for reference-equality, but for my value-equality > through the equals() "interface". > > Any suggestions? > > TIA > > Claudio Martella > |
From: Claudio M. <cla...@gm...> - 2009-04-07 17:01:01
|
Hello to the list members. I write for a topic that looks kind of hot in here: the Graph.getVertex() method. I'm using a SimpleDirectedWeightedGraph ecl to represent words with my own WordNode class and their relationships (with a DefaultWeightedEdge). Each graph vertex (a word for me) has a payload for some statistics (i.e. the number of occurences in the document/corpus). While parsing the document ( or while the application is running ) i want to get access to the node to read its data. I've overidden the .equals() for my WordNode class, so that it actually checks the WordNode.getWord() - String, so the idea is to do a graph.getVertex(new WordNode("whatever")).getOccurences() without the need to hold all the vertexes in another datastructure (like a HashMap), or without surfing the expensive graph.vertexSet(). AFAIK, this is not possible in jgrapht. I don't actually want the getVertex() to work for reference-equality, but for my value-equality through the equals() "interface". Any suggestions? TIA Claudio Martella -- Claudio Martella cla...@gm... |
From: lalitha v. <lal...@ya...> - 2009-04-01 14:40:31
|
Hi, I have created a simpleWeightedGraph and i have to find the nodes with top k degrees. How can i use VertexDegreeComparator with sort() function of java to do this? Thanks Lalitha |
From: John V. S. <js...@gm...> - 2009-03-12 08:32:05
|
Thanks; this is definitely a bug (the test should be using equals instead of == in all cases). I've checked in the fix and unit test in Subversion. JVS Michaël Michaud wrote: > Hi, > > Maybe somebody can tell me if this behaviour is normal or if it's a bug. > I want to build a graph with a unique cycle (one edge, one vertex) > I use two classes MyVertex and MyEdge, a WeightedPseudograph (version > 0.7.3 of jGraphT), and here is my test case : > > v1 = new MyVertex(); > graph.addVertex(v1); > graph.addEdge(v1,v1,new MyEdge()); > ==> build a graph with 1 vertex and 1 edge, vertex has degree 2 (that is > OK!) > > v1 = new MyVertex(); > v2 = new MyVertex(); // where n2.equals(n1) > graph.addVertex(v1); > graph.addVertex(v2); > graph.addEdge(v1,v2,new MyEdge()); > ==> build a graph with 1 vertex and 1 edge, vertex has degree 4 ! > > Seems like addVertex uses equals to compare vertices and add only one > vertex if v1!=v2 but v1.equals(v2) > That's fine for me > There is still 1 vertex after addEdge, but that time, the degreeOf > method returns 4 instead of 2 > > I find this code in AbstractBaseGraph (line 1109) : > if (source != target) {getEdgeContainer(target).addEdge(e);} > //here == is used, not equals > and also this (line 1125) : > if (getEdgeSource(e).equals(getEdgeTarget(e))) { degree += 2;} > > Any help is welcome > > Michaël > > > > ------------------------------------------------------------------------------ > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and > easily build your RIAs with Flex Builder, the Eclipse(TM)based development > software that enables intelligent coding and step-through debugging. > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > _______________________________________________ > jgrapht-users mailing list > jgr...@li... > https://lists.sourceforge.net/lists/listinfo/jgrapht-users > |
From: Michaël M. <mic...@fr...> - 2009-03-12 07:52:11
|
Hi, Maybe somebody can tell me if this behaviour is normal or if it's a bug. I want to build a graph with a unique cycle (one edge, one vertex) I use two classes MyVertex and MyEdge, a WeightedPseudograph (version 0.7.3 of jGraphT), and here is my test case : v1 = new MyVertex(); graph.addVertex(v1); graph.addEdge(v1,v1,new MyEdge()); ==> build a graph with 1 vertex and 1 edge, vertex has degree 2 (that is OK!) v1 = new MyVertex(); v2 = new MyVertex(); // where n2.equals(n1) graph.addVertex(v1); graph.addVertex(v2); graph.addEdge(v1,v2,new MyEdge()); ==> build a graph with 1 vertex and 1 edge, vertex has degree 4 ! Seems like addVertex uses equals to compare vertices and add only one vertex if v1!=v2 but v1.equals(v2) That's fine for me There is still 1 vertex after addEdge, but that time, the degreeOf method returns 4 instead of 2 I find this code in AbstractBaseGraph (line 1109) : if (source != target) {getEdgeContainer(target).addEdge(e);} //here == is used, not equals and also this (line 1125) : if (getEdgeSource(e).equals(getEdgeTarget(e))) { degree += 2;} Any help is welcome Michaël |
From: John V. S. <js...@gm...> - 2009-03-11 20:35:11
|
Francesco Cioffi wrote: > Hi guys, > > I'm new to jgrapht and I would like to use as graph library in my Project. > > I must create a graph, save it in a file, and then reload it for some purpose. > > I have found some utilities for exporting but I don't found utilities > for load a graph from a file. > > > Can you suggest me, how can I do that? Right, we currently only have exporters, without importers. However, most JGraphT data structures implement Serializable, so that is one option for persistence, although I personally am not a big fan of it due to issues like incompatibilities during migration to newer versions. JVS |
From: Francesco C. <fc...@gm...> - 2009-03-11 13:12:19
|
Hi guys, I'm new to jgrapht and I would like to use as graph library in my Project. I must create a graph, save it in a file, and then reload it for some purpose. I have found some utilities for exporting but I don't found utilities for load a graph from a file. Can you suggest me, how can I do that? Thank you, Francesco Cioffi |
From: John V. S. <js...@gm...> - 2009-03-09 22:44:12
|
Thanks Guillaume. I'll poke around a bit and update the Javadoc with what I find. Olivier, if you are interested in implementing one of the newer algorithms, we can incorporate that into the library too. JVS gu boulmi wrote: > Hi, > > I have not implemented this algorithm based on a reference paper. So, > it's not Jimenez and Marzal! > Though I'm sure that what I've written is not new and must have > been explained previously in many papers. > > The algorithm is a *variant of the Bellman-Ford algorithm* but instead > of only storing the best path I store the "*k*" best paths at each pass > (se differences between methods KShortestPathsIterator#next and > BellmanFordIterator#next). > > Complexity "*/m*n/*" is because it's a variant of Bellman-Ford (whose > complexity is /*O(m*n)*/) and the "*/k/*" factor is because the method > RankingPathElementList#addPathElements is /*O(k)*/ where *k* is the > number of expected paths to be computed (by the way I notice that this > "O(k)" piece of information is not in the javadoc documentation). > > If you find a paper pointing to this kind of algorithm, feel free to > update the javadoc documentation. > > Regards, > > Guillaume > > --- En date de : *Mer 4.3.09, John V. Sichi /<js...@gm...>/* a écrit : > > De: John V. Sichi <js...@gm...> > Objet: Re: Question on JGraphT > À: lef...@ya... > Cc: jgr...@li..., bou...@ya... > Date: Mercredi 4 Mars 2009, 1h09 > > Olivier Lefevre wrote: > > Hi, > > > > What is the algorithm used for K-shortest paths in JGraphT: the REA > algorithm of Jimenez and Marzal? > > > > Regards, > > > > Olivier Lefevre > > Freelance bioinformatics developer > > Berlin, Germany > > Greetings Olivier, > > I don't know the answer, so I'm cc'ing your question to the users > mailing list, as well as Guillaume Boulmier, who developed this code. > > Jimenez and Marzal is O(m+Knlog(m/n)), whereas Guillaume's comments have > O(K*m*n) for the running time. > > JVS > > |
From: John V. S. <js...@gm...> - 2009-03-09 22:10:18
|
maria esther sanchez wrote: > I was wondering if there is a method in JGraphT to get the aislated > subgraphs inside a graph? (Like the graphs inside a graph) To find them, you can use org.jgrapht.alg.ConnectivityInspector or StrongConnectivityInspector. To manipulate them individually once you find them, you can use org.jgrapht.graph.Subgraph (or one of its variants such as DirectedSubgraph). JVS |
From: gu b. <bou...@ya...> - 2009-03-09 13:30:06
|
Hi, I have not implemented this algorithm based on a reference paper. So, it's not Jimenez and Marzal! Though I'm sure that what I've written is not new and must have been explained previously in many papers. The algorithm is a variant of the Bellman-Ford algorithm but instead of only storing the best path I store the "k" best paths at each pass (se differences between methods KShortestPathsIterator#next and BellmanFordIterator#next). Complexity "m*n" is because it's a variant of Bellman-Ford (whose complexity is O(m*n)) and the "k" factor is because the method RankingPathElementList#addPathElements is O(k) where k is the number of expected paths to be computed (by the way I notice that this "O(k)" piece of information is not in the javadoc documentation). If you find a paper pointing to this kind of algorithm, feel free to update the javadoc documentation. Regards, Guillaume --- En date de : Mer 4.3.09, John V. Sichi <js...@gm...> a écrit : De: John V. Sichi <js...@gm...> Objet: Re: Question on JGraphT À: lef...@ya... Cc: jgr...@li..., bou...@ya... Date: Mercredi 4 Mars 2009, 1h09 Olivier Lefevre wrote: > Hi, > > What is the algorithm used for K-shortest paths in JGraphT: the REA algorithm of Jimenez and Marzal? > > Regards, > > Olivier Lefevre > Freelance bioinformatics developer > Berlin, Germany Greetings Olivier, I don't know the answer, so I'm cc'ing your question to the users mailing list, as well as Guillaume Boulmier, who developed this code. Jimenez and Marzal is O(m+Knlog(m/n)), whereas Guillaume's comments have O(K*m*n) for the running time. JVS |
From: gu b. <bou...@ya...> - 2009-03-09 13:22:49
|
Hi, I have not implemented this algorithm based on a reference paper, though I'm sure that what I've written is not new and must have been explained previously in many papers. The algorithm is a variant of the Bellman-Ford algorithm but instead of only storing the best path I store the "k" best paths at each pass (se differences between KShortestPathsIterator#next and BellmanFordIterator#next). Complexity "m*n" is because it's a variant of Bellman-Ford and the "k" factor is because the method RankingPathElementList#addPathElements is O(k). If you find --- En date de : Mer 4.3.09, John V. Sichi <js...@gm...> a écrit : De: John V. Sichi <js...@gm...> Objet: Re: Question on JGraphT À: lef...@ya... Cc: jgr...@li..., bou...@ya... Date: Mercredi 4 Mars 2009, 1h09 Olivier Lefevre wrote: > Hi, > > What is the algorithm used for K-shortest paths in JGraphT: the REA algorithm of Jimenez and Marzal? > > Regards, > > Olivier Lefevre > Freelance bioinformatics developer > Berlin, Germany Greetings Olivier, I don't know the answer, so I'm cc'ing your question to the users mailing list, as well as Guillaume Boulmier, who developed this code. Jimenez and Marzal is O(m+Knlog(m/n)), whereas Guillaume's comments have O(K*m*n) for the running time. JVS |
From: gu b. <bou...@ya...> - 2009-03-09 12:59:50
|
Hi, I'm Implmentation --- En date de : Mer 4.3.09, John V. Sichi <js...@gm...> a écrit : De: John V. Sichi <js...@gm...> Objet: Re: Question on JGraphT À: lef...@ya... Cc: jgr...@li..., bou...@ya... Date: Mercredi 4 Mars 2009, 1h09 Olivier Lefevre wrote: > Hi, > > What is the algorithm used for K-shortest paths in JGraphT: the REA algorithm of Jimenez and Marzal? > > Regards, > > Olivier Lefevre > Freelance bioinformatics developer > Berlin, Germany Greetings Olivier, I don't know the answer, so I'm cc'ing your question to the users mailing list, as well as Guillaume Boulmier, who developed this code. Jimenez and Marzal is O(m+Knlog(m/n)), whereas Guillaume's comments have O(K*m*n) for the running time. JVS |
From: John V. S. <js...@gm...> - 2009-03-04 08:19:30
|
maria esther sanchez wrote: > Hello! I am having trouble with the references. I would like to know how > to duplicate, clone or copy a graph in with there are no references amog > them. I tryed this method: Graphs.addGraph(simpleGraph,graph)... but i > still have the same problem. If a modify a vertex from simplegrap, the > node that corresponds to graph is modified also. > How can i make a copy that does afect from the graph that i am copying, > and the other way arround. > Thank u for you help! Hi Maria, You can code this as follows: 1) create a Map<V,V> m 2) write a new cloneAllVertices like addAllVertices which does vPrime = v.clone(), adds an entry (v,vPrime) to m, and puts vPrime in the destination graph 3) write a new addAllEdgesForClones like addAllEdges which uses m to map each s and t to sPrime and tPrime before calling addEdge I forget how the interactions between generics and clone work out, but if you get a generic version of this working along with a unit test, please send it to me and I'll check it in as a new utility method on class org.jgrapht.Graphs. JVS |
From: John V. S. <js...@gm...> - 2009-03-04 08:03:02
|
Bhavesh Sanghvi wrote: > I am interested in a digraph which may also contain bidirectional edges > (preferably with weight). Later, I wish to detect cycles this graph > (specifically for this reason, I cannot use two directional edges as > they would be identified in the cycle). > > > > Please let me know if it is possible to create such a graph using > JGraphT. I searched for bidirectional edges, however, was not able to > find it. Hi Bhavesh, Following the Mathworld definition, http://mathworld.wolfram.com/DirectedGraph.html a bidirectional edge is equivalent to a pair of oppositely-directed edges. The ability to mix directed with undirected edges in the same graph isn't something we're planning to add since it is an uncommon requirement and would complicate the internals considerably. Perhaps you could you can write a modified version of the cycle detector which ignores cycles of length 2? JVS |
From: maria e. s. <tet...@ho...> - 2009-03-04 06:49:05
|
Hello! I am having trouble with the references. I would like to know how to duplicate, clone or copy a graph in with there are no references amog them. I tryed this method: Graphs.addGraph(simpleGraph,graph)... but i still have the same problem. If a modify a vertex from simplegrap, the node that corresponds to graph is modified also. How can i make a copy that does afect from the graph that i am copying, and the other way arround. Thank u for you help! Atte tete _________________________________________________________________ Hotmail® is up to 70% faster. Now good news travels really fast. http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_70faster_032009 |
From: Bhavesh S. <bsa...@cs...> - 2009-03-04 00:10:55
|
Hello, I am interested in a digraph which may also contain bidirectional edges (preferably with weight). Later, I wish to detect cycles this graph (specifically for this reason, I cannot use two directional edges as they would be identified in the cycle). Please let me know if it is possible to create such a graph using JGraphT. I searched for bidirectional edges, however, was not able to find it. Thanks for your help! -- Thanks & regards, Bhavesh Sanghvi P.S. Please excuse me for cross-posting on both forum and mailing list. I was not sure if they are synched or not. |
From: John V. S. <js...@gm...> - 2009-03-04 00:09:47
|
Olivier Lefevre wrote: > Hi, > > What is the algorithm used for K-shortest paths in JGraphT: > the REA algorithm of Jimenez and Marzal? > > Regards, > > Olivier Lefevre > Freelance bioinformatics developer > Berlin, Germany Greetings Olivier, I don't know the answer, so I'm cc'ing your question to the users mailing list, as well as Guillaume Boulmier, who developed this code. Jimenez and Marzal is O(m+Knlog(m/n)), whereas Guillaume's comments have O(K*m*n) for the running time. JVS |
From: Jonathan C. <jon...@it...> - 2009-02-21 00:35:08
|
This is not really a JGraphT-related question. A set of vertices is just any set. Refer to the standard Javadoc on questions about the collections framework: http://java.sun.com/javase/6/docs/api/java/util/Collection.html /Jonathan 20 feb 2009 kl. 22.43 skrev padma priya: > Hi, > I have a set of vertices in Set<V>. How do I access them individually? > I want the elements of Set<V> so that I can do some manipulations > with them. > Please do let me know. > > Thank you, > Padma dubasi. > > Add more friends to your messenger and enjoy! Invite them > now > .------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San > Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the > Enterprise > -Strategies to boost innovation and cut costs with open source > participation > -Receive a $600 discount off the registration fee with the source > code: SFAD > http://p.sf.net/sfu/XcvMzF8H_______________________________________________ > jgrapht-users mailing list > jgr...@li... > https://lists.sourceforge.net/lists/listinfo/jgrapht-users |