// Oblicza podobieństwo genom public void CalculateSimilarity(Gen AntyGen) { Gens.ForEach(g => { var value = Math.Abs(AntyGen.FunctionValue - g.FunctionValue); var procent = (value / AntyGen.FunctionValue); var realProcent = 100 - (procent * 100); g.Similarity = (int)realProcent; }); }
/// <summary> /// Dodaje gen do listy /// </summary> /// <param name="antibody"></param> public void Add(Gen antibody) { Gens.Add(antibody); }
/// <summary> /// Usuwa konkretny gen z listy /// </summary> /// <param name="gen"></param> public void Remove(Gen gen) { Gens.Remove(gen); }