- Timestamp:
- 11/15/16 20:09:41 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionConstantOptimizationEvaluator.cs
r14378 r14390 158 158 double[] constants; 159 159 160 TreeToAutoDiffTerm Transformator.ParametricFunction func;161 TreeToAutoDiffTerm Transformator.ParametricFunctionGradient func_grad;162 if (!TreeToAutoDiffTerm Transformator.TryTransformToAutoDiff(tree, updateVariableWeights, out variableNames, out lags, out constants, out func, out func_grad))160 TreeToAutoDiffTermConverter.ParametricFunction func; 161 TreeToAutoDiffTermConverter.ParametricFunctionGradient func_grad; 162 if (!TreeToAutoDiffTermConverter.TryTransformToAutoDiff(tree, updateVariableWeights, out variableNames, out lags, out constants, out func, out func_grad)) 163 163 throw new NotSupportedException("Could not optimize constants of symbolic expression tree due to not supported symbols used in the tree."); 164 164 if (variableNames.Length == 0) return 0.0; … … 231 231 } 232 232 233 private static alglib.ndimensional_pfunc CreatePFunc(TreeToAutoDiffTerm Transformator.ParametricFunction func) {233 private static alglib.ndimensional_pfunc CreatePFunc(TreeToAutoDiffTermConverter.ParametricFunction func) { 234 234 return (double[] c, double[] x, ref double fx, object o) => { 235 235 fx = func(c, x); … … 237 237 } 238 238 239 private static alglib.ndimensional_pgrad CreatePGrad(TreeToAutoDiffTerm Transformator.ParametricFunctionGradient func_grad) {239 private static alglib.ndimensional_pgrad CreatePGrad(TreeToAutoDiffTermConverter.ParametricFunctionGradient func_grad) { 240 240 return (double[] c, double[] x, ref double fx, double[] grad, object o) => { 241 241 var tupel = func_grad(c, x); … … 246 246 247 247 public static bool CanOptimizeConstants(ISymbolicExpressionTree tree) { 248 return TreeToAutoDiffTerm Transformator.IsCompatible(tree);248 return TreeToAutoDiffTermConverter.IsCompatible(tree); 249 249 } 250 250 }
Note: See TracChangeset
for help on using the changeset viewer.