Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/31/12 18:26:03 (12 years ago)
Author:
gkronber
Message:

#1902: worked on Gaussian Process algorithm

File:
1 edited

Legend:

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

    r8366 r8371  
    55using System.Linq;
    66
    7 namespace HeuristicLab.Algorithms.DataAnalysis.GaussianProcess {
     7namespace HeuristicLab.Algorithms.DataAnalysis {
    88  public static class Util {
    99    public static double ScalarProd(IEnumerable<double> v, IEnumerable<double> u) {
     
    1717
    1818    public static double SqrDist(IEnumerable<double> x, IEnumerable<double> y) {
    19       return Math.Max(x.Zip(y, (a, b) => (a - b) * (a - b)).Sum(), 0);
     19      return x.Zip(y, SqrDist).Sum();
    2020    }
    2121
Note: See TracChangeset for help on using the changeset viewer.