Changeset 1184 for trunk/sources/HeuristicLab.RealVector/BoundsChecker.cs
- Timestamp:
- 01/28/09 10:20:40 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.RealVector/BoundsChecker.cs
r102 r1184 27 27 28 28 namespace HeuristicLab.RealVector { 29 /// <summary> 30 /// Checks if all elements of a real vector are inside a given minimum and maximum value. 31 /// If not, the elements are corrected. 32 /// </summary> 29 33 public class BoundsChecker : OperatorBase { 34 /// <inheritdoc select="summary"/> 30 35 public override string Description { 31 36 get { return "Checks if all elements of a real vector are inside a given minimum and maximum value. If not, elements are corrected."; } 32 37 } 33 38 39 /// <summary> 40 /// Initializes a new instance of <see cref="BoundsChecker"/> with three variable infos 41 /// (<c>RealVector</c>, <c>Minimum</c> and <c>Maximum</c>). 42 /// </summary> 34 43 public BoundsChecker() 35 44 : base() { … … 39 48 } 40 49 50 /// <summary> 51 /// Checks if all elements of the given <paramref name="vector"/> are inside the given minimum 52 /// and maximum value and if not they are corrected. 53 /// </summary> 54 /// <param name="min">The minimum value of the range (inclusive).</param> 55 /// <param name="max">The maximum value of the range (inclusive).</param> 56 /// <param name="vector">The vector to check.</param> 57 /// <returns>The corrected real vector.</returns> 41 58 public static double[] Apply(double min, double max, double[] vector) { 42 59 int length = vector.Length; … … 50 67 } 51 68 69 /// <summary> 70 /// Checks if all elements of the given <paramref name="vector"/> are inside the given minimum 71 /// and maximum value and if not they are corrected. 72 /// </summary> 73 /// <remarks>Calls <see cref="Apply(double, double, double[])"/>.</remarks> 74 /// <param name="scope">The current scope.</param> 75 /// <returns><c>null</c>.</returns> 52 76 public override IOperation Apply(IScope scope) { 53 77 DoubleArrayData vector = GetVariableValue<DoubleArrayData>("RealVector", scope, false);
Note: See TracChangeset
for help on using the changeset viewer.