method adaptSynapticWeights written for NeuralNetwork.