Ignore:
Timestamp:
06/11/16 13:29:45 (5 years ago)
Author:
gkronber
Message:

#2591: removed capacity initialization in CovProd and CovSum because I believe it is more costly to calculate the capacity than to just increase the list capacity when necessary.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/CovarianceFunctions/CovarianceProduct.cs

    r13784 r13891  
    9494    public static IList<double> GetGradient(double[,] x, int i, int j, List<ParameterizedCovarianceFunction> factorFunctions) {
    9595      var covariances = factorFunctions.Select(f => f.Covariance(x, i, j)).ToArray();
    96       var gr = new List<double>(factorFunctions.Sum(f => f.CovarianceGradient(x, i, j).Count));
     96      var gr = new List<double>();
    9797      for (int ii = 0; ii < factorFunctions.Count; ii++) {
    9898        foreach (var g in factorFunctions[ii].CovarianceGradient(x, i, j)) {
Note: See TracChangeset for help on using the changeset viewer.