コード例 #1
0
        /// <inheritdoc/>
        public override void Copy(IGenome source)
        {
            DoubleArrayGenome sourceDouble = (DoubleArrayGenome)source;

            EngineArray.ArrayCopy(sourceDouble.data, this.data);
            Score         = source.Score;
            AdjustedScore = source.AdjustedScore;
        }
コード例 #2
0
 /// <summary>
 /// Construct a genome based on another genome.
 /// </summary>
 /// <param name="other">The other genome.</param>
 public DoubleArrayGenome(DoubleArrayGenome other)
 {
     this.data = (double[])other.Data.Clone();
 }
コード例 #3
0
        /// <inheritdoc/>
        public void Copy(IArrayGenome source, int sourceIndex, int targetIndex)
        {
            DoubleArrayGenome sourceInt = (DoubleArrayGenome)source;

            this.data[targetIndex] = sourceInt.data[sourceIndex];
        }
コード例 #4
0
 /// <summary>
 /// Construct a genome based on another genome.
 /// </summary>
 /// <param name="other">The other genome.</param>
 public DoubleArrayGenome(DoubleArrayGenome other)
 {
     this.data = (double[])other.Data.Clone();
 }