Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/08/10 02:21:50 (15 years ago)
Author:
swagner
Message:

Continued work on algorithm batch processing (#947).

Location:
trunk/sources/HeuristicLab.Core/3.3
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core/3.3/ItemArray.cs

    r3017 r3286  
    5555
    5656    public virtual IDeepCloneable Clone(Cloner cloner) {
    57       ItemArray<T> clone = (ItemArray<T>)Activator.CreateInstance(this.GetType(), this.Select(x => (T)cloner.Clone(x)));
     57      ItemArray<T> clone = (ItemArray<T>)Activator.CreateInstance(this.GetType());
    5858      cloner.RegisterClonedObject(this, clone);
     59      clone.array = this.Select(x => (T)cloner.Clone(x)).ToArray();
    5960      return clone;
    6061    }
  • trunk/sources/HeuristicLab.Core/3.3/ItemCollection.cs

    r3017 r3286  
    5151
    5252    public virtual IDeepCloneable Clone(Cloner cloner) {
    53       ItemCollection<T> clone = (ItemCollection<T>)Activator.CreateInstance(this.GetType(), this.Select(x => (T)cloner.Clone(x)));
     53      ItemCollection<T> clone = (ItemCollection<T>)Activator.CreateInstance(this.GetType());
    5454      cloner.RegisterClonedObject(this, clone);
     55      clone.list = new List<T>(this.Select(x => (T)cloner.Clone(x)));
    5556      return clone;
    5657    }
  • trunk/sources/HeuristicLab.Core/3.3/ItemList.cs

    r3017 r3286  
    5555
    5656    public virtual IDeepCloneable Clone(Cloner cloner) {
    57       ItemList<T> clone = (ItemList<T>)Activator.CreateInstance(this.GetType(), this.Select(x => (T)cloner.Clone(x)));
     57      ItemList<T> clone = (ItemList<T>)Activator.CreateInstance(this.GetType());
    5858      cloner.RegisterClonedObject(this, clone);
     59      clone.list = new List<T>(this.Select(x => (T)cloner.Clone(x)));
    5960      return clone;
    6061    }
  • trunk/sources/HeuristicLab.Core/3.3/ItemSet.cs

    r3017 r3286  
    5454
    5555    public virtual IDeepCloneable Clone(Cloner cloner) {
    56       ItemSet<T> clone = (ItemSet<T>)Activator.CreateInstance(this.GetType(), this.Select(x => (T)cloner.Clone(x)));
     56      ItemSet<T> clone = (ItemSet<T>)Activator.CreateInstance(this.GetType());
    5757      cloner.RegisterClonedObject(this, clone);
     58      clone.set = new HashSet<T>(this.Select(x => (T)cloner.Clone(x)));
    5859      return clone;
    5960    }
  • trunk/sources/HeuristicLab.Core/3.3/NamedItemCollection.cs

    r3017 r3286  
    5858    }
    5959    public virtual IDeepCloneable Clone(Cloner cloner) {
    60       NamedItemCollection<T> clone = (NamedItemCollection<T>)Activator.CreateInstance(this.GetType(), this.Select(x => (T)cloner.Clone(x)));
     60      NamedItemCollection<T> clone = (NamedItemCollection<T>)Activator.CreateInstance(this.GetType());
    6161      cloner.RegisterClonedObject(this, clone);
     62      foreach (string key in dict.Keys)
     63        clone.dict.Add(key, (T)cloner.Clone(dict[key]));
    6264      return clone;
    6365    }
Note: See TracChangeset for help on using the changeset viewer.