public void learn(DataPoint dp) {
    /* Properly set all neurons. */
    

    /* Calculate the constant part of the derivative. */
    double precomputed = 2*(dp.getExpected() - outputNeuron.evaluate());

    /* Modify weights. */
    outputNeuron.setBias(outputNeuron.getBias()+
                           alpha*precomputed);
    
    for(Neuron i : inputNeurons) {
      outputNeuron.setWeight(i, outputNeuron.getWeight(i)+
                             alpha*precomputed*i.evaluate());
    }
  }