jgrapht-users Mailing List for JGraphT (Page 45)
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: John V. S. <js...@gm...> - 2005-07-31 09:50:36
|
The JGraphT development version (0.7.0alpha) in CVS requires JDK 1.5 to build, but I've just checked in backport support to allow it to run on JRE 1.4. To use it, install Retroweaver (and JRE 1.4), then create a file named customBuild.properties in the same directory as build.xml and add these two lines: retroweaver.dir=/path/to/full/distribution/of/retroweaver retro.jre.dir=/path/to/jre1.4 Then run ant. The "all" target will perform a normal build/test/jar sequence, and then run the backport (overwriting the class files in place with their retrowoven versions). Then it will re-run all tests against JRE 1.4 to make sure that no dependencies on JRE 1.5 have crept in. Finally, it will create an extra jar with the retrowoven classes as part of the distribution. If you have comments on this process, please let me know. JVS |
From: John V. S. <js...@gm...> - 2005-07-26 17:54:15
|
GraphHelper has methods neighborListOf, predecessorListOf and successorListOf. JVS > Julien Thomas de Boer wrote: > >> Hi everyone, >> Does someone know how to get an array with neighbour nodes of a given >> vertice ? I thought it was possible but i didnt manage to find how in >> the Javadoc. Thanks for your help. >> > > |
From: Julien T. de B. <jul...@ep...> - 2005-07-26 11:56:47
|
Hi everyone, Does someone know how to get an array with neighbour nodes of a given vertice ? I thought it was possible but i didnt manage to find how in the Javadoc. Thanks for your help. -- Sincerely, Julien THOMAS DE BOER Swiss Federal Institute of Technology of Lausanne (EPFL) |
From: Barak N. <bar...@us...> - 2005-07-21 13:44:42
|
Dear JGraphT community, I started JGraphT because I needed a graph library and no existing = library suited my needs. I needed high performance graphs with low memory consumption, and wanted the vertices to be of ANY type (annoyingly, many libraries require the vertices to implement some Vertex interface). =20 At some point I realized that others might find JGraphT useful, so I = made the project open-source. People indeed used it, reported bugs, = requested features, and contributed code. Some even joined in and the whole thing became a lot more fun than I anticipated! The quality of the library = has improved continuously thanks to the received contributions and criticism = -- it was a very convincing example how open source development produces = better software! In the last year I became less and less available to admin JGraphT. = This situation is unlikely to change in the near future, so we are making a = role change. John V. Sichi, who has been a JGraphT developer and a co-admin = for a long time, is now taking the lead. John is now the chief maintainer = of JGraphT, and although I'm staying involved, you should address project issues to John. JGraphT is going forward! Version 0.6.0 was recently released and = version 0.7.0 that will support Generics is now cooking... The move to Java 5.0 = is thanks to the contribution of Christian Hammer. If you can't wait for = the new candies, you might want to lend a hand and help making 0.7.0 ready sooner... =20 Thanks to everyone for making it so much fun, and special thanks to John = V. Sichi who volunteered to lead JGraphT onwards. Yours, Barak Naveh |
From: John V. S. <js...@gm...> - 2005-07-19 23:46:14
|
Christian Hammer has submitted changes to the core JGraphT data structures to take advantage of JDK 1.5 language features, in particular generics. This will become the basis for JGraphT 0.7.0. If you check out the latest from CVS, you'll need to start using JDK 1.5 to compile. Backwards compatibility support for running on JVM 1.4 is planned via the RetroWeaver project. If you'd like to help out with the next release, there are a number of subpackages of org._3pq.jgrapht (e.g. generate, ext) which should be updated with support for generics, as well as the entire testsrc directory (the goal should be to build without any -Xlint:unchecked warnings). JVS |
From: John V. S. <js...@gm...> - 2005-07-18 02:16:38
|
At long last, JGraphT version 0.6.0 has been released and is now available to download from http://jgrapht.sf.net. Please address any problems with the release to me. Enjoy, JVS |
From: <Tom...@lo...> - 2005-06-24 12:47:32
|
Dear Kyle et al, I've solved my little problem and I'm posting the resulting code here. I'm afraid that the code it's really kludgy, but as I've seen that this is a common problem, I'm pasting it hoping that it will be useful to someone. // first we create an add the edge ObjectHolderDirectedEdge edge = new ObjectHolderDirectedEdge(firstNode, secondNode, anObject); graph.addEdge(edge); // graph is a JGraphT ListenableGraph // then we modify it's appearance Map nested = new Hashtable(); Map attributeMap = new Hashtable(); DefaultGraphCell edgeCell = jgraphAdapter.getEdgeCell(edge); // jgraph is, obviously a JGraph object. // jgraphAdapter is a JGraphModelAdapter GraphConstants.setLineColor(attributeMap, Color.BLUE); GraphConstants.setLineEnd(attributeMap, GraphConstants.ARROW_TECHNICAL); GraphConstants.setEditable(attributeMap, false); nested.put(edgeCell, attributeMap); jgraph.getGraphLayoutCache().edit(nested, null, null, null); hth. best to all, tom. Kyle Lahnakoski wrote: > Can you cut and paste the toString() code? I would like to know what > you mean by cusomizing the look. Your original post seemed to > indicate you wanted to change the graphical look (somehow interfacing > with jgraph to change vertex and edge graphics). But your recent post > indicates you just wanted to change the text. > > Which was it? > > Thanks. > > > Tomás Laurenzo wrote: > >> Dear all, >> >> >> >> I've managed to overcome my little problem by creating a new kind of >> JGraphT Edge (ObjectHolderDirectedEdge extends DirectedEdge), and using >> it for my project. >> >> By overriding it's toString() method I got the desired customization >> (it also holds a value, hence it's name). >> >> best, >> tom. >> >> >> >> ------------------------------------------------------- >> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies >> from IBM. Find simple to follow Roadmaps, straightforward articles, >> informative Webcasts and more! Get everything you need to get up to >> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click >> _______________________________________________ >> jgrapht-users mailing list >> jgr...@li... >> https://lists.sourceforge.net/lists/listinfo/jgrapht-users >> > > |
From: <Tom...@lo...> - 2005-06-23 13:30:29
|
Dear Kyle, I at first wanted to customize both the graphical appearance and the text. As you say, by overriding the toString() method I only can change it's text. Sadly, the graphical customization remains unsolved. best, tom. Kyle Lahnakoski wrote: > Can you cut and paste the toString() code? I would like to know what > you mean by cusomizing the look. Your original post seemed to > indicate you wanted to change the graphical look (somehow interfacing > with jgraph to change vertex and edge graphics). But your recent post > indicates you just wanted to change the text. > > Which was it? > > Thanks. > > > Tomás Laurenzo wrote: > >> Dear all, >> >> >> >> I've managed to overcome my little problem by creating a new kind of >> JGraphT Edge (ObjectHolderDirectedEdge extends DirectedEdge), and using >> it for my project. >> >> By overriding it's toString() method I got the desired customization >> (it also holds a value, hence it's name). >> >> best, >> tom. >> >> >> >> ------------------------------------------------------- >> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies >> from IBM. Find simple to follow Roadmaps, straightforward articles, >> informative Webcasts and more! Get everything you need to get up to >> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click >> _______________________________________________ >> jgrapht-users mailing list >> jgr...@li... >> https://lists.sourceforge.net/lists/listinfo/jgrapht-users >> > > |
From: Kyle L. <ky...@ar...> - 2005-06-23 13:30:25
|
Your second sentence was unclear, so I will ignore it, dispite it sounding important. I assume you have a set of objects (or equivalent) that can provide the required weights. You can have those objects implement the Edge interface, and then use them in your graph instead of the DirectedWeightedEdge. Alternativly, you could make one DirectedWeightedEdge for each object, using the object weights in the constructor. Good luck Alessandro wrote: > Hi jgraphtrs, > > > I use the dijkstra alghoritm (in > org._3pq.jgrapht.alg.DijkstraShortestPath).. it use getWeight() method > in edge (DirectedEdge). > Well! I wish a variable weight for each edge (depend on a parameter; > this parameter is present in the object which call > DijkstraShortestPath method). > > Some suggestion? > > Thank you very much! > Bye bye, > Alessandro > > > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > jgrapht-users mailing list > jgr...@li... > https://lists.sourceforge.net/lists/listinfo/jgrapht-users > -- ---------------------------------------------------------------------- Kyle Lahnakoski ky...@ar... (416) 892-7784 Arcavia Software Ltd |
From: Kyle L. <ky...@ar...> - 2005-06-23 13:22:11
|
Can you cut and paste the toString() code? I would like to know what you mean by cusomizing the look. Your original post seemed to indicate you wanted to change the graphical look (somehow interfacing with jgraph to change vertex and edge graphics). But your recent post indicates you just wanted to change the text. Which was it? Thanks. Tomás Laurenzo wrote: > Dear all, > > > > I've managed to overcome my little problem by creating a new kind of > JGraphT Edge (ObjectHolderDirectedEdge extends DirectedEdge), and using > it for my project. > > By overriding it's toString() method I got the desired customization > (it also holds a value, hence it's name). > > best, > tom. > > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > jgrapht-users mailing list > jgr...@li... > https://lists.sourceforge.net/lists/listinfo/jgrapht-users > -- ---------------------------------------------------------------------- Kyle Lahnakoski ky...@ar... (416) 892-7784 Arcavia Software Ltd |
From: Kyle L. <ky...@ar...> - 2005-06-23 13:16:37
|
I looked at the code The Subgraph class has a bug (or more). TheDijkstraShortestPath will eventually use Subgraph.outgoingEdgesOf(). Here is the code: public List outgoingEdgesOf( Object vertex ) { return ( (DirectedGraph) *m_base* ).outgoingEdgesOf( vertex ); } Notice that the m_base is the original supergraph, not some subset. Julien Thomas de Boer wrote: >Hello everyone, >Does someone know why this problem occurs : >Given a ListenableDirectedWeighted graph g. I build the subgraph s from >g. Imagine now I want to check the path between two nodes, A and B >(connected in g but not in s). When I use : >List chemin = DijkstraShortestPath.findPathBetween(s,"A","B"); >In chemin, it returns the path in g but not in s. >How is it possible ? Do you know how to solve this problem ? Thanks a >lot for your attention. > > > > -- ---------------------------------------------------------------------- Kyle Lahnakoski ky...@ar... (416) 892-7784 Arcavia Software Ltd |
From: Julien T. de B. <jul...@ep...> - 2005-06-23 10:07:00
|
Hello everyone, Does someone know why this problem occurs : Given a ListenableDirectedWeighted graph g. I build the subgraph s from g. Imagine now I want to check the path between two nodes, A and B (connected in g but not in s). When I use : List chemin = DijkstraShortestPath.findPathBetween(s,"A","B"); In chemin, it returns the path in g but not in s. How is it possible ? Do you know how to solve this problem ? Thanks a lot for your attention. -- Sincerely, Julien THOMAS DE BOER Swiss Federal Institute of Technology of Lausanne (EPFL) |
From: Alessandro <al...@in...> - 2005-06-22 11:48:22
|
Hi jgraphtrs, I use the dijkstra alghoritm (in org._3pq.jgrapht.alg.DijkstraShortestPath).. it use getWeight() method in edge (DirectedEdge). Well! I wish a variable weight for each edge (depend on a parameter; this parameter is present in the object which call DijkstraShortestPath method). Some suggestion? Thank you very much! Bye bye, Alessandro |
From: <Tom...@lo...> - 2005-06-22 09:34:34
|
Dear all, I've managed to overcome my little problem by creating a new kind of JGraphT Edge (ObjectHolderDirectedEdge extends DirectedEdge), and using it for my project. By overriding it's toString() method I got the desired customization (it also holds a value, hence it's name). best, tom. |
From: <Tom...@lo...> - 2005-06-14 16:10:04
|
Dear all, Is it possible to specify the appearance of an edge via JGraphT? I've noticed that this question has been asked a few times but remains unanswered. Could anyone please post an answer? (a little bit of context: I have my project almost finished but I do need some kind of graphical customization and backtracking to a version w/o JgraphT would imply a huge effort). Thank you very much, tom. |
From: Kenneth S. <ke...@Vi...> - 2005-06-12 18:58:55
|
Hi - would someone be kind enough to get me started on weighted graphs? Maybe a simple example? Any help would be greatly appreciated! -- Ken |
From: Julien T. de B. <jul...@ep...> - 2005-06-08 09:57:15
|
Hello everybody, Does someone know what it is the maximum number of nodes a Jgrapht graph can support ? Thanks for this info. -- Sincerely, Julien THOMAS DE BOER Laboratory of Computer Communication and Application (LCA) Swiss Federal Institute of Technology Lausanne (EPFL) |
From: Kyle L. <ky...@ar...> - 2005-06-01 02:58:24
|
I am brand new to JGraphT. I like the fact it integrates with JGraph easily; I never had the time to use JGraph becasue of it's API learning curve. For my main point. Where are the graph algorithms? From the main page it says: /JGraphT is a free Java graph library that provides mathematical graph-theory objects and *algorithms* / I have found DijkstraShortestPath(), but that is it. Thanks -- ---------------------------------------------------------------------- Kyle Lahnakoski ky...@ar... (416) 892-7784 Arcavia Software Ltd |
From: Arun K. <aru...@gm...> - 2005-04-20 06:51:00
|
Hi all, Currently am using JGraphT but i need to add ImageIcon in the Vertex , please tell me how to do it. Regards Arunkumar.H.G --=20 Developer to Developer Connection http://www.arunzone.com INSPIRATION HAS MANY FACES |
From: Michael B. <beh...@in...> - 2005-03-10 08:14:40
|
=2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am Mittwoch, 9. M=E4rz 2005 14:47 schrieb Balaji Iyengar: > Hello, > > I am using Jgrapht to study the properties of some garbage collection > algorithms and I am running out of memory (Java.lang.outofmemory > error), has anybody faced this before while using Jgrapht? In my case > the graph has about 3-4 million objects on an average, are there ways > to get around this? Try java -Xmx500m or whatever amount of memory you want to spent (and you physically have). Try java -X for an explanation of the option. Michael =2D --=20 Michael Behrisch (Tel. +49 30 2093-3123) HU Berlin, Institut fuer Informatik, Arbeitsgruppe Algorithmen http://www.informatik.hu-berlin.de/~behrisch/ =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFCMAHjZDyR4hR8HnQRAreUAKC93i+ZhIQLxeeGLUYPAYbrNpUp8ACfXfsj OvrvKbEbTNZMcYuUCkvL+hU=3D =3DJOf8 =2D----END PGP SIGNATURE----- |
From: Balaji I. <bri...@gm...> - 2005-03-09 13:47:39
|
Hello, I am using Jgrapht to study the properties of some garbage collection algorithms and I am running out of memory (Java.lang.outofmemory error), has anybody faced this before while using Jgrapht? In my case the graph has about 3-4 million objects on an average, are there ways to get around this? thanks -balaji |
From: Balaji I. <bri...@gm...> - 2005-03-08 14:38:58
|
i fixed it, I was doing this: DefaultDirectedGraph g_graph = new DefaultDirectedGraph(); in the constructor which was creating a new object rather than instantiating the class member. thanks -balaji On Tue, 8 Mar 2005 09:33:04 -0500, Balaji Iyengar <bri...@gm...> wrote: > I was just typing some sort of a psuedo code. I got those right in my > program. It looks like the reference returned by the > DefaultDirectedGraph constructor is alive only in the body of the > method it is in. So if you have this: > > protected final void sample_method(){ > DefaultDirectedGraph g_graph = new DefaultDirectedGraph(); > Integer tp_obj = new Integer(2); > g_graph.addVertex(tp_obj); > } > > then it works fine without a nullpointer exception. > > thanks > -balaji > > On Tue, 8 Mar 2005 09:07:35 -0500, Bergeron Guyard, Alexandre > <Ale...@dr...> wrote: > > Well, > > > > From the little I see, I have a few ideas: > > > > 1) In your class you declare a method addNode(), but you later call > > addVertex().... > > > > 2) You instanciate a SampleGraph under the name tmp-graph-obj, but use the > > name tmp-obj to call the addNode()/addVertex() method later on... > > > > Hope this helps. > > > > Alex > > > > -----Original Message----- > > From: Balaji Iyengar [mailto:bri...@gm...] > > Sent: March 8, 2005 8:19 AM > > To: jgr...@li... > > Subject: [jgrapht-users] graph object instantiation. > > > > Hello, > > > > I have a DefaultDirectedGraph object as a private member of a class, > > which i instantiate in the constructor of the class. I then use call > > the addVertex function later from other files in my code structure. > > This is how my class looks like: > > > > class SampleGraph { > > private DefaultDirectedGraph g_graph; > > // other members > > > > // constructor > > SampleGraph(){ > > DefaultDirectedGraph g_graph = new DefaultDirectedGraph(); > > } > > > > // wrapper method > > protected final boolean addNode(Object gnode){ > > return g_graph.addVertex(gnode); > > } > > } > > > > elsewhere in the code i do: > > > > SampleGraph tmp-graph-obj = new SampleGraph (); > > tmp-obj.addVertex(tmp-node); > > > > which should add the tmp-node to the g_graph member of tmp-graph-obj, > > is this the right way of doing this. I get a null pointer exception > > here and i cant figure what i am doing wrong here. > > Any help would be very much appreciated. > > > > thanks > > > > ------------------------------------------------------- > > SF email is sponsored by - The IT Product Guide > > Read honest & candid reviews on hundreds of IT Products from real users. > > Discover which products truly live up to the hype. Start reading now. > > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > > _______________________________________________ > > jgrapht-users mailing list > > jgr...@li... > > https://lists.sourceforge.net/lists/listinfo/jgrapht-users > > > |
From: Balaji I. <bri...@gm...> - 2005-03-08 14:33:16
|
I was just typing some sort of a psuedo code. I got those right in my program. It looks like the reference returned by the DefaultDirectedGraph constructor is alive only in the body of the method it is in. So if you have this: protected final void sample_method(){ DefaultDirectedGraph g_graph = new DefaultDirectedGraph(); Integer tp_obj = new Integer(2); g_graph.addVertex(tp_obj); } then it works fine without a nullpointer exception. thanks -balaji On Tue, 8 Mar 2005 09:07:35 -0500, Bergeron Guyard, Alexandre <Ale...@dr...> wrote: > Well, > > From the little I see, I have a few ideas: > > 1) In your class you declare a method addNode(), but you later call > addVertex().... > > 2) You instanciate a SampleGraph under the name tmp-graph-obj, but use the > name tmp-obj to call the addNode()/addVertex() method later on... > > Hope this helps. > > Alex > > -----Original Message----- > From: Balaji Iyengar [mailto:bri...@gm...] > Sent: March 8, 2005 8:19 AM > To: jgr...@li... > Subject: [jgrapht-users] graph object instantiation. > > Hello, > > I have a DefaultDirectedGraph object as a private member of a class, > which i instantiate in the constructor of the class. I then use call > the addVertex function later from other files in my code structure. > This is how my class looks like: > > class SampleGraph { > private DefaultDirectedGraph g_graph; > // other members > > // constructor > SampleGraph(){ > DefaultDirectedGraph g_graph = new DefaultDirectedGraph(); > } > > // wrapper method > protected final boolean addNode(Object gnode){ > return g_graph.addVertex(gnode); > } > } > > elsewhere in the code i do: > > SampleGraph tmp-graph-obj = new SampleGraph (); > tmp-obj.addVertex(tmp-node); > > which should add the tmp-node to the g_graph member of tmp-graph-obj, > is this the right way of doing this. I get a null pointer exception > here and i cant figure what i am doing wrong here. > Any help would be very much appreciated. > > thanks > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > jgrapht-users mailing list > jgr...@li... > https://lists.sourceforge.net/lists/listinfo/jgrapht-users > |
From: Balaji I. <bri...@gm...> - 2005-03-08 13:19:40
|
Hello, I have a DefaultDirectedGraph object as a private member of a class, which i instantiate in the constructor of the class. I then use call the addVertex function later from other files in my code structure. This is how my class looks like: class SampleGraph { private DefaultDirectedGraph g_graph; // other members // constructor SampleGraph(){ DefaultDirectedGraph g_graph = new DefaultDirectedGraph(); } // wrapper method protected final boolean addNode(Object gnode){ return g_graph.addVertex(gnode); } } elsewhere in the code i do: SampleGraph tmp-graph-obj = new SampleGraph (); tmp-obj.addVertex(tmp-node); which should add the tmp-node to the g_graph member of tmp-graph-obj, is this the right way of doing this. I get a null pointer exception here and i cant figure what i am doing wrong here. Any help would be very much appreciated. thanks |
From: D. S. D. <dav...@us...> - 2005-02-04 16:45:23
|
I was looking to use the JGrapht classes to build programs to display and edit data plots using x-y coordinates. Is Jgrapht what I can use ? Are there any postings of examples like this to get me started ? |