11

Is there a representation of a graph in Java standard libraries, like there is in the boost library in C++? Is there a graph representation which is a standard in the business?

Edit: by graph, I mean of course the mathematical concept in computer science - graph theory

Amir Rachum
  • 76,817
  • 74
  • 166
  • 248
  • Are you talking about the nodes-and-edges kind of graph or the visual kind of graph? (I'm guessing the former since you mentioned boost though I'm not too familiar with boost myself) – David Z May 16 '10 at 22:22
  • Precisely because he mentions boost, then I think it's the nodes-and-edges kind of graph. – Cesar May 16 '10 at 22:24
  • Have a look here: http://stackoverflow.com/questions/2081676/looking-for-open-source-tool-for-drawing-charts-in-java – Shervin Asgari May 16 '10 at 22:38
  • possible duplicate of [Good Java graph algorithm library?](http://stackoverflow.com/questions/51574/good-java-graph-algorithm-library) – user Mar 25 '14 at 16:54

4 Answers4

7

JUNG

mr popo
  • 224
  • 3
  • 5
  • I had not looked at JUNG until now but quick glance at the API looks promising. It uses generics rather than having first-class types for Nodes and Edges. This is important when you are dealing with a moderately large volume of data. Massive volumes of data (where everything cannot/should not be maintained in RAM) would require additional limitations or abstractions at the API level. – Dilum Ranatunga May 16 '10 at 23:29
  • last release: 24 January 2010 – Vitaly Olegovitch May 30 '12 at 10:26
3

Not in the standard libraries, but there are lots of open source options. JGraphT looks like it probably has what you need.

Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
1

the question is rather old, but to be complete, note there's also gephi toolkit. gephi is a software providing a GUI and allowing to analyze and display graphs. the classes used for representing and processing graphs are available as independent modules.

Vincent Labatut
  • 1,788
  • 1
  • 25
  • 38
0

I don't think there is a Graph structure in stander library tho. You can build your own customized graph for your use.

ryf9059
  • 729
  • 3
  • 14
  • 23