Simulated Annealing

Simmulated Annealing is a method for solving unconstrained and bound-constrained optimization problems. The method models the physical process of heating a material and then slowly lowering the temperature to decrease defects, thus minimizing the system energy.

Check it out
Polynomial time approximation scheme algorithm for KP (PTAS-KP)

A PTAS is an algorithm which takes an instance of an optimization problem and a parameter ε > 0 and, in polynomial time, produces a solution that is within a factor 1 + ε of being optimal [wikipedia]. This is an implementation to find solutions to the Knapsack Problem.

Check it out
DP solution to the knapsack problem

Dynamic programming (DP) is a fancy name for using divide-and-conquer technique with a table. In this snippet, DP is used to solve the Knapsack Problem.

Check it out
Conjugate Gradient method for matrices

The conjugate gradient method is an algorithm for the numerical solution of particular systems of linear equations, namely those whose matrix is symmetric and positive-definite [wikipedia].

Check it out
Java Animation Framework

This is a simple animation framework made for Java. The framework supports both frame skips and thread yielding, and is a great conceptual starting point.

Check it out
Preconditioned Conjugate Gradients method for matrices

A preconditioned version of the Conjugate Gradients method in order to improve the convergence rate. This implementation uses an Incomplete Cholesky factorization of the A matrix as the preconditioner.

Check it out