- Timestamp:
- 07/31/12 18:26:03 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/Util.cs
r8366 r8371 5 5 using System.Linq; 6 6 7 namespace HeuristicLab.Algorithms.DataAnalysis .GaussianProcess{7 namespace HeuristicLab.Algorithms.DataAnalysis { 8 8 public static class Util { 9 9 public static double ScalarProd(IEnumerable<double> v, IEnumerable<double> u) { … … 17 17 18 18 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(); 20 20 } 21 21
Note: See TracChangeset
for help on using the changeset viewer.