jgrapht-users Mailing List for JGraphT (Page 38)
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: padma p. <pad...@ya...> - 2009-02-20 23:30:27
|
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. Connect with friends all over the world. Get Yahoo! India Messenger at http://in.messenger.yahoo.com/?wm=n/ |
From: John V. S. <js...@gm...> - 2009-02-20 03:13:51
|
padma priya wrote: > Hi, > I am looking into jgrapht and I want to include a function > ContractVertices(v1, v2), Where the vertices are contracted. How do I do > that..? Where do I insert the function..? I am in great need. Please > help me out. Hello, JGraphT doesn't currently have this, but an earlier library I worked on (OpenJGraph) did. You can find the source code here: http://www.koders.com/java/fidF340B43AD4227F71AB49FF3F2AA869B1119560A2.aspx?s=sort I'll bet you can figure out how to port it to JGraphT. JVS |
From: padma p. <pad...@ya...> - 2009-02-20 00:30:20
|
Hi, I am looking into jgrapht and I want to include a function ContractVertices(v1, v2), Where the vertices are contracted. How do I do that..? Where do I insert the function..? I am in great need. Please help me out. -Padma. Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/ |
From: John V. S. <js...@gm...> - 2009-02-16 13:25:20
|
Let me know if you find something specific in JGraphT that you think is behaving unexpectedly. JVS Idan Miller wrote: > I tested create a simple graph differently (different vertex addition, > different edge addition) and the results were always the same. > I always got the 2-4 edge and not the 3-4 edge. > So maybe there is something else that is a problem here? > > Here's the code: > > public static void main(String[] args) > { > DefaultDirectedWeightedGraph<Integer, String> graph = > new DefaultDirectedWeightedGraph<Integer, String>(String.class); > > int vertex1 = 1; > int vertex2 = 2; > int vertex3 = 3; > int vertex4 = 4; > > graph.addVertex(vertex1); > graph.addVertex(vertex4); > graph.addVertex(vertex3); > graph.addVertex(vertex2); > > graph.addEdge(vertex1, vertex2, "1-2"); > graph.addEdge(vertex1, vertex3, "1-3"); > graph.addEdge(vertex3, vertex4, "3-4"); > graph.addEdge(vertex2, vertex4, "2-4"); > > // Run BFS starting from the root node and create a result graph > DefaultDirectedWeightedGraph<Integer, String> tree = > new DefaultDirectedWeightedGraph<Integer, String>(String.class); > > tree.addVertex(vertex1); > > ClosestFirstIterator<Integer, String> iterator = > new ClosestFirstIterator<Integer, String>(graph, vertex1); > > while (iterator.hasNext()) > { > int currVertex = iterator.next(); > > // Add target vertex and edge to tree > tree.addVertex(currVertex); > String edge = iterator.getSpanningTreeEdge(currVertex); > > if (edge != null) > { > tree.addEdge(graph.getEdgeSource(edge), currVertex, edge); > } > } > } > > On Mon, Feb 16, 2009 at 10:58 AM, Idan Miller <ida...@gm... > <mailto:ida...@gm...>> wrote: > > I'm trying to reproduce the behaviour in a simple graph and check > the theory. > Sounds like that is the problem. > > Thanks, > Idan. > > > On Mon, Feb 16, 2009 at 10:22 AM, John V. Sichi <js...@gm... > <mailto:js...@gm...>> wrote: > > Idan Miller wrote: > > The graph building is done by getting the vertices and edges > from a database and creating them. > The vertices and edges may come in a different order each > time because the select query is not sorted. > Could the order difference of adding the edges may cause > this to happen? > > If I add edge A to the graph than edge B, will I get A and > then B in the iterator, and if I put B than A will that > change to B and A in the iterator respectively? > > If so, that may be it. > > > Yes, sounds like that is your problem. You may be able to solve > it by adding an ORDER BY to your database queries. > > JVS > > > |
From: Idan M. <ida...@gm...> - 2009-02-16 10:01:54
|
I tested create a simple graph differently (different vertex addition, different edge addition) and the results were always the same. I always got the 2-4 edge and not the 3-4 edge. So maybe there is something else that is a problem here? Here's the code: public static void main(String[] args) { DefaultDirectedWeightedGraph<Integer, String> graph = new DefaultDirectedWeightedGraph<Integer, String>(String.class); int vertex1 = 1; int vertex2 = 2; int vertex3 = 3; int vertex4 = 4; graph.addVertex(vertex1); graph.addVertex(vertex4); graph.addVertex(vertex3); graph.addVertex(vertex2); graph.addEdge(vertex1, vertex2, "1-2"); graph.addEdge(vertex1, vertex3, "1-3"); graph.addEdge(vertex3, vertex4, "3-4"); graph.addEdge(vertex2, vertex4, "2-4"); // Run BFS starting from the root node and create a result graph DefaultDirectedWeightedGraph<Integer, String> tree = new DefaultDirectedWeightedGraph<Integer, String>(String.class); tree.addVertex(vertex1); ClosestFirstIterator<Integer, String> iterator = new ClosestFirstIterator<Integer, String>(graph, vertex1); while (iterator.hasNext()) { int currVertex = iterator.next(); // Add target vertex and edge to tree tree.addVertex(currVertex); String edge = iterator.getSpanningTreeEdge(currVertex); if (edge != null) { tree.addEdge(graph.getEdgeSource(edge), currVertex, edge); } } } On Mon, Feb 16, 2009 at 10:58 AM, Idan Miller <ida...@gm...> wrote: > I'm trying to reproduce the behaviour in a simple graph and check the > theory. > Sounds like that is the problem. > > Thanks, > Idan. > > > On Mon, Feb 16, 2009 at 10:22 AM, John V. Sichi <js...@gm...> wrote: > >> Idan Miller wrote: >> >>> The graph building is done by getting the vertices and edges from a >>> database and creating them. >>> The vertices and edges may come in a different order each time because >>> the select query is not sorted. >>> Could the order difference of adding the edges may cause this to happen? >>> >>> If I add edge A to the graph than edge B, will I get A and then B in the >>> iterator, and if I put B than A will that change to B and A in the iterator >>> respectively? >>> >>> If so, that may be it. >>> >> >> Yes, sounds like that is your problem. You may be able to solve it by >> adding an ORDER BY to your database queries. >> >> JVS >> > > |
From: Idan M. <ida...@gm...> - 2009-02-16 08:58:21
|
I'm trying to reproduce the behaviour in a simple graph and check the theory. Sounds like that is the problem. Thanks, Idan. On Mon, Feb 16, 2009 at 10:22 AM, John V. Sichi <js...@gm...> wrote: > Idan Miller wrote: > >> The graph building is done by getting the vertices and edges from a >> database and creating them. >> The vertices and edges may come in a different order each time because the >> select query is not sorted. >> Could the order difference of adding the edges may cause this to happen? >> >> If I add edge A to the graph than edge B, will I get A and then B in the >> iterator, and if I put B than A will that change to B and A in the iterator >> respectively? >> >> If so, that may be it. >> > > Yes, sounds like that is your problem. You may be able to solve it by > adding an ORDER BY to your database queries. > > JVS > |
From: John V. S. <js...@gm...> - 2009-02-16 08:22:49
|
Idan Miller wrote: > The graph building is done by getting the vertices and edges from a > database and creating them. > The vertices and edges may come in a different order each time because > the select query is not sorted. > Could the order difference of adding the edges may cause this to happen? > > If I add edge A to the graph than edge B, will I get A and then B in the > iterator, and if I put B than A will that change to B and A in the > iterator respectively? > > If so, that may be it. Yes, sounds like that is your problem. You may be able to solve it by adding an ORDER BY to your database queries. JVS |
From: Idan M. <ida...@gm...> - 2009-02-16 08:12:49
|
The graph building is done by getting the vertices and edges from a database and creating them. The vertices and edges may come in a different order each time because the select query is not sorted. Could the order difference of adding the edges may cause this to happen? If I add edge A to the graph than edge B, will I get A and then B in the iterator, and if I put B than A will that change to B and A in the iterator respectively? If so, that may be it. Idan. On Mon, Feb 16, 2009 at 6:11 AM, John V. Sichi <js...@gm...> wrote: > After reviewing the code, I can't find any source of non-determinism, but I > probably missed something. > > The only hash-based data structure involved is the "seen" HashMap in > CrossComponentIterator, but that is only used for associative lookups (we > never iterate over its keys/values). > > So assuming that the way you build the input graph is deterministic, then > the result should be also. > > JVS > > Idan Miller wrote: > >> Hi everyone, >> >> I'm using the ClosestFirst iterator to calculate a weighted BFS. >> The problem is, I get non-deterministic results with calling >> getSpanningTreeEdge for the same graph. >> Any idea how I can make it deterministic? It's not mentioned in the >> documentation. >> >> Here's the code snippet: >> >> private static synchronized NavigationGraph >> findSpanningTree(NavigationGraph graph) >> { // Run BFS starting from the root node and create a >> result graph >> DirectedGraph<NavigationGraphNode, NavigationGraphEdge> tree = >> new DefaultDirectedGraph<NavigationGraphNode, >> NavigationGraphEdge>(NavigationGraphEdge.class); >> tree.addVertex(graph.getRoot()); >> ClosestFirstIterator<NavigationGraphNode, >> NavigationGraphEdge> iterator = >> new ClosestFirstIterator<NavigationGraphNode, >> NavigationGraphEdge>(graph.getGraph(), graph.getRoot()); >> while (iterator.hasNext()) >> { >> NavigationGraphNode currVertex = iterator.next(); >> // Add target vertex and edge to tree >> tree.addVertex(currVertex); >> NavigationGraphEdge edge = >> iterator.getSpanningTreeEdge(currVertex); >> if (edge != null) >> { >> tree.addEdge(graph.getGraph().getEdgeSource(edge), >> currVertex, edge); >> } >> } >> return (new NavigationGraph(tree, graph.getRoot())); >> } >> >> >> ------------------------------------------------------------------------ >> >> >> ------------------------------------------------------------------------------ >> 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 >> > > |
From: John V. S. <js...@gm...> - 2009-02-16 04:11:18
|
After reviewing the code, I can't find any source of non-determinism, but I probably missed something. The only hash-based data structure involved is the "seen" HashMap in CrossComponentIterator, but that is only used for associative lookups (we never iterate over its keys/values). So assuming that the way you build the input graph is deterministic, then the result should be also. JVS Idan Miller wrote: > Hi everyone, > > I'm using the ClosestFirst iterator to calculate a weighted BFS. > The problem is, I get non-deterministic results with calling > getSpanningTreeEdge for the same graph. > Any idea how I can make it deterministic? It's not mentioned in the > documentation. > > Here's the code snippet: > > private static synchronized NavigationGraph > findSpanningTree(NavigationGraph graph) > { > // Run BFS starting from the root node and create a result graph > DirectedGraph<NavigationGraphNode, NavigationGraphEdge> tree = > new DefaultDirectedGraph<NavigationGraphNode, > NavigationGraphEdge>(NavigationGraphEdge.class); > tree.addVertex(graph.getRoot()); > > ClosestFirstIterator<NavigationGraphNode, NavigationGraphEdge> > iterator = > new ClosestFirstIterator<NavigationGraphNode, > NavigationGraphEdge>(graph.getGraph(), graph.getRoot()); > > while (iterator.hasNext()) > { > NavigationGraphNode currVertex = iterator.next(); > > // Add target vertex and edge to tree > tree.addVertex(currVertex); > NavigationGraphEdge edge = > iterator.getSpanningTreeEdge(currVertex); > > if (edge != null) > { > tree.addEdge(graph.getGraph().getEdgeSource(edge), > currVertex, edge); > } > } > > return (new NavigationGraph(tree, graph.getRoot())); > } > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > 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 |
From: Idan M. <ida...@gm...> - 2009-02-15 08:11:39
|
Hi everyone, I'm using the ClosestFirst iterator to calculate a weighted BFS. The problem is, I get non-deterministic results with calling getSpanningTreeEdge for the same graph. Any idea how I can make it deterministic? It's not mentioned in the documentation. Here's the code snippet: private static synchronized NavigationGraph findSpanningTree(NavigationGraph graph) { // Run BFS starting from the root node and create a result graph DirectedGraph<NavigationGraphNode, NavigationGraphEdge> tree = new DefaultDirectedGraph<NavigationGraphNode, NavigationGraphEdge>(NavigationGraphEdge.class); tree.addVertex(graph.getRoot()); ClosestFirstIterator<NavigationGraphNode, NavigationGraphEdge> iterator = new ClosestFirstIterator<NavigationGraphNode, NavigationGraphEdge>(graph.getGraph(), graph.getRoot()); while (iterator.hasNext()) { NavigationGraphNode currVertex = iterator.next(); // Add target vertex and edge to tree tree.addVertex(currVertex); NavigationGraphEdge edge = iterator.getSpanningTreeEdge(currVertex); if (edge != null) { tree.addEdge(graph.getGraph().getEdgeSource(edge), currVertex, edge); } } return (new NavigationGraph(tree, graph.getRoot())); } |
From: John V. S. <js...@gm...> - 2009-02-11 19:07:57
|
Pallika Kanani wrote: > Hi, > > I recently discovered JGraphT and would like to use it, but I use java > 1.5. Is it possible to download version 0.7.3 instead of 0.8.0? Yes, you can get all old versions here: https://sourceforge.net/project/showfiles.php?group_id=86459&package_id=89784 JVS |
From: Theuns H. <the...@za...> - 2009-01-28 13:27:45
|
HI Can JGrapht do orthogonal layouts? Thanks Theuns Heydenrych |
From: John V. S. <js...@gm...> - 2009-01-16 01:06:31
|
If you're in the San Francisco bay area, the Lise Getoor talk tomorrow may be of interest: http://infolab.stanford.edu/infoseminar/ JVS |
From: John V. S. <js...@gm...> - 2009-01-15 01:00:13
|
https://sourceforge.net/forum/message.php?msg_id=6106792 JVS |
From: Randall R S. <rs...@so...> - 2008-12-29 22:14:56
|
On Monday 29 December 2008 13:21, fa...@gm... wrote: > Hi > Is there a way to change the edge labels? > > I create my graph like in the JGraphAdapter Demo: > > ListenableGraph<String, DefaultEdge> g = > > new ListenableDirectedMultigraph<String, DefaultEdge>( > > DefaultEdge.class); > > > > ... Interesting. Somehow, I never even noticed DefaultEdge. I've just always written my own Edge implementations. So at least one answer would be: Implement your own Edge and give it whatever attributes and methods you need. > regards > daniel Randall Schulz |
From: <fa...@gm...> - 2008-12-29 21:21:20
|
hi is there a way to change the edge labels? i create my graph like in the JGraphAdapter Demo: > ListenableGraph<String, DefaultEdge> g = > new ListenableDirectedMultigraph<String, DefaultEdge>( > DefaultEdge.class); > > jgAdapter = new JGraphModelAdapter<String, DefaultEdge>(g); > > JGraph jgraph = new JGraph(jgAdapter); > > ... > > String v1 = "v1"; > String v1 = "v2"; > > g.addVertex(v1); > g.addVertex(v2); > > g.addEdge(v1, v2); the edge is labeled with "v1, v2" but i'd like to set another text as label. regards daniel |
From: John V. S. <js...@gm...> - 2008-12-24 21:19:11
|
Andrew Newell has contributed a couple of new algorithms (EulerianCircuit and ChromaticNumber), plus some new generators (star, hypercube, and complete bipartite). Also, Trevor Harmon has enhanced the GmlExporter to support generation of custom labels and ID's. These are in Subversion now and will be included in the next release. JVS |
From: John V. S. <js...@gm...> - 2008-12-21 23:47:00
|
Hans-Martin Adorf wrote: > Hi, > > I am a newbie to JGraphT. What I want is to extract all connected > subgraphs from a griven graph. Below is the code that I have used to > familiarize myself with JGraphT. Two questions: > > 1. Why do I not get the desired edge sets from the given graph? Is there a reason you are using org.jgraph.graph.DefaultEdge instead of org.jgrapht.graph.DefaultEdge? That one little "t" makes a lot of difference. > 2. Wouldn't it be nice to include a subgraph extractor as a general > functionality in the JGraphT package? You mean like this one? http://www.jgrapht.org/javadoc/org/jgrapht/graph/Subgraph.html JVS |
From: Hans-Martin A. <dr...@go...> - 2008-12-21 11:26:59
|
Hi, I am a newbie to JGraphT. What I want is to extract all connected subgraphs from a griven graph. Below is the code that I have used to familiarize myself with JGraphT. Two questions: 1. Why do I not get the desired edge sets from the given graph? 2. Wouldn't it be nice to include a subgraph extractor as a general functionality in the JGraphT package? Thanks. Hans-Martin Adorf /* * Demo.java */ import java.util.HashSet; import java.util.List; import java.util.Set; import org.jgraph.graph.DefaultEdge; import org.jgrapht.UndirectedGraph; import org.jgrapht.alg.ConnectivityInspector; import org.jgrapht.graph.SimpleGraph; /** * * @author Hans-Martin Adorf */ public class Demo { public static void main(String... args) { UndirectedGraph<String, DefaultEdge> g = new SimpleGraph<String, DefaultEdge>(DefaultEdge.class); String v1 = "v1"; String v2 = "v2"; String v3 = "v3"; String v4 = "v4"; // add the vertices g.addVertex(v1); g.addVertex(v2); g.addVertex(v3); g.addVertex(v4); // add edges g.addEdge(v1, v2); // g.addEdge(v2, v3); g.addEdge(v3, v4); // g.addEdge(v4, v1); System.out.println(g); // returns ([v1, v2, v3, v4], [null={v1,v2}, null={v3,v4}]) System.out.println(g.edgeSet()); // returns [null, null] System.out.println(g.edgesOf(v1)); // returns [null] ConnectivityInspector connectivityInspector = new ConnectivityInspector(g); System.out.println(connectivityInspector.isGraphConnected()); List<Set<String>> connectedSets = connectivityInspector.connectedSets(); System.out.println(connectedSets); System.out.println(extractConnectedGraphs(g, connectedSets)); } public static Set<UndirectedGraph<String, DefaultEdge>> extractConnectedGraphs( UndirectedGraph<String, DefaultEdge> sourceGraph, List<Set<String>> connectedVertexList) { Set<UndirectedGraph<String, DefaultEdge>> result = new HashSet<UndirectedGraph<String, DefaultEdge>>(); for (Set<String> connectedVertices : connectedVertexList) { result.add(extractConnectedGraph(sourceGraph, connectedVertices)); } return result; } public static UndirectedGraph<String, DefaultEdge> extractConnectedGraph( UndirectedGraph<String, DefaultEdge> sourceGraph, Set<String> connectedVertices) { UndirectedGraph<String, DefaultEdge> targetGraph = new SimpleGraph<String, DefaultEdge>(DefaultEdge.class); for (String vertex : connectedVertices) { addEdges(sourceGraph, vertex, targetGraph); } return targetGraph; } public static UndirectedGraph<String, DefaultEdge> addEdges( UndirectedGraph<String, DefaultEdge> sourceGraph, String vertex, UndirectedGraph<String, DefaultEdge> targetGraph) { targetGraph.addVertex(vertex); System.out.println(sourceGraph.edgesOf(vertex)); for (DefaultEdge edge : sourceGraph.edgesOf(vertex)) { targetGraph.addEdge((String) edge.getSource(), (String) edge.getTarget()); } return targetGraph; } } |
From: John V. S. <js...@gm...> - 2008-11-21 02:31:55
|
Dave Brondsema wrote: > Can you publish the latest release of jgrapht to a maven repository? > The latest I see in > http://mirrors.ibiblio.org/pub/mirrors/maven2/jgrapht/jgrapht/ is 0.7.3 Hi Dave, For JGraphT releases, I only put them in sourceforge; there's no maven step involved in our release process. In the past, individuals have volunteered to publish releases to maven repositories; it looks like that has continued up through 0.7.3. Whoever has been taking care of this (assuming you're on jgrapht-users), can you repeat it for 0.8.0? The ibiblio and others seem to have anonymous packaging, which is perhaps not such a good thing. If someone can contribute scripting/instructions for automating maven publication as part of our release process, I can execute those for future releases. Our existing release process is documented here: http://jgrapht.svn.sourceforge.net/viewvc/jgrapht/trunk/etc/release-process.html?revision=570 Thanks, JVS |
From: John V. S. <js...@gm...> - 2008-11-21 00:18:25
|
Greetings, For background on this topic, read this thread: https://sourceforge.net/mailarchive/forum.php?thread_name=000201c67294%241e41e8c0%240300a8c0%40neo&forum_name=jgrapht-developers Note that vertex and edge addition order is already preserved for the default graph implementations; this may already be good enough for your application. However, there's no way to manipulate the existing order other than by deleting and re-adding edges. If you'd like to work on submitting optional interface extensions which expose the ability for an application to manipulate edge ordering, I can help with reviewing those and getting them included for the next JGraphT release. We would have to figure out how this intersects with undirected and directed graphs, as well as with various graph views such as subgraphs. Other questions to be answered include: - should orderability apply to the vertex set as well? - likewise, how about to the set of all edges in a graph? JVS Meredith Gregory wrote: > Graphers, > > On a DirectedGraph incomingEdges returns a set. Is there another class > that has an equivalent method that preserves order on the edge > collection? i'm building expressions from graphs and swapping edge order > changes order in the references that these edges represent; so, i cannot > use an order-insensitive data type, here. > > Best wishes, > > --greg > > -- > L.G. Meredith > Managing Partner > Biosimilarity LLC > 806 55th St NE > Seattle, WA 98105 > > +1 206.650.3740 > > http://biosimilarity.blogspot.com > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > jgrapht-users mailing list > jgr...@li... > https://lists.sourceforge.net/lists/listinfo/jgrapht-users |
From: Meredith G. <lgr...@gm...> - 2008-11-20 23:35:49
|
Graphers, On a DirectedGraph incomingEdges returns a set. Is there another class that has an equivalent method that preserves order on the edge collection? i'm building expressions from graphs and swapping edge order changes order in the references that these edges represent; so, i cannot use an order-insensitive data type, here. Best wishes, --greg -- L.G. Meredith Managing Partner Biosimilarity LLC 806 55th St NE Seattle, WA 98105 +1 206.650.3740 http://biosimilarity.blogspot.com |
From: John V. S. <js...@gm...> - 2008-11-19 23:17:01
|
Please use the mailing list or forums for all questions about JGraphT. If you take a look at the gralog project, you can see some examples of how to do it: http://gralog.sourceforge.net/ JVS -------- Original Message -------- Subject: question about JGraphAdapterDemo.java Date: Wed, 19 Nov 2008 16:38:27 -0500 From: Tarun Verma <tar...@ir...> To: per...@us... Hello , I am trying to use the code similar to the one in your demo file JGraphAdapterDemo.java in my Swing application. However I am trying to integrate a button in the swing application generated by running the JGraphAdapterDemo which would rearrange the nodes and their edges in a neat way. Can you please guide if there is a way to do so . Attached it the demo example on which I am trying to work Thanks Tarun Verma. |
From: Paul <pau...@gm...> - 2008-11-18 10:28:27
|
Hi all I am using version 0.8. How can I dynamically add an edge between two vertex ? I need to be able to drag the mouse from one vertex to another vertex and add a link between them. Please help. Thanks. -- Cheers, Paul |
From: Randall R S. <rs...@so...> - 2008-10-05 00:22:52
|
On Thursday 02 October 2008 04:11, Sebastian Ordyniak wrote: > hi, > > there are layoutalgorithms. You find them under Tools->Open > structureLayoutAlgorithmDialog. I know the screenshots do not work at > the moment. I will fix that soon. Do also have a look at > http://gralog.sourceforge.net/doc/website/index.htmlfor That works a lot better if you stop the URL before the "for"... <http://gralog.sourceforge.net/doc/website/index.html> > for documentation about the GUI. > > cheers > Sebastian Randall Schulz |