Free cookie consent management tool by TermsFeed Policy Generator

Changeset 14082


Ignore:
Timestamp:
07/15/16 13:17:35 (8 years ago)
Author:
mkommend
Message:

#2637: Added CloneAsArray and CloneAsMatrix to the appropriate ValueType classes.

Location:
trunk/sources/HeuristicLab.Data/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Data/3.3/ValueTypeArray.cs

    r13695 r14082  
    146146    }
    147147
     148    public T[,] CloneAsArray() {
     149      //mkommend: this works because T must be a value type (struct constraint);
     150      return (T[,])array.Clone();
     151    }
     152
    148153    public override string ToString() {
    149154      if (array.Length == 0) return "[]";
  • trunk/sources/HeuristicLab.Data/3.3/ValueTypeMatrix.cs

    r12012 r14082  
    195195    }
    196196
     197   
     198    public T[,] CloneAsMatrix() {
     199      //mkommend: this works because T must be a value type (struct constraint);
     200      return (T[,])matrix.Clone();
     201    }
     202
    197203    public override string ToString() {
    198204      if (matrix.Length == 0) return "[]";
Note: See TracChangeset for help on using the changeset viewer.