Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3625 for trunk


Ignore:
Timestamp:
05/05/10 11:18:01 (15 years ago)
Author:
mkommend
Message:

corrected cloning of RunCollection (ticket#970)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization/3.3/RunCollection.cs

    r3614 r3625  
    4545      constraints.CollectionReset += new CollectionItemsChangedEventHandler<IRunCollectionConstraint>(Constraints_CollectionReset);
    4646    }
     47    [Storable]
    4748    private Dictionary<string, HashSet<Type>> dataTypes;
    4849    public IEnumerable<Type> GetDataType(string columnName) {
     
    5354    private RunCollectionConstraintCollection constraints;
    5455    public RunCollectionConstraintCollection Constraints {
    55       get { return constraints;}
     56      get { return constraints; }
    5657    }
    5758
     
    157158    }
    158159
     160    public override IDeepCloneable Clone(Cloner cloner) {
     161      RunCollection clone = (RunCollection)base.Clone(cloner);
     162      clone.resultNames = this.resultNames;
     163      clone.parameterNames = this.parameterNames;
     164      clone.dataTypes = new Dictionary<string, HashSet<Type>>();
     165      foreach (string s in this.dataTypes.Keys)
     166        clone.dataTypes[s] = new HashSet<Type>(this.dataTypes[s]);
     167
     168      return clone;
     169    }
     170
    159171    #region IStringConvertibleMatrix Members
    160172    [Storable]
Note: See TracChangeset for help on using the changeset viewer.