Perceptron code with slight modifications to preprocessor.

Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>