Changeset 15865 for branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/ExponentialTransformation.cs
 Timestamp:
 03/27/18 15:46:12 (3 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/ExponentialTransformation.cs
r15847 r15865 49 49 public ExponentialTransformation() 50 50 : base() { 51 Parameters.Add(new FixedValueParameter<DoubleValue>("Base", " Base the logarithm", new DoubleValue(Math.E)));51 Parameters.Add(new FixedValueParameter<DoubleValue>("Base", "", new DoubleValue(Math.E))); 52 52 } 53 53 … … 65 65 #endregion 66 66 67 public override bool Check(IEnumerable<double> data, out string errorMessage) {68 if (data.Any(x => x <= 0)) {69 errorMessage = "Log is not available for zero or negative values";70 return false;71 }72 return base.Check(data, out errorMessage);73 }74 75 67 public override IEnumerable<double> Apply(IEnumerable<double> data) { 76 68 return Apply(data, Base); … … 80 72 return InverseApply(data, Base); 81 73 } 74 82 75 83 76 public static IEnumerable<double> Apply(IEnumerable<double> data, double @base = Math.E) {
Note: See TracChangeset
for help on using the changeset viewer.