public void Mutate(GenomInstance Instance) { foreach (Base b in Bases) { Instance.Bases[b.Index].Mutate(); } }
public void Randomize(GenomInstance Instance) { foreach (Base b in Bases) { Instance.Bases[b.Index].Randomize(); } }
public GenomInstance Clone(GenomInstance Instance) { GenomInstance NewInstance = CreateInstance(); foreach (Base b in Bases) { NewInstance.Bases[b.Index].Value = Instance.Bases[b.Index].Value; } return(NewInstance); }
public GenomInstance CreateInstance() { GenomInstance Instance = new GenomInstance(this); foreach (Base b in Bases) { Instance.Bases[b.Index] = new BaseInstance(b); } return(Instance); }
public GenomInstance Cross(GenomInstance A, GenomInstance B) { GenomInstance Instance = CreateInstance(); foreach (Base b in Bases) { if (Simulation.random.Next(2) == 0) { Instance.Bases[b.Index].Value = A.Bases[b.Index].Value; } else { Instance.Bases[b.Index].Value = B.Bases[b.Index].Value; } } return(Instance); }
public GenomInstance Cross(GenomInstance Other) { return(GenomT.Cross(this, Other)); }