Changeset 3048 for trunk/sources/HeuristicLab.Data/3.3/BoolMatrix.cs
- Timestamp:
- 03/15/10 23:49:54 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Data/3.3/BoolMatrix.cs
r3047 r3048 25 25 26 26 namespace HeuristicLab.Data { 27 [Item("BoolMatrix Data", "Represents a matrix of boolean values.")]27 [Item("BoolMatrix", "Represents a matrix of boolean values.")] 28 28 [Creatable("Test")] 29 29 [StorableClass] 30 public sealed class BoolMatrix Data : ValueTypeMatrixData<bool>, IStringConvertibleMatrixData{31 public BoolMatrix Data() : base() { }32 public BoolMatrix Data(int rows, int columns) : base(rows, columns) { }33 public BoolMatrix Data(bool[,] elements) : base(elements) { }34 private BoolMatrix Data(BoolMatrixDataelements) : base(elements) { }30 public sealed class BoolMatrix : ValueTypeMatrix<bool>, IStringConvertibleMatrix { 31 public BoolMatrix() : base() { } 32 public BoolMatrix(int rows, int columns) : base(rows, columns) { } 33 public BoolMatrix(bool[,] elements) : base(elements) { } 34 private BoolMatrix(BoolMatrix elements) : base(elements) { } 35 35 36 36 public override IDeepCloneable Clone(Cloner cloner) { 37 BoolMatrix Data clone = new BoolMatrixData(this);37 BoolMatrix clone = new BoolMatrix(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 bool val; 54 54 bool valid = bool.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 bool val; 70 70 if (bool.TryParse(value, out val)) {
Note: See TracChangeset
for help on using the changeset viewer.