Changeset 8463 for trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/CovarianceSEiso.cs
- Timestamp:
- 08/09/12 16:32:44 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/CovarianceSEiso.cs
r8455 r8463 114 114 int cols = xt.GetLength(0); 115 115 sd = new double[rows, cols]; 116 double lInv = 1.0 / l; 116 117 if (symmetric) { 117 118 for (int i = 0; i < rows; i++) { 118 119 for (int j = i; j < rows; j++) { 119 sd[i, j] = Util.SqrDist(Util.GetRow(x, i).Select(e => e / l), Util.GetRow(xt, j).Select(e => e / l));120 sd[i, j] = Util.SqrDist(Util.GetRow(x, i).Select(e => e * lInv), Util.GetRow(xt, j).Select(e => e * lInv)); 120 121 sd[j, i] = sd[i, j]; 121 122 } … … 124 125 for (int i = 0; i < rows; i++) { 125 126 for (int j = 0; j < cols; j++) { 126 sd[i, j] = Util.SqrDist(Util.GetRow(x, i).Select(e => e / l), Util.GetRow(xt, j).Select(e => e / l));127 sd[i, j] = Util.SqrDist(Util.GetRow(x, i).Select(e => e * lInv), Util.GetRow(xt, j).Select(e => e * lInv)); 127 128 } 128 129 }
Note: See TracChangeset
for help on using the changeset viewer.