Changeset 13784 for trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/CovarianceFunctions/CovarianceScale.cs
 Timestamp:
 04/22/16 13:47:35 (5 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/CovarianceFunctions/CovarianceScale.cs
r13721 r13784 100 100 } 101 101 102 private static I Enumerable<double> GetGradient(double[,] x, int i, int j, int[] columnIndices, double scale, ParameterizedCovarianceFunction cov,102 private static IList<double> GetGradient(double[,] x, int i, int j, int[] columnIndices, double scale, ParameterizedCovarianceFunction cov, 103 103 bool fixedScale) { 104 var gr = new List<double>((!fixedScale ? 1 : 0) + cov.CovarianceGradient(x, i, j).Count); 104 105 if (!fixedScale) { 105 yield return 2 * scale * cov.Covariance(x, i, j);106 gr.Add(2 * scale * cov.Covariance(x, i, j)); 106 107 } 107 108 foreach (var g in cov.CovarianceGradient(x, i, j)) 108 yield return scale * g; 109 gr.Add(scale * g); 110 return gr; 109 111 } 110 112 }
Note: See TracChangeset
for help on using the changeset viewer.