@Override
public synchronized ErrorValue train(final boolean online,
final Vector<Double> trainingVector,
final ErrorValue expectedError) {
ErrorValue errorValue = new ErrorValue(0);
toggleTraining();
// if (!online) {
// //reset();
// }
switch (getTrainAlgorithm()) {
case BACKPROP:
BackpropAlgorithm algo =
new BackpropAlgorithm(trainingVector,
trainingVector, this, expectedError);
errorValue = new ErrorValue(algo.compute());
break;
case QPROP:
break;
case RPROP:
break;