private void neuralNetwork_EnergyChanged(object sender, EnergyEventArgs e) { SetText(labelEnergy, "Energy: " + e.Energy); int i = e.NeuronIndex / PatternDimension; int j = e.NeuronIndex % PatternDimension; pixelPictureBox.InversePixel(i, j); pixelPictureBox.Invalidate(); }
protected virtual void OnEnergyChanged(EnergyEventArgs e) { EnergyChanged?.Invoke(this, e); }