コード例 #1
0
 // Substitution
 public double this[double value]
 {
     get { return(Coefficients.Sum(c => c.Value * Math.Pow(value, c.Key))); }
 }
コード例 #2
0
 private double GetEstimatedValue(IDataset dataset, int row)
 {
     return(Intercept + (Coefficients.Count == 0 ? 0 : Coefficients.Sum(s => s.Value * dataset.GetDoubleValue(s.Key, row))));
 }