Evolution/Evolution/Genotypes/ListGenotype.cs
/// <summary>
/// Gets a copy of the genotype with gene gene at position i replaced with g
/// </summary>
/// <param name="i">The index</param>
/// <param name="g">The gene</param>
/// <returns></returns>
Gets a copy of the genotype with gene gene at position i replaced with g
Gets a copy of the genotype with gene gene at position i replaced with g
public ListGenotype<G> Replace(int i, G g)
        {
            List<G> res = new List<G>(genesList);
            res[i] = g;
            return new ListGenotype<G>(res);
        }
public ListGenotype < G > Replace ( int i , G g ) { List < G > res = new List < G > ( genesList ) ; res [ i ] = g ; return new ListGenotype < G > ( res ) ; }
Gets a copy of the genotype with gene gene at position i replaced with g
Gets a copy of the genotype with gene gene at position i replaced with g
None
i
int
None
g
G
None