/// <summary> /// Funkcja wykonuje Metadynamikę /// </summary> public void DoMetaDynamic() { Populationn.SortAscByProbability(); var howManyToTake = Options.nWorstGenToThrow; if (howManyToTake > Populationn.Gens.Count) { howManyToTake = Populationn.Gens.Count; } Populationn.Gens.RemoveRange(0, howManyToTake); for (int i = 0; i < howManyToTake; i++) { Populationn.Add(SimpleGensGenerator.GetSingleGen(Options, Function)); } Populationn.CalculateSimilarity(AntiGen); Populationn.SortDescByProbability(); }
/// <summary> /// Funkcja oblicza podobienstwo do antygenu /// </summary> public void CalculateProbabilityForPopulation() { Populationn.CalculateSimilarity(AntiGen); Populationn.SortDescByProbability(); }