private void CopyRightKill() { List <NeuronNet> deleteList = new List <NeuronNet>(); foreach (NeuronNet neuronNet in PopulationList) { if (!deleteList.Any(x => Math.Abs(x.Error - neuronNet.Error) < 0)) { foreach (NeuronNet deleteNet in PopulationList.FindAll(x => { return(Math.Abs(x.Error - neuronNet.Error) < 0.0001); })) { deleteList.Add(deleteNet); } deleteList.Remove(neuronNet); } } foreach (NeuronNet neuronNet in deleteList) { PopulationList.Remove(neuronNet); } }
public void Remove(T element) { PopulationList.Remove(element); }