- Timestamp:
- 10/29/20 15:24:40 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3022-FastFunctionExtraction/FFX/ProductBaseFunction.cs
r17737 r17779 8 8 public IBasisFunction B2 { get; set; } 9 9 10 public int Complexity 11 => 1 + B1.Complexity + B2.Complexity; 10 public int Complexity => 1 + B1.Complexity + B2.Complexity; 12 11 13 public bool Is Nominator { get; set; }12 public bool IsDenominator { get; set; } 14 13 15 public ProductBaseFunction(IBasisFunction b1, IBasisFunction b2, bool nominator) {14 public ProductBaseFunction(IBasisFunction b1, IBasisFunction b2, bool isDenominator) { 16 15 B1 = b1 ?? throw new ArgumentNullException(nameof(b1)); 17 16 B2 = b2 ?? throw new ArgumentNullException(nameof(b2)); 18 Is Nominator =nominator;17 IsDenominator = isDenominator; 19 18 } 20 19 21 public double[] Simulate(IRegressionProblemData data) {22 return B1. Simulate(data).Zip(B2.Simulate(data), (a, b) => a * b).ToArray();20 public double[] Evaluate(IRegressionProblemData data) { 21 return B1.Evaluate(data).Zip(B2.Evaluate(data), (a, b) => a * b).ToArray(); 23 22 } 24 23 … … 28 27 29 28 public IBasisFunction DeepCopy() { 30 return new ProductBaseFunction(B1, B2, Is Nominator);29 return new ProductBaseFunction(B1, B2, IsDenominator); 31 30 } 32 31 }
Note: See TracChangeset
for help on using the changeset viewer.