Changeset 3048 for trunk/sources/HeuristicLab.Data/3.3/DoubleMatrix.cs
- Timestamp:
- 03/15/10 23:49:54 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Data/3.3/DoubleMatrix.cs
r3047 r3048 25 25 26 26 namespace HeuristicLab.Data { 27 [Item("DoubleMatrix Data", "Represents a matrix of double values.")]27 [Item("DoubleMatrix", "Represents a matrix of double values.")] 28 28 [Creatable("Test")] 29 29 [StorableClass] 30 public sealed class DoubleMatrix Data : ValueTypeMatrixData<double>, IStringConvertibleMatrixData{31 public DoubleMatrix Data() : base() { }32 public DoubleMatrix Data(int rows, int columns) : base(rows, columns) { }33 public DoubleMatrix Data(double[,] elements) : base(elements) { }34 private DoubleMatrix Data(DoubleMatrixDataelements) : base(elements) { }30 public sealed class DoubleMatrix : ValueTypeMatrix<double>, IStringConvertibleMatrix { 31 public DoubleMatrix() : base() { } 32 public DoubleMatrix(int rows, int columns) : base(rows, columns) { } 33 public DoubleMatrix(double[,] elements) : base(elements) { } 34 private DoubleMatrix(DoubleMatrix elements) : base(elements) { } 35 35 36 36 public override IDeepCloneable Clone(Cloner cloner) { 37 DoubleMatrix Data clone = new DoubleMatrixData(this);37 DoubleMatrix clone = new DoubleMatrix(this); 38 38 cloner.RegisterClonedObject(this, clone); 39 39 return clone; 40 40 } 41 41 42 #region IStringConvertibleMatrix DataMembers43 int IStringConvertibleMatrix Data.Rows {42 #region IStringConvertibleMatrix Members 43 int IStringConvertibleMatrix.Rows { 44 44 get { return Rows; } 45 45 set { Rows = value; } 46 46 } 47 int IStringConvertibleMatrix Data.Columns {47 int IStringConvertibleMatrix.Columns { 48 48 get { return Columns; } 49 49 set { Columns = value; } 50 50 } 51 51 52 bool IStringConvertibleMatrix Data.Validate(string value, out string errorMessage) {52 bool IStringConvertibleMatrix.Validate(string value, out string errorMessage) { 53 53 double val; 54 54 bool valid = double.TryParse(value, out val); … … 63 63 return valid; 64 64 } 65 string IStringConvertibleMatrix Data.GetValue(int rowIndex, int columIndex) {65 string IStringConvertibleMatrix.GetValue(int rowIndex, int columIndex) { 66 66 return this[rowIndex, columIndex].ToString(); 67 67 } 68 bool IStringConvertibleMatrix Data.SetValue(string value, int rowIndex, int columnIndex) {68 bool IStringConvertibleMatrix.SetValue(string value, int rowIndex, int columnIndex) { 69 69 double val; 70 70 if (double.TryParse(value, out val)) {
Note: See TracChangeset
for help on using the changeset viewer.