Implementation of a simple neuron class.