Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/29/20 15:24:40 (3 years ago)
Author:
gkronber
Message:

#3022: made a few changes while reviewing the code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3022-FastFunctionExtraction/FFX/ProductBaseFunction.cs

    r17737 r17779  
    88        public IBasisFunction B2 { get; set; }
    99
    10         public int Complexity
    11             => 1 + B1.Complexity + B2.Complexity;
     10        public int Complexity => 1 + B1.Complexity + B2.Complexity;
    1211
    13         public bool IsNominator { get; set; }
     12        public bool IsDenominator { get; set; }
    1413
    15         public ProductBaseFunction(IBasisFunction b1, IBasisFunction b2, bool nominator) {
     14        public ProductBaseFunction(IBasisFunction b1, IBasisFunction b2, bool isDenominator) {
    1615            B1 = b1 ?? throw new ArgumentNullException(nameof(b1));
    1716            B2 = b2 ?? throw new ArgumentNullException(nameof(b2));
    18             IsNominator = nominator;
     17            IsDenominator = isDenominator;
    1918        }
    2019
    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();
    2322        }
    2423
     
    2827
    2928        public IBasisFunction DeepCopy() {
    30             return new ProductBaseFunction(B1, B2, IsNominator);
     29            return new ProductBaseFunction(B1, B2, IsDenominator);
    3130        }
    3231    }
Note: See TracChangeset for help on using the changeset viewer.