Changeset 11594 for branches/Breadcrumbs/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/CovarianceFunctions/CovarianceLinearArd.cs
- Timestamp:
- 11/27/14 11:23:37 (9 years ago)
- Location:
- branches/Breadcrumbs
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Breadcrumbs
- Property svn:ignore
-
old new 8 8 FxCopResults.txt 9 9 Google.ProtocolBuffers-0.9.1.dll 10 Google.ProtocolBuffers-2.4.1.473.dll 10 11 HeuristicLab 3.3.5.1.ReSharper.user 11 12 HeuristicLab 3.3.6.0.ReSharper.user 12 13 HeuristicLab.4.5.resharper.user 13 14 HeuristicLab.ExtLibs.6.0.ReSharper.user 15 HeuristicLab.Scripting.Development 14 16 HeuristicLab.resharper.user 15 17 ProtoGen.exe … … 17 19 _ReSharper.HeuristicLab 18 20 _ReSharper.HeuristicLab 3.3 21 _ReSharper.HeuristicLab 3.3 Tests 19 22 _ReSharper.HeuristicLab.ExtLibs 20 23 bin 21 24 protoc.exe 22 _ReSharper.HeuristicLab 3.3 Tests23 Google.ProtocolBuffers-2.4.1.473.dll
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/Breadcrumbs/HeuristicLab.Algorithms.DataAnalysis
- Property svn:mergeinfo changed
-
branches/Breadcrumbs/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/CovarianceFunctions/CovarianceLinearArd.cs
r9456 r11594 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 37 37 get { return (IValueParameter<DoubleArray>)Parameters["InverseLength"]; } 38 38 } 39 private bool HasFixedInverseLengthParameter { 40 get { return InverseLengthParameter.Value != null; } 41 } 39 42 40 43 [StorableConstructor] … … 57 60 58 61 public int GetNumberOfParameters(int numberOfVariables) { 59 if (InverseLengthParameter.Value == null) 62 if (HasFixedInverseLengthParameter) 63 return 0; 64 else 60 65 return numberOfVariables; 61 else62 return 0;63 66 } 64 67 … … 71 74 private void GetParameterValues(double[] p, out double[] inverseLength) { 72 75 // gather parameter values 73 if ( InverseLengthParameter.Value != null) {76 if (HasFixedInverseLengthParameter) { 74 77 inverseLength = InverseLengthParameter.Value.ToArray(); 75 78 } else { … … 81 84 double[] inverseLength; 82 85 GetParameterValues(p, out inverseLength); 86 var fixedInverseLength = HasFixedInverseLengthParameter; 83 87 // create functions 84 88 var cov = new ParameterizedCovarianceFunction(); 85 89 cov.Covariance = (x, i, j) => Util.ScalarProd(x, i, j, inverseLength, columnIndices); 86 90 cov.CrossCovariance = (x, xt, i, j) => Util.ScalarProd(x, i, xt, j, inverseLength, columnIndices); 87 cov.CovarianceGradient = (x, i, j) => GetGradient(x, i, j, inverseLength, columnIndices); 91 if (fixedInverseLength) 92 cov.CovarianceGradient = (x, i, j) => Enumerable.Empty<double>(); 93 else 94 cov.CovarianceGradient = (x, i, j) => GetGradient(x, i, j, inverseLength, columnIndices); 88 95 return cov; 89 96 }
Note: See TracChangeset
for help on using the changeset viewer.