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: Rui C. <cha...@ho...> - 2012-09-30 17:07:39
|
Hi All, I am new to JGraphT. I want to use CycleDetector to detect cycles in a DefaultDirectedGraph. In my code, the graph is initialized/constructed at the beginning of the program, then I have a loop, in each of which, the graph is modified by calling addEdge and/or removeEdge randomly. But the total vertex set stay the same. In each loop, after modification on graph, I initiate a new CycleDetector class to detect cycles in the modified graph, but sometimes, I see obviously there are cycles in the modified graph, which is not captured by CycleDetector! I wonder is it some bug or is it my mistake to use CycleDetector in this way as I recall the javadoc of CycleDetector class says something like: "The inspected graph is specified at construction time and cannot be modified"... But I don't know if I really understand what it means... Thanks for any thought!Best,Ray |
From: Joris K. <de...@gm...> - 2012-09-19 07:41:49
|
Hi, Let s be your initial state node, t your terminal, and u the node you are interested in. If your graph does not contain cycles, you can first compute all unique shortest paths from s to u, then the same for u to t and finally compute the total number of unique paths by combining all possible paths s-u and u-t. Alternatively you could do a Breadth-first search starting from s. Each time you discover node t you can count the number of occurrences of the nodes by counting the predecessors. br, Joris On Thu, Sep 13, 2012 at 10:03 PM, Hicheminfo <lm...@gm...> wrote: > Hi, > I would like to know the algorithm that computes the number of occurrences > of a node in directed graph starting from an initial state to terminal > state. More precisely, the number of paths such node n is included in from > initial state to terminal state considering the paths are simple. > > > > -- > View this message in context: http://jgrapht-users.107614.n3.nabble.com/Question-Rearding-graph-Theory-algorithm-tp4024726.html > Sent from the jgrapht-users mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Got visibility? > Most devs has no idea what their production app looks like. > Find out how fast your code is with AppDynamics Lite. > http://ad.doubleclick.net/clk;262219671;13503038;y? > http://info.appdynamics.com/FreeJavaPerformanceDownload.html > _______________________________________________ > jgrapht-users mailing list > jgr...@li... > https://lists.sourceforge.net/lists/listinfo/jgrapht-users |
From: Hicheminfo <lm...@gm...> - 2012-09-13 20:03:10
|
Hi, I would like to know the algorithm that computes the number of occurrences of a node in directed graph starting from an initial state to terminal state. More precisely, the number of paths such node n is included in from initial state to terminal state considering the paths are simple. -- View this message in context: http://jgrapht-users.107614.n3.nabble.com/Question-Rearding-graph-Theory-algorithm-tp4024726.html Sent from the jgrapht-users mailing list archive at Nabble.com. |
From: Joris K. <de...@gm...> - 2012-08-20 08:26:40
|
Hey, I'm not sure what you are actually asking :) AFAIK, JGraph visualization has not been discontinued, but, me as well as several other people, find it easier to use JgraphX as visualizer. Read my last reply in this thread: http://sourceforge.net/mailarchive/forum.php?thread_name=CAP_w7p%2BawLMJcjaNci_N3Zy239d8n70D-VAz_j%3Dg1UXog77wVw%40mail.gmail.com&forum_name=jgrapht-users It gives a short example on how to use JgraphX next to Jgraph. Hope it helps. br, Joris On Sat, Aug 18, 2012 at 2:14 AM, Santiago Timón <sti...@gm...> wrote: > Hi again, > > Now I'm trying to display my graph via JGraphModelAdapter. It works fine > with the bundled JGraph version, but not with the latest available from > www.jgraph.com (as http://jgrapht.org/visualizations.html links), in fact, > it looks very different, with every class starting with {mx}. > Has this JGraph support been discontinued? Can I use any layout without > doing it myself? > > Thanks! > > Santi > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > jgrapht-users mailing list > jgr...@li... > https://lists.sourceforge.net/lists/listinfo/jgrapht-users > |
From: Santiago T. <sti...@gm...> - 2012-08-18 00:14:16
|
Hi again, Now I'm trying to display my graph via JGraphModelAdapter. It works fine with the bundled JGraph version, but not with the latest available from www.jgraph.com (as http://jgrapht.org/visualizations.html links), in fact, it looks very different, with every class starting with {mx}. Has this JGraph support been discontinued? Can I use any layout without doing it myself? Thanks! Santi |
From: Santiago T. <sti...@gm...> - 2012-08-17 22:34:44
|
Thank you Ernst, I am extending DefaultEdge, but not overloading any method. Now it works fine! Santi 2012/8/17 hnr...@gr... <hnr...@gr...> > Hi, > > edge.getTarget() is protected. Are you overloading? > > For general purposes use graph.getEdgeTarget(edge). jgrapht stores the > structure in the graph, not in the vertices/edges. This makes it possible > to use an arbitrary object as a vertex/edge in multiple graphs. > > Ernst > > -- > Information System on Graph Classes and their Inclusions (ISGCI) > http://www.graphclasses.org > > > ----- Reply message ----- > From: "Santiago Timón" <sti...@gm...> > To: <jgr...@li...> > Subject: [jgrapht-users] Getting edges for a vertex > Date: Fri, Aug 17, 2012 21:14 > > > Hi, > > I'm pretty newbie with JGraphT and the first thing I tried went bad. I > must say the API is very straightforward, but it seems it behaves different > from what I expect. > > The simple example: > > DirectedMultigraph<String, DefaultEdge> graph = newDirectedMultigraph<String, DefaultEdge>(DefaultEdge. > class); > > String a = "a"; > > String b = "b"; > > graph.addVertex(a); > > graph.addVertex(b); > > graph.addEdge(a, b); > > for (DefaultEdge edge : graph.edgesOf(a)) { > > String target = (String) edge.getTarget(); > > System.out.println(target); > } > > I am working on a much more complex problem, but this simple code doesn't > work as I thought. I don't know why the edges doesn't store the source and > target vertex but null. > > It's very important to me to travel through the graph investigating > vertex's edges, can anybody tell me how to do it? > > Many Thanks, > > Santi > |
From: <hnr...@gr...> - 2012-08-17 21:08:37
|
Hi, edge.getTarget() is protected. Are you overloading? For general purposes use graph.getEdgeTarget(edge). jgrapht stores the structure in the graph, not in the vertices/edges. This makes it possible to use an arbitrary object as a vertex/edge in multiple graphs. Ernst -- Information System on Graph Classes and their Inclusions (ISGCI) http://www.graphclasses.org ----- Reply message ----- From: "Santiago Timón" <sti...@gm...> To: <jgr...@li...> Subject: [jgrapht-users] Getting edges for a vertex Date: Fri, Aug 17, 2012 21:14 Hi, I'm pretty newbie with JGraphT and the first thing I tried went bad. I must say the API is very straightforward, but it seems it behaves different from what I expect. The simple example: DirectedMultigraph<String, DefaultEdge> graph = new DirectedMultigraph<String, DefaultEdge>(DefaultEdge.class); String a = "a"; String b = "b"; graph.addVertex(a); graph.addVertex(b); graph.addEdge(a, b); for (DefaultEdge edge : graph.edgesOf(a)) { String target = (String) edge.getTarget(); System.out.println(target); } I am working on a much more complex problem, but this simple code doesn't work as I thought. I don't know why the edges doesn't store the source and target vertex but null. It's very important to me to travel through the graph investigating vertex's edges, can anybody tell me how to do it? Many Thanks, Santi |
From: Santiago T. <sti...@gm...> - 2012-08-17 19:14:55
|
Hi, I'm pretty newbie with JGraphT and the first thing I tried went bad. I must say the API is very straightforward, but it seems it behaves different from what I expect. The simple example: DirectedMultigraph<String, DefaultEdge> graph = newDirectedMultigraph<String, DefaultEdge>(DefaultEdge. class); String a = "a"; String b = "b"; graph.addVertex(a); graph.addVertex(b); graph.addEdge(a, b); for (DefaultEdge edge : graph.edgesOf(a)) { String target = (String) edge.getTarget(); System.out.println(target); } I am working on a much more complex problem, but this simple code doesn't work as I thought. I don't know why the edges doesn't store the source and target vertex but null. It's very important to me to travel through the graph investigating vertex's edges, can anybody tell me how to do it? Many Thanks, Santi |
From: Konstantin_R <rub...@us...> - 2012-08-17 09:05:59
|
Hello jgrapht! I tried to ask this question at https://github.com/jgrapht/jgrapht/issues , but maybe it was the wrong place for it. Could you please help me with the following? I think I came across a bug that affects a general graph behavior. When using ListenableDirectedGraph one can add a listener using method 'addGraphListener()'. When using DirectedNeighborIndex a listenable graph should be passed in the DirectedNeighborIndex's contructor as a parameter. According to the DirectedNeighborIndex's spec "If it [DirectedNeighborIndex] is added as a listener to a graph other than the one it indexes, results are undefined." Does it mean that the behavior of the DirectedNeighborIndex becomes undefined or also the behavior of the graphs concerned as well? I suppose, that graphs concerned shouldn't be affected in this situation. Is it true? In reality the behavior of graph changes and java.lang.IllegalArgumentException is thrown at org.jgrapht.graph.AbstractGraph.assertVertexExist() when trying to add a new edge in the graph. The following JUnit test highlights the problem: public void testListenableDirectedGraph() throws Exception { ListenableDirectedGraph<String, DefaultEdge> listenDG = new ListenableDirectedGraph<String, DefaultEdge>( DefaultEdge.class); String vertex1 = "v1"; listenDG.addVertex(vertex1); String vertex2 = "v2"; listenDG.addVertex(vertex2); listenDG.addEdge(vertex1, vertex2); ListenableDirectedGraph<String, DefaultEdge> listenDG2 = new ListenableDirectedGraph<String, DefaultEdge>( DefaultEdge.class); DirectedNeighborIndex<String, DefaultEdge> dni = new DirectedNeighborIndex<String, DefaultEdge>( listenDG2); listenDG.addGraphListener(dni); String vertex3 = "v3"; listenDG.addVertex(vertex3); listenDG.addEdge(vertex3, vertex1); // throws IllegalArgumentException exception } In the jgrapht mailing list there's a bug which looks related, although I cannot be sure: http://jgrapht-users.107614.n3.nabble.com/Re-Bug-in-the-induced-subgraphs-Patch-and-JUnit-test-td1605888.html Could you please confirm if this is a problem? As a possible solution, is it possible to have a check in the 'addGraphListener()' to avoid such behavior? Thanks, Konstantin -- View this message in context: http://jgrapht-users.107614.n3.nabble.com/DirectedNeighborIndex-ListenableDirectedGraph-bug-tp4024720.html Sent from the jgrapht-users mailing list archive at Nabble.com. |
From: Michael B. <beh...@us...> - 2012-07-12 06:27:43
|
Hi, after a long time of inactivity I finally got around to add some of my graph algorithms together with a proposal for a general algorithm interface to my jgrapht branch https://github.com/behrisch/jgrapht/tree/approxalg/jgrapht-core/src/main/java/org/jgrapht/experimental/alg Before submitting a pull request I would very much like to hear comments on the code. The algorithm interface gives mainly a distinction between exact and approximation algorithms and an easy way to retrieve results / bounds. Furthermore I added an IntArrayGraphAlgorithm which comes handy when trying to port "naive" implementations of algorithms using int[][] representations of graphs to jgrapht and maybe useful to others as well. Not all algorithms are finally tested yet, I propose you look at coloring and clique finding first. Best regards, Michael |
From: Anandhi I. <ana...@gm...> - 2012-07-08 19:40:15
|
Hi, I am using Jgrapht for importing a graph model into my java code. I am having trouble in setting the attributes to the vertices and edges to the graph. 1. Which method should i use? Would it be possible to send a sample code of how to add edge and vertex attributes? 2. I am able to visualize the vertices and edges in an applet. But i am having problems in viewing the vertices as the applet displays only the point but not the labels of the vertices.. What could be the problem? Looking forward for your reply. Thanks and regards, Anandhi |
From: honza <jan...@ag...> - 2012-07-04 08:14:05
|
Hi, I need the same algorithm. Have you implemented it? Can you provide me with your implementation? Thanks! -- View this message in context: http://jgrapht-users.107614.n3.nabble.com/finding-all-paths-from-one-vertex-to-another-tp108000p4024717.html Sent from the jgrapht-users mailing list archive at Nabble.com. |
From: rima a. <rim...@ho...> - 2012-06-27 15:35:21
|
Ernst, A appreciate ur attention. I'v tried the code that u listed above, but seems there is something wrong with the parameters of the DotExporter constructor. I'v tried changing them, but still not working. Can u plz try to take a look on them. Also the code will not do anything to export the vertex and edges labels. How can I show the labels also?? Thank u!! -- View this message in context: http://jgrapht-users.107614.n3.nabble.com/Using-GML-Exporter-to-export-a-java-file-to-a-GML-file-tp4024703p4024716.html Sent from the jgrapht-users mailing list archive at Nabble.com. |
From: nnn123 <nur...@gm...> - 2012-06-27 12:05:23
|
I want to display in one applet a few graphs. how i can display it on one applet i have already one graph on the applet that display on it i tried to pass the new graph to temp=g.clone(); m_jgAdapter = new JGraphModelAdapter(temp ); JGraph jgraph = new JGraph( m_jgAdapter ); but nothing hap end i have the same graph i want to remove the graph that exist there -- View this message in context: http://jgrapht-users.107614.n3.nabble.com/Create-and-display-several-graphs-tp4024715.html Sent from the jgrapht-users mailing list archive at Nabble.com. |
From: H.N. de R. <hnr...@gr...> - 2012-06-27 07:45:45
|
On Mon, Jun 25, 2012 at 12:36:54PM -0700, rima asmar wrote: > Hey Ernst! > This is the part of code i added to export to .dot format: > > DOTExporter dOTExporter = new DOTExporter(); > > > > File file = new File("flight_DOT"); > Writer fileWriter = null; > try { > fileWriter = new BufferedWriter(new FileWriter (file)); > } > catch (IOException e) { > throw new RuntimeException(e); > } > > > dOTExporter.export(fileWriter, g); > > So what lines of code do I have to add exactly to export vertex and edges > attributes? Something like this (warning, not tested): Reconstructing the maps at every call to getComponentAttributes() is just my laziness. If all vertices, resp. edges, have the same attributes, you'd rather want to construct this map only once. ComponentAttributeProvider<String> vertexAttributeProvider = new ComponentAttributeProvider<String>() { /* For every vertex v, return a single attribute with name "shape" * and value "box". (The vertex is drawn as a rectangle) */ public Map<String, String> getComponentAttributes(String v) { Map<String, String> map = new LinkedHashMap<String, String>(); map.put("shape", "box"); return map; } }; ComponentAttributeProvider<String> edgeAttributeProvider = new ComponentAttributeProvider<DefaultEdge>() { /* For every vertex e, return two attributes, "dir" with value * "forward" and "arrowhead" with value "normal". (Edges are drawn * directed, with an arrowhead.) */ public Map<String, String> getComponentAttributes(DefaultEdge e) { Map<String, String> map = new LinkedHashMap<String, String>(); map.put("dir", "forward"); map.put("arrowhead", "normal"); return map; } }; DOTExporter dOTExporter = new DOTExporter( new IntegerNameProvider<String>(), // vertex ids new StringNameProvider<String>(), // vertex labels new StringEdgeNameProvider<String>(), //edge labels vertexAttributeProvider, // vertex attributes edgeAttributeProvider); // edge attributes File file = new File("flight_DOT"); Writer fileWriter = null; try { fileWriter = new BufferedWriter(new FileWriter (file)); } catch (IOException e) { throw new RuntimeException(e); } dOTExporter.export(fileWriter, g); -- Information System on Graph Classes and their Inclusions (ISGCI) http://www.graphclasses.org |
From: rima a. <rim...@ho...> - 2012-06-25 19:37:01
|
Hey Ernst! This is the part of code i added to export to .dot format: DOTExporter dOTExporter = new DOTExporter(); File file = new File("flight_DOT"); Writer fileWriter = null; try { fileWriter = new BufferedWriter(new FileWriter (file)); } catch (IOException e) { throw new RuntimeException(e); } dOTExporter.export(fileWriter, g); So what lines of code do I have to add exactly to export vertex and edges attributes? -- View this message in context: http://jgrapht-users.107614.n3.nabble.com/Using-GML-Exporter-to-export-a-java-file-to-a-GML-file-tp4024703p4024713.html Sent from the jgrapht-users mailing list archive at Nabble.com. |
From: H.N. de R. <hnr...@gr...> - 2012-06-22 14:17:41
|
On Thu, Jun 21, 2012 at 01:05:33PM -0700, John Sichi wrote: Hello Ron, the change you describe below is not a good fix: It hides the problem rather than avoiding or solving it. Could you provide a small reproduction for the error? A single method that creates the 'Hillary' graph from the article and calls the kshortestpath method on it will do. Thanks, Ernst > On Mon, Jun 18, 2012 at 2:13 AM, Genliang Guan > <gen...@sy...> wrote: > > Dear John, > > > > This is Ron Guan, studying at School of IT, University of Sydney. > > > > I am using the fantastic JGraphT library, or more specifically the > > KShortestPaths, to implement the algorithm proposed at "Multi-Sentence > > Compression: Finding Shortest Paths inWord Graphs" > > (http://dejanseo.com.au/research/google/36338.pdf). You may just look at > > the graph in the paper to understand the ideas. > > > > The included testing cases work fine, but when I run the examples in the > > paper (Hillary sentences), it gives me this error: > > graph must contain the start vertex: visit > > > > I tried to fix it by modifying ConnectivityInspector.pathExists(). > > > > Originally, it was > > > > -------------------------------------------------------------------------------------------------------------- > > Set<V> sourceSet = connectedSetOf(sourceVertex); > > return sourceSet.contains(targetVertex); > > -------------------------------------------------------------------------------------------------------------- > > > > Then I added a few lines to catch the exception: > > > > ======================================================== > > //ron > > Set<V> sourceSet = null; > > try{ > > sourceSet = connectedSetOf(sourceVertex); > > } > > catch(IllegalArgumentException e) > > { > > return false; > > } > > > > return sourceSet.contains(targetVertex); > > ======================================================== > > > > This seems fix the problem and gives correct output, but I am not sure what > > really happens deep in the algorithm and whether it is a good fix. > > > > Could you help on this issue? Many thanks! -- Information System on Graph Classes and their Inclusions (ISGCI) http://www.graphclasses.org |
From: John S. <js...@gm...> - 2012-06-21 20:05:44
|
Hi, Please send messages such as this to the jgrapht-users lists (not me personally). If you submit an isolated JUnit test case demonstrating the problem, there's a better chance of someone being able to help with it. JVS On Mon, Jun 18, 2012 at 2:13 AM, Genliang Guan <gen...@sy...> wrote: > Dear John, > > This is Ron Guan, studying at School of IT, University of Sydney. > > I am using the fantastic JGraphT library, or more specifically the > KShortestPaths, to implement the algorithm proposed at "Multi-Sentence > Compression: Finding Shortest Paths inWord Graphs" > (http://dejanseo.com.au/research/google/36338.pdf). You may just look at > the graph in the paper to understand the ideas. > > The included testing cases work fine, but when I run the examples in the > paper (Hillary sentences), it gives me this error: > graph must contain the start vertex: visit > > I tried to fix it by modifying ConnectivityInspector.pathExists(). > > Originally, it was > > -------------------------------------------------------------------------------------------------------------- > Set<V> sourceSet = connectedSetOf(sourceVertex); > return sourceSet.contains(targetVertex); > -------------------------------------------------------------------------------------------------------------- > > Then I added a few lines to catch the exception: > > ======================================================== > //ron > Set<V> sourceSet = null; > try{ > sourceSet = connectedSetOf(sourceVertex); > } > catch(IllegalArgumentException e) > { > return false; > } > > return sourceSet.contains(targetVertex); > ======================================================== > > This seems fix the problem and gives correct output, but I am not sure what > really happens deep in the algorithm and whether it is a good fix. > > Could you help on this issue? Many thanks! > > > > Best regards, > > Ron > |
From: H.N. de R. <hnr...@gr...> - 2012-06-21 19:21:14
|
On Wed, Jun 20, 2012 at 08:37:43AM -0700, rima asmar wrote: Hello Rima, > Can u plz give me a simple example of how i can use the > ComponentAttributeProvider !! I could do the exporting to .dot, but with no > attributes at all, so do i add the attributes to the .dot file? Check the test code for DOTExporter: public void testUndirected() { UndirectedGraph<String, DefaultEdge> g = new SimpleGraph<String, DefaultEdge>(DefaultEdge.class); g.addVertex(V1); g.addVertex(V2); g.addEdge(V1, V2); g.addVertex(V3); g.addEdge(V3, V1); StringWriter w = new StringWriter(); ComponentAttributeProvider<String> vertexAttributeProvider = new ComponentAttributeProvider<String>() { public Map<String, String> getComponentAttributes(String v) { Map<String, String> map = new LinkedHashMap<String, String>(); if (v.equals(V1)) { map.put("label", "a"); } else if (v.equals(V2)) { map.put("x", "y"); } else { map = null; } return map; } }; DOTExporter<String, DefaultEdge> exporter = new DOTExporter<String, DefaultEdge>( new IntegerNameProvider<String>(), null, null, vertexAttributeProvider, null); exporter.export(w, g); } In your case you would want something like map.put("shape", "polygon") instead of map.put("label", "a"). Regards, Ernst -- Information System on Graph Classes and their Inclusions (ISGCI) http://www.graphclasses.org |
From: rima a. <rim...@ho...> - 2012-06-20 15:37:54
|
Hello, Can u plz give me a simple example of how i can use the ComponentAttributeProvider !! I could do the exporting to .dot, but with no attributes at all, so do i add the attributes to the .dot file? Regrads, Rima -- View this message in context: http://jgrapht-users.107614.n3.nabble.com/Using-GML-Exporter-to-export-a-java-file-to-a-GML-file-tp4024703p4024709.html Sent from the jgrapht-users mailing list archive at Nabble.com. |
From: H.N. de R. <hnr...@gr...> - 2012-06-20 15:30:45
|
On Wed, Jun 20, 2012 at 06:22:46AM -0700, rima asmar wrote: Hello Rima, > Thank u for ur response. Actually I could write the code and export the file > to a gml file. But as u said, the gmlExporter dosn't allow the weights to be > exported, so i think that i'll try to use the dotExporter. > Something else that I was trying to do is to define the node's shape before > I export the file. Do u have any idea of how i can define the shape of the > node that I want befor exporting the file? if you're doing .dot, then using a ComponentAttributeProvider that gives every vertex a shape attribute might work, assuming Gephi supports these. You might want to go the other way around and first check which formats are imported by Gephi, including all the properties you want to pass, and then worry about exporting from jgrapht. After all, writing an export routine is less work than writing a new gephi. Cheers, Ernst |
From: rima a. <rim...@ho...> - 2012-06-20 15:29:55
|
Hello, I'm working on a project that requires me to update a program with the newest Jgrapht library. I'm trying to search for the differences between the different versions, but i can't find the documents of old versions. I'll appreciate any help! Regards, RIMA -- View this message in context: http://jgrapht-users.107614.n3.nabble.com/Jgrapht-old-versions-tp4024707.html Sent from the jgrapht-users mailing list archive at Nabble.com. |
From: rima a. <rim...@ho...> - 2012-06-20 13:22:56
|
Hello Ernst, Thank u for ur response. Actually I could write the code and export the file to a gml file. But as u said, the gmlExporter dosn't allow the weights to be exported, so i think that i'll try to use the dotExporter. Something else that I was trying to do is to define the node's shape before I export the file. Do u have any idea of how i can define the shape of the node that I want befor exporting the file? Regads, Rima -- View this message in context: http://jgrapht-users.107614.n3.nabble.com/Using-GML-Exporter-to-export-a-java-file-to-a-GML-file-tp4024703p4024706.html Sent from the jgrapht-users mailing list archive at Nabble.com. |
From: H.N. de R. <hnr...@gr...> - 2012-06-20 07:39:22
|
On Mon, Jun 18, 2012 at 12:05:47PM -0700, rima asmar wrote: Hello Rima, > I just started learning about using the JGraphT few days ago. I wrote a > simple code to get started with it. Now I want my code to be shown on a > graph form. I'm using a Gephi for that purpose, but I need to first export > the java file to GML file before I can get the actual graph. I know that I > have to use GML exporter, but don't know where exactly or what code should i > wrirT. > I'll really appreciate any response. Answers to questions like this can often be found by studying the test sripts that are part of jgrapht. In this case: ------------- GmlExporter<String, DefaultEdge> exporter = new GmlExporter<String, DefaultEdge>(); UndirectedGraph<String, DefaultEdge> g = new SimpleGraph<String, DefaultEdge>(DefaultEdge.class); //... add vertices/edges StringWriter w = new StringWriter(); exporter.export(w, g); ------------ Of course, you don't need to use a StringWriter, a FileWriter will work as well. Judging from the code, the GmlExporter does not export edge weights. You would have to write that yourself, or use the DOTExporter with a ComponentAttributeProvider for the weights. (Gephi understands the dot format.) Regards, Ernst -- Information System on Graph Classes and their Inclusions (ISGCI) http://www.graphclasses.org |
From: John S. <js...@gm...> - 2012-06-20 06:54:39
|
Thanks to Vladimir Kostyukov, all graph classes in JGraphT now inherit custom equals+hashCode from AbstractGraph. This means that g1.equals(g2) will now be based on comparing the vertex and edge sets for equality rather than on graph object identity. For more info, there's a new section at the beginning of this wiki page: https://github.com/jgrapht/jgrapht/wiki/EqualsAndHashCode For some of the details worked through during code review, see the pull request: https://github.com/jgrapht/jgrapht/pull/6 JVS |