- Timestamp:
- 11/15/16 20:09:41 (8 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4
- Files:
-
- 3 added
- 2 deleted
- 3 edited
- 2 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/TreeSimplifier.cs
r14389 r14390 30 30 /// Simplifier for symbolic expressions 31 31 /// </summary> 32 public class SymbolicDataAnalysisExpressionTreeSimplifier {32 public class TreeSimplifier { 33 33 private Addition addSymbol = new Addition(); 34 34 private Subtraction subSymbol = new Subtraction(); … … 716 716 // fold constants 717 717 return MakeConstant(((ConstantTreeNode)a).Value / ((ConstantTreeNode)b).Value); 718 } if (IsConstant(a) && !((ConstantTreeNode)a).Value.IsAlmost(1.0)) { 718 } 719 if (IsConstant(a) && !((ConstantTreeNode)a).Value.IsAlmost(1.0)) { 719 720 return MakeFraction(MakeConstant(1.0), MakeProduct(b, Invert(a))); 720 721 } else if (IsVariable(a) && IsConstant(b)) { -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/TreeToAutoDiffTermConverter.cs
r14389 r14390 27 27 28 28 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 29 public class TreeToAutoDiffTerm Transformator {29 public class TreeToAutoDiffTermConverter { 30 30 public delegate double ParametricFunction(double[] vars, double[] @params); 31 31 public delegate Tuple<double[], double> ParametricFunctionGradient(double[] vars, double[] @params); … … 60 60 61 61 // use a transformator object which holds the state (variable list, parameter list, ...) for recursive transformation of the tree 62 var transformator = new TreeToAutoDiffTerm Transformator(makeVariableWeightsVariable);62 var transformator = new TreeToAutoDiffTermConverter(makeVariableWeightsVariable); 63 63 AutoDiff.Term term; 64 64 var success = transformator.TryTransformToAutoDiff(tree.Root.GetSubtree(0), out term); … … 88 88 private readonly bool makeVariableWeightsVariable; 89 89 90 private TreeToAutoDiffTerm Transformator(bool makeVariableWeightsVariable) {90 private TreeToAutoDiffTermConverter(bool makeVariableWeightsVariable) { 91 91 this.makeVariableWeightsVariable = makeVariableWeightsVariable; 92 92 this.variableNames = new List<string>(); -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionExcelFormatter.cs
r14185 r14390 51 51 while (dividend > 0) { 52 52 int modulo = (dividend - 1) % 26; 53 columnName = Convert.ToChar(65 + modulo).ToString() + columnName;53 columnName = System.Convert.ToChar(65 + modulo).ToString() + columnName; 54 54 dividend = (int)((dividend - modulo) / 26); 55 55 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj
r14378 r14390 137 137 <SubType>Code</SubType> 138 138 </Compile> 139 <Compile Include="Converters\Convert.cs" /> 140 <Compile Include="Converters\LinearModelToTreeConverter.cs" /> 141 <Compile Include="Converters\TreeSimplifier.cs" /> 142 <Compile Include="Converters\TreeToAutoDiffTermConverter.cs" /> 139 143 <Compile Include="Formatters\InfixExpressionFormatter.cs" /> 140 144 <Compile Include="Formatters\SymbolicDataAnalysisExpressionMathematicaFormatter.cs" /> … … 242 246 <Compile Include="Symbols\VariableConditionTreeNode.cs" /> 243 247 <Compile Include="Symbols\VariableTreeNode.cs" /> 244 <Compile Include="Transformation\SymbolicDataAnalysisExpressionTreeSimplifier.cs" /> 245 <Compile Include="Transformation\SymbolicExpressionTreeBacktransformator.cs" /> 246 <Compile Include="Transformation\TreeToAutoDiffTermTransformator.cs" /> 247 <Compile Include="Transformation\TransformationToSymbolicTreeMapper.cs" /> 248 <Compile Include="Transformations\SymbolicExpressionTreeBacktransformator.cs" /> 249 <Compile Include="Transformations\TransformationToSymbolicTreeMapper.cs" /> 248 250 <Compile Include="TreeMatching\SymbolicExpressionTreeBottomUpSimilarityCalculator.cs" /> 249 251 <Compile Include="TreeMatching\SymbolicExpressionTreeCanonicalSorter.cs" /> -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeSimplificationOperator.cs
r14185 r14390 37 37 } 38 38 39 private readonly SymbolicDataAnalysisExpressionTreeSimplifier simplifier = new SymbolicDataAnalysisExpressionTreeSimplifier();39 private readonly TreeSimplifier simplifier = new TreeSimplifier(); 40 40 41 41 [StorableConstructor]
Note: See TracChangeset
for help on using the changeset viewer.