Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/02/16 14:38:40 (8 years ago)
Author:
gkronber
Message:

#2591: merged r13438 (#2541), r13721, r13724, r13784, r13891 from trunk to stable

Location:
stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Algorithms.DataAnalysis

  • stable/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/CovarianceFunctions/CovarianceNoise.cs

    r12009 r13981  
    2121
    2222using System;
    23 using System.Collections.Generic;
    24 using System.Linq;
    2523using HeuristicLab.Common;
    2624using HeuristicLab.Core;
     
    8482    }
    8583
    86     public ParameterizedCovarianceFunction GetParameterizedCovarianceFunction(double[] p, IEnumerable<int> columnIndices) {
     84    public ParameterizedCovarianceFunction GetParameterizedCovarianceFunction(double[] p, int[] columnIndices) {
    8785      double scale;
    8886      GetParameterValues(p, out scale);
     
    9189      var cov = new ParameterizedCovarianceFunction();
    9290      cov.Covariance = (x, i, j) => i == j ? scale : 0.0;
    93       cov.CrossCovariance = (x, xt, i, j) => Util.SqrDist(x, i, xt, j, 1.0, columnIndices) < 1e-9 ? scale : 0.0;
     91      cov.CrossCovariance = (x, xt, i, j) => Util.SqrDist(x, i, xt, j, columnIndices, 1.0) < 1e-9 ? scale : 0.0;
    9492      if (fixedScale)
    95         cov.CovarianceGradient = (x, i, j) => Enumerable.Empty<double>();
     93        cov.CovarianceGradient = (x, i, j) => new double[0];
    9694      else
    97         cov.CovarianceGradient = (x, i, j) => Enumerable.Repeat(i == j ? 2.0 * scale : 0.0, 1);
     95        cov.CovarianceGradient = (x, i, j) => new double[1] { i == j ? 2.0 * scale : 0.0 };
    9896      return cov;
    9997    }
Note: See TracChangeset for help on using the changeset viewer.