Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/06/10 01:56:04 (13 years ago)
Author:
swagner
Message:

Merged cloning refactoring branch back into trunk (#922)

Location:
trunk/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources

  • trunk/sources/HeuristicLab.Data/3.3/DoubleMatrix.cs

    r3431 r4722  
    3030  [StorableClass]
    3131  public class DoubleMatrix : ValueTypeMatrix<double>, IStringConvertibleMatrix {
     32    [StorableConstructor]
     33    protected DoubleMatrix(bool deserializing) : base(deserializing) { }
     34    protected DoubleMatrix(DoubleMatrix original, Cloner cloner)
     35      : base(original, cloner) {
     36    }
    3237    public DoubleMatrix() : base() { }
    3338    public DoubleMatrix(int rows, int columns) : base(rows, columns) { }
     
    3944
    4045    public override IDeepCloneable Clone(Cloner cloner) {
    41       DoubleMatrix clone = new DoubleMatrix();
    42       cloner.RegisterClonedObject(this, clone);
    43       clone.matrix = (double[,])matrix.Clone();
    44       clone.columnNames = new List<string>(columnNames);
    45       clone.rowNames = new List<string>(rowNames);
    46       clone.sortableView = sortableView;
    47       clone.readOnly = readOnly;
    48       return clone;
     46      return new DoubleMatrix(this, cloner);
    4947    }
    5048
Note: See TracChangeset for help on using the changeset viewer.