views:

85

answers:

3

I need to build a small repository of algorithms with implementation and description. I found recently, for example, an efficient permutations generator for permutations of arbitrary length. Where can I find full source code implementations with short descriptions of other such algorithms?

Anything covered in the Java API is not needed, so I don't need Euclid's algorithm for GCD, as that's implemented in BigInteger.

Solutions for max-flow/prims/etc. are all welcome, as well as any useful algorithm-solving/creating Java tools.

+2  A: 
  1. Apache commons-math
  2. COLT from CERN
  3. Apache Mahout
bmargulies
A: 

You may find some useful stuff in the jakarta commons libraries. For example, here is the javadoc for the Math library. It may be more "numeric" than "algorithmy", but it has some stuff like Genetic Algorithms that you may find useful.

Peter Recore
+1  A: 

This thread (and a few others with a similar title) from the TopCoder forum are pretty good. Though they are quite old now, and some of the tips might no longer make sense.

Another idea can be to convert existing code in C++/C/Pascal to Java. A very good resource (in C++) for that is shygypsy.com.

I think there are also some tutorials and sample code in the USACO training gateway, but they too are in C/C++/Pascal AFAIR.

MAK
shygypsy is exaxctly what I'm looking for. I can convert the C++, but pure Java implementations would have been nicer.
Stefan Kendall