- Timestamp:
- 03/23/21 15:24:58 (4 years ago)
- Location:
- trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/Interval.cs
r17902 r17911 271 271 } 272 272 273 public static Interval Analytic alQuotient(Interval a, Interval b) {273 public static Interval AnalyticQuotient(Interval a, Interval b) { 274 274 var dividend = a; 275 275 var divisor = Add(Square(b), new Interval(1.0, 1.0)); … … 306 306 public static Interval CubicRoot(double a) { return CubicRoot(new Interval(a)); } 307 307 public static Interval Absolute(double a) { return Absolute(new Interval(a)); } 308 public static Interval AnalyticQuotient(Interval a, double b) { return Analytic alQuotient(a, new Interval(b)); }309 public static Interval AnalyticQuotient(double a, Interval b) { return Analytic alQuotient(new Interval(a), b); }310 public static Interval AnalyticQuotient(double a, double b) { return Analytic alQuotient(new Interval(a), new Interval(b)); }308 public static Interval AnalyticQuotient(Interval a, double b) { return AnalyticQuotient(a, new Interval(b)); } 309 public static Interval AnalyticQuotient(double a, Interval b) { return AnalyticQuotient(new Interval(a), b); } 310 public static Interval AnalyticQuotient(double a, double b) { return AnalyticQuotient(new Interval(a), new Interval(b)); } 311 311 #endregion 312 312 } -
trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/ShapeConstraintsParser.cs
r17906 r17911 76 76 private const string weightRegex = @"\s*(weight:\s*(?<weight>\S*))?"; 77 77 public static ShapeConstraint ParseFunctionRangeConstraint(string expr) { 78 if (!expr.StartsWith("f")) throw new ArgumentException($"Invalid function range constraint {expr} (e.g. f in [1..2])" , nameof(expr));78 if (!expr.StartsWith("f")) throw new ArgumentException($"Invalid function range constraint {expr} (e.g. f in [1..2])"); 79 79 var start = "f".Length; 80 80 var end = expr.Length; … … 131 131 return new ShapeConstraint(interval, weight); 132 132 } else 133 throw new ArgumentException($"The inserted target constraint {expr} is not valid.", nameof(expr));133 throw new ArgumentException($"The target constraint {expr} is not valid."); 134 134 } 135 135 public static ShapeConstraint ParseDerivationConstraint(string expr) { … … 161 161 if (enumeratorNumDeriv != "" || denominatorNumDeriv != "") { 162 162 if (enumeratorNumDeriv == "" || denominatorNumDeriv == "") 163 throw new ArgumentException($"Number of derivation has to be written on both sides in {expr}." , nameof(expr));163 throw new ArgumentException($"Number of derivation has to be written on both sides in {expr}."); 164 164 if (enumeratorNumDeriv != denominatorNumDeriv) 165 throw new ArgumentException($"Derivation number is not equal on both sides in {expr}." , nameof(expr));165 throw new ArgumentException($"Derivation number is not equal on both sides in {expr}."); 166 166 } 167 167 … … 193 193 return new ShapeConstraint(variable, numberOfDerivation, interval, weight); 194 194 } else 195 throw new ArgumentException($"The inserted derivation constraint {expr} is not valid.", nameof(expr));195 throw new ArgumentException($"The derivation constraint {expr} is not valid."); 196 196 } 197 197
Note: See TracChangeset
for help on using the changeset viewer.