- Timestamp:
- 03/19/10 15:59:37 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVectorCreator.cs
r3060 r3123 47 47 get { return (IValueLookupParameter<IntValue>)Parameters["Length"]; } 48 48 } 49 public IValueLookupParameter<DoubleValue> MinimumParameter { 50 get { return (IValueLookupParameter<DoubleValue>)Parameters["Minimum"]; } 51 } 52 public IValueLookupParameter<DoubleValue> MaximumParameter { 53 get { return (IValueLookupParameter<DoubleValue>)Parameters["Maximum"]; } 49 public IValueLookupParameter<DoubleMatrix> BoundsParameter { 50 get { return (IValueLookupParameter<DoubleMatrix>)Parameters["Bounds"]; } 54 51 } 55 52 … … 59 56 Parameters.Add(new LookupParameter<RealVector>("RealVector", "The vector which should be manipulated.")); 60 57 Parameters.Add(new ValueLookupParameter<IntValue>("Length", "The length of the vector.")); 61 Parameters.Add(new ValueLookupParameter<DoubleValue>("Minimum", "The lower bound for each element in the vector.")); 62 Parameters.Add(new ValueLookupParameter<DoubleValue>("Maximum", "The upper bound for each element in the vector.")); 58 Parameters.Add(new ValueLookupParameter<DoubleMatrix>("Bounds", "A 2 column matrix specifying the lower and upper bound for each dimension. If there are less rows than dimension the bounds vector is cycled.")); 63 59 } 64 60 65 61 public sealed override IOperation Apply() { 66 RealVectorParameter.ActualValue = Create(RandomParameter.ActualValue, LengthParameter.ActualValue, MinimumParameter.ActualValue, MaximumParameter.ActualValue);62 RealVectorParameter.ActualValue = Create(RandomParameter.ActualValue, LengthParameter.ActualValue, BoundsParameter.ActualValue); 67 63 return base.Apply(); 68 64 } 69 65 70 protected abstract RealVector Create(IRandom random, IntValue length, Double Value minimum, DoubleValue maximum);66 protected abstract RealVector Create(IRandom random, IntValue length, DoubleMatrix bounds); 71 67 } 72 68 }
Note: See TracChangeset
for help on using the changeset viewer.