- Timestamp:
- 01/21/09 11:36:53 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.IntVector/UniformRandomIntVectorGenerator.cs
r1057 r1157 27 27 28 28 namespace HeuristicLab.IntVector { 29 /// <summary> 30 /// Generates a new random integer vector with each element uniformly distributed in a specified range. 31 /// </summary> 29 32 public class UniformRandomIntVectorGenerator : OperatorBase { 33 /// <inheritdoc select="summary"/> 30 34 public override string Description { 31 35 get { return "Operator generating a new random integer vector with each element uniformly distributed in a specified range."; } 32 36 } 33 37 38 /// <summary> 39 /// Initializes a new instance of <see cref="UniformRandomIntVectorGenerator"/> with five variable infos 40 /// (<c>Random</c>, <c>Length</c>, <c>Minimum</c>, <c>Maximum</c> and <c>IntVector</c>). 41 /// </summary> 34 42 public UniformRandomIntVectorGenerator() { 35 43 AddVariableInfo(new VariableInfo("Random", "Pseudo random number generator", typeof(IRandom), VariableKind.In)); … … 40 48 } 41 49 50 /// <summary> 51 /// Generates a new random integer vector with the given <paramref name="length"/>. 52 /// </summary> 53 /// <param name="random">The random number generator.</param> 54 /// <param name="length">The length of the int vector.</param> 55 /// <param name="min">The minimum value of the sampling range for each vector element (inclusive).</param> 56 /// <param name="max">The maximum value of the sampling range for each vector element (exclusive).</param> 57 /// <returns>The newly created integer vector.</returns> 42 58 public static int[] Apply(IRandom random, int length, int min, int max) { 43 59 int[] result = new int[length]; … … 47 63 } 48 64 65 /// <summary> 66 /// Generates a new random integer vector and injects it in the given <paramref name="scope"/>. 67 /// </summary> 68 /// <param name="scope">The scope where to get the values from and where to inject the newly 69 /// created integer vector.</param> 70 /// <returns><c>null</c>.</returns> 49 71 public override IOperation Apply(IScope scope) { 50 72 IRandom random = GetVariableValue<IRandom>("Random", scope, true);
Note: See TracChangeset
for help on using the changeset viewer.