Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GenomeStats{TInstance, TResult}"/> class.
 /// </summary>
 /// <param name="otherStats">The genome stats to copy from.</param>
 internal GenomeStats(GenomeStats <TInstance, TResult> otherStats)
 {
     this.Genome                      = otherStats.Genome;
     this._openInstances              = new HashSet <TInstance>(otherStats._openInstances);
     this._runningInstances           = new HashSet <TInstance>(otherStats._runningInstances);
     this._finishedInstances          = otherStats._finishedInstances.ToDictionary(i => i.Key, i => i.Value);
     this._cancelledByRacingInstances = new HashSet <TInstance>(otherStats._cancelledByRacingInstances);
     this.TotalInstanceCount          = otherStats.TotalInstanceCount;
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ImmutableGenomeStats{TInstance, TResult}"/> class.
 /// </summary>
 /// <param name="genomeStats">The underlying <see cref="GenomeStats{TInstance,TResult}"/>.</param>
 public ImmutableGenomeStats(GenomeStats <TInstance, TResult> genomeStats)
 {
     this._genomeStats = new GenomeStats <TInstance, TResult>(genomeStats);
 }