4

Can anyone point me to some good Java library (jar) that has some more data structures other than what comes as part of standard Java language. I want support for things like - Tuple, Pair, Tries, Binomial/Fibonacci trees and may be Graphs. [Yes, I know writing them on my own will be lot of fun, but I am reluctant to reinvent the wheel right now]

1

3 Answers 3

5

I am not aware of any single Java library that contains all of those components. There is however a very good library called JGraphT which provides a very nice and comprehensive API for graphs in Java. It also includes some structures that are related to that such as a FibonacciHeap class. They also have a very comprehensive JavaDoc. The feature list from the JGraphT website lists:

  • directed and undirected graphs.
  • graphs with weighted / unweighted / labeled or any user-defined edges.
  • various edge multiplicity options, including: simple-graphs, multigraphs, pseudographs.
  • unmodifiable graphs - allow modules to provide "read-only" access to internal graphs.
  • listenable graphs - allow external listeners to track modification events.
  • subgraphs graphs that are auto-updating subgraph views on other graphs.
  • all compositions of above graphs.
Sign up to request clarification or add additional context in comments.

Comments

4

The prefuse library/framework has most (all? maybe not pair) of those, even though it's a visualization library (and a really nice one at that).

2 Comments

This seems more like a visualization library. I was more searching for an Algorithm/Data Structure library - something similar to Boost libraries in C++! Thanks anyway.
@user396089 That's because that's what it is (and I said as much). I wasn't aware that where the classes were mattered to you, I assumed you were just interested in having the classes. How does it matter?
3

Guava has a number of additional data structures, as well as the Apache Commons Collections library.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.