Changeset 16251 for branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Problems.DynamicalSystemsModelling/3.3/Vector.cs
- Timestamp:
- 10/23/18 19:49:16 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Problems.DynamicalSystemsModelling/3.3/Vector.cs
r16249 r16251 78 78 } 79 79 80 public double this[int idx] { 81 get { 82 if (this == Vector.Zero) return 0.0; 83 else return arr[idx]; 84 } 85 set { 86 if (this == Vector.Zero) throw new InvalidOperationException(); 87 else arr[idx] = value; 88 } 89 } 90 91 public int Length { 92 get { 93 if (this == Vector.Zero) throw new InvalidOperationException(); 94 else return arr.Length; 95 } 96 } 97 80 98 private readonly double[] arr; // backing array; 81 99
Note: See TracChangeset
for help on using the changeset viewer.