Changeset 5574 for branches/DataAnalysis Refactoring
- Timestamp:
- 02/28/11 20:31:09 (14 years ago)
- Location:
- branches/DataAnalysis Refactoring
- Files:
-
- 15 added
- 4 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab 3.3.sln
r5573 r5574 369 369 EndProject 370 370 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.ExternalEvaluation.GP.Views-3.4", "HeuristicLab.Problems.ExternalEvaluation.GP.Views\3.4\HeuristicLab.Problems.ExternalEvaluation.GP.Views-3.4.csproj", "{A0AF4D54-6A04-483E-A26D-97F8C1141526}" 371 EndProject 372 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.DataAnalysis.Tests-3.4", "HeuristicLab.Problems.DataAnalysis\3.4\Tests\HeuristicLab.Problems.DataAnalysis.Tests-3.4.csproj", "{F5013F6B-5A2D-4741-8FC9-31A6968E9C41}" 373 EndProject 374 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.DataAnalysis.Symbolic.Tests-3.4", "HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\Tests\HeuristicLab.Problems.DataAnalysis.Symbolic.Tests-3.4.csproj", "{2A976109-67B9-4FF0-89DE-A26A8307A1CE}" 371 375 EndProject 372 376 Global … … 1691 1695 {A0AF4D54-6A04-483E-A26D-97F8C1141526}.Release|x86.ActiveCfg = Release|x86 1692 1696 {A0AF4D54-6A04-483E-A26D-97F8C1141526}.Release|x86.Build.0 = Release|x86 1697 {F5013F6B-5A2D-4741-8FC9-31A6968E9C41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 1698 {F5013F6B-5A2D-4741-8FC9-31A6968E9C41}.Debug|Any CPU.Build.0 = Debug|Any CPU 1699 {F5013F6B-5A2D-4741-8FC9-31A6968E9C41}.Debug|x64.ActiveCfg = Debug|x64 1700 {F5013F6B-5A2D-4741-8FC9-31A6968E9C41}.Debug|x64.Build.0 = Debug|x64 1701 {F5013F6B-5A2D-4741-8FC9-31A6968E9C41}.Debug|x86.ActiveCfg = Debug|x86 1702 {F5013F6B-5A2D-4741-8FC9-31A6968E9C41}.Debug|x86.Build.0 = Debug|x86 1703 {F5013F6B-5A2D-4741-8FC9-31A6968E9C41}.Release|Any CPU.ActiveCfg = Release|Any CPU 1704 {F5013F6B-5A2D-4741-8FC9-31A6968E9C41}.Release|Any CPU.Build.0 = Release|Any CPU 1705 {F5013F6B-5A2D-4741-8FC9-31A6968E9C41}.Release|x64.ActiveCfg = Release|x64 1706 {F5013F6B-5A2D-4741-8FC9-31A6968E9C41}.Release|x64.Build.0 = Release|x64 1707 {F5013F6B-5A2D-4741-8FC9-31A6968E9C41}.Release|x86.ActiveCfg = Release|x86 1708 {F5013F6B-5A2D-4741-8FC9-31A6968E9C41}.Release|x86.Build.0 = Release|x86 1709 {2A976109-67B9-4FF0-89DE-A26A8307A1CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 1710 {2A976109-67B9-4FF0-89DE-A26A8307A1CE}.Debug|Any CPU.Build.0 = Debug|Any CPU 1711 {2A976109-67B9-4FF0-89DE-A26A8307A1CE}.Debug|x64.ActiveCfg = Debug|x64 1712 {2A976109-67B9-4FF0-89DE-A26A8307A1CE}.Debug|x64.Build.0 = Debug|x64 1713 {2A976109-67B9-4FF0-89DE-A26A8307A1CE}.Debug|x86.ActiveCfg = Debug|x86 1714 {2A976109-67B9-4FF0-89DE-A26A8307A1CE}.Debug|x86.Build.0 = Debug|x86 1715 {2A976109-67B9-4FF0-89DE-A26A8307A1CE}.Release|Any CPU.ActiveCfg = Release|Any CPU 1716 {2A976109-67B9-4FF0-89DE-A26A8307A1CE}.Release|Any CPU.Build.0 = Release|Any CPU 1717 {2A976109-67B9-4FF0-89DE-A26A8307A1CE}.Release|x64.ActiveCfg = Release|x64 1718 {2A976109-67B9-4FF0-89DE-A26A8307A1CE}.Release|x64.Build.0 = Release|x64 1719 {2A976109-67B9-4FF0-89DE-A26A8307A1CE}.Release|x86.ActiveCfg = Release|x86 1720 {2A976109-67B9-4FF0-89DE-A26A8307A1CE}.Release|x86.Build.0 = Release|x86 1693 1721 EndGlobalSection 1694 1722 GlobalSection(SolutionProperties) = preSolution -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/ArithmeticExpressionGrammar.cs
r5572 r5574 24 24 using HeuristicLab.Core; 25 25 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 26 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;27 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols; 27 29 28 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 30 29 [StorableClass] … … 51 50 constant.MinValue = -20; 52 51 constant.MaxValue = 20; 53 var variableSymbol = new HeuristicLab.Problems.DataAnalysis.Symbolic. Symbols.Variable();52 var variableSymbol = new HeuristicLab.Problems.DataAnalysis.Symbolic.Variable(); 54 53 55 54 var allSymbols = new List<Symbol>() { add, sub, mul, div, constant, variableSymbol }; -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/FullFunctionalExpressionGrammar.cs
r5572 r5574 24 24 using HeuristicLab.Core; 25 25 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 26 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;27 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols; 27 29 28 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 30 29 [StorableClass] … … 78 77 constant.MinValue = -20; 79 78 constant.MaxValue = 20; 80 var variableSymbol = new HeuristicLab.Problems.DataAnalysis.Symbolic. Symbols.Variable();79 var variableSymbol = new HeuristicLab.Problems.DataAnalysis.Symbolic.Variable(); 81 80 var laggedVariable = new LaggedVariable(); 82 81 laggedVariable.InitialFrequency = 0.0; -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentExpressionGrammar.cs
r5572 r5574 25 25 using HeuristicLab.Core; 26 26 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 27 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;28 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;30 28 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 31 29 [StorableClass] … … 78 76 constant.MinValue = -20; 79 77 constant.MaxValue = 20; 80 var variableSymbol = new HeuristicLab.Problems.DataAnalysis.Symbolic. Symbols.Variable();78 var variableSymbol = new HeuristicLab.Problems.DataAnalysis.Symbolic.Variable(); 81 79 var laggedVariable = new LaggedVariable(); 82 80 -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj
r5571 r5574 116 116 </Compile> 117 117 <Compile Include="Analyzers\SymbolicDataAnalysisVariableFrequencyAnalyzer.cs" /> 118 <Compile Include="Grammars\ArithmeticExpressionGrammar.cs" /> 119 <Compile Include="Grammars\FullFunctionalExpressionGrammar.cs" /> 120 <Compile Include="Grammars\TypeCoherentExpressionGrammar.cs" /> 118 121 <Compile Include="Interfaces\ISymbolicDataAnalysisMultiObjectiveAnalyzer.cs" /> 119 122 <Compile Include="Interfaces\ISymbolicDataAnalysisSingleObjectiveAnalyzer.cs" /> … … 269 272 </BootstrapperPackage> 270 273 </ItemGroup> 271 <ItemGroup> 272 <Folder Include="Grammars\" /> 273 </ItemGroup> 274 <ItemGroup /> 274 275 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 275 276 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeInterpreter.cs
r5571 r5574 303 303 } 304 304 case OpCodes.NOT: { 305 return Evaluate(dataset, ref row, state) > 0.0 ? 1.0 : -1.0;305 return Evaluate(dataset, ref row, state) > 0.0 ? -1.0 : 1.0; 306 306 } 307 307 case OpCodes.GT: { -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeSimplifier.cs
r5571 r5574 368 368 #region low level tree restructuring 369 369 private ISymbolicExpressionTreeNode MakeNot(ISymbolicExpressionTreeNode t) { 370 if (IsConstant(t .GetSubTree(0))) {370 if (IsConstant(t)) { 371 371 var constNode = t as ConstantTreeNode; 372 if (constNode.Value > 0) return MakeConstant( 1.0);373 else return MakeConstant( -1.0);374 } else if (IsNot(t .GetSubTree(0))) {375 return t.GetSubTree(0) .GetSubTree(0);376 } else if (!IsBoolean(t .GetSubTree(0))) {372 if (constNode.Value > 0) return MakeConstant(-1.0); 373 else return MakeConstant(1.0); 374 } else if (IsNot(t)) { 375 return t.GetSubTree(0); 376 } else if (!IsBoolean(t)) { 377 377 var gtNode = gtSymbol.CreateTreeNode(); 378 gtNode.AddSubTree(t.GetSubTree(0)); gtNode.AddSubTree(MakeConstant(0.0)); 379 return gtNode; 380 } else return t; 378 gtNode.AddSubTree(t); gtNode.AddSubTree(MakeConstant(0.0)); 379 var notNode = notSymbol.CreateTreeNode(); 380 notNode.AddSubTree(gtNode); 381 return notNode; 382 } else { 383 var notNode = notSymbol.CreateTreeNode(); 384 notNode.AddSubTree(t); 385 return notNode; 386 } 381 387 } 382 388
Note: See TracChangeset
for help on using the changeset viewer.