java library for high-performance graph/network data structure
Well, is there a high-performance graph library for working with primitivies, without those generics/autoboxing overheads? For double lists you may use trove, for linear algebra you may use netlib-java (examples for you to better understand the point of my interest in this question).
As for Graphs/Networks: all the libs I've found use generics and should be not that performant. I may as well do some tests for that, but I believe that heap-managed network link weights would be inferior to开发者_C百科 double[] with some bit offsets to get the index for i and j. The usage scenario: there're hundreds of such networks (most of them sparse) of size 4k*4k, there's some genetic optimization running over that set of networks, which do some flow/min route estimations for each specimen.
So, there're: JGraphT, JUNG, ANNAS, JDSL (the links lead to the APIs/code samples which expose the miserable Java Generics/Object wrappers in all of them). Are there any Trove-ish alternatives? I'd already created some simplistic implementation, but just decided to look around to avoid inventing the proper bicycle...
Any opinions, suggestions?
Thanks, Anton
PS: Please don't start on performance of generics-laden Java code, at least without linking to some decent benchmark, ok? ;)
You may use some sparse matrix with row compression. Not best and not specialized, but you may build upon it.
Well, there're some generic sparse matrix implementations which do not mess with generics and one rather solid performance benchmark: java-matrix-benchmark on google code ujmp related overview
The most convincing is MTJ's sparse matrix.
Please add answers to the question if you have any suggestions or updates. I'll accept any better ideas. Thanks.
If you need performant data structures, you should check the fastutil project, which is an efficient both in time and memory implementation of the Java Collection Framework. Performance is achieved also avoiding boxing and unboxing primitive types.
Fastutil are very efficient data structure. If you need a graph ADT implementation, you could check this, which is an efficient in memory graph implementation, based on the fastutil. The project was part of my MS thesis, which was about community detection in big graphs.
Hope it helps!
精彩评论