예제 #1
0
 public bool Equals(Gene other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(other.Sha256Hash == this.Sha256Hash);
 }
예제 #2
0
 public void Append(Gene gene)
 {
     EvolutionHistory = EvolutionHistory.Add(gene);
 }
 public bool Contains(Gene gene)
 {
     return(_genes.Contains(gene));
 }
예제 #4
0
 public bool Contains(Gene gene) =>
 _geneSet.Contains(gene);
예제 #5
0
 public EvolutionHistory Add(Gene gene)
 {
     return(new EvolutionHistory(
                _genes.Add(gene),
                _geneSet.Add(gene)));
 }