Changeset 16236 for branches/2915-AbsoluteSymbol
- Timestamp:
- 10/18/18 14:42:12 (6 years ago)
- Location:
- branches/2915-AbsoluteSymbol
- Files:
-
- 7 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/2915-AbsoluteSymbol
- Property svn:mergeinfo changed
/branches/2937_SymReg_AnalyticalQuotient (added) merged: 16083
- Property svn:mergeinfo changed
-
branches/2915-AbsoluteSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
/branches/2937_SymReg_AnalyticalQuotient/HeuristicLab.Problems.DataAnalysis.Symbolic (added) merged: 16083
- Property svn:mergeinfo changed
-
branches/2915-AbsoluteSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/TreeToAutoDiffTermConverter.cs
r15583 r16236 212 212 if (terms.Count == 1) return 1.0 / terms[0]; 213 213 else return terms.Aggregate((a, b) => new AutoDiff.Product(a, 1.0 / b)); 214 } 215 if(node.Symbol is AnalyticalQuotient) { 216 var x1 = ConvertToAutoDiff(node.GetSubtree(0)); 217 var x2 = ConvertToAutoDiff(node.GetSubtree(1)); 218 return x1 / (TermBuilder.Power(1 + x2 * x2, 0.5)); 214 219 } 215 220 if (node.Symbol is Logarithm) { -
branches/2915-AbsoluteSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/FullFunctionalExpressionGrammar.cs
r15944 r16236 48 48 var mul = new Multiplication(); 49 49 var div = new Division(); 50 var aq = new AnalyticalQuotient(); 50 51 var mean = new Average(); 51 52 var sin = new Sine(); … … 124 125 autoregressiveVariable.Enabled = false; 125 126 126 var allSymbols = new List<Symbol>() { add, sub, mul, div, mean, abs, sin, cos, tan, log, square, pow, sqrt, root, exp,127 var allSymbols = new List<Symbol>() { add, sub, mul, div, aq, mean, abs, sin, cos, tan, log, square, pow, sqrt, root, exp, 127 128 airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, fresnelCosineIntegral, fresnelSineIntegral, gamma, hypCosineIntegral, hypSineIntegral, norm, psi, sineIntegral, 128 129 @if, gt, lt, and, or, not,xor, timeLag, integral, derivative, constant, variableSymbol, binFactorVariable, factorVariable, laggedVariable,autoregressiveVariable, variableCondition }; … … 131 132 }; 132 133 133 var binaryFunctionSymbols = new List<Symbol>() { pow, root, gt, lt, variableCondition };134 var binaryFunctionSymbols = new List<Symbol>() { pow, root, gt, lt, aq, variableCondition }; 134 135 var ternarySymbols = new List<Symbol>() { add, sub, mul, div, mean, and, or, xor }; 135 136 var terminalSymbols = new List<Symbol>() { variableSymbol, binFactorVariable, factorVariable, constant, laggedVariable, autoregressiveVariable }; -
branches/2915-AbsoluteSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj
r15944 r16236 208 208 <Compile Include="Symbols\BinaryFactorVariable.cs" /> 209 209 <Compile Include="Symbols\BinaryFactorVariableTreeNode.cs" /> 210 <Compile Include="Symbols\AnalyticalQuotient.cs" /> 210 211 <Compile Include="Symbols\FactorVariableTreeNode.cs" /> 211 212 <Compile Include="Symbols\FactorVariable.cs" /> -
branches/2915-AbsoluteSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/OpCodes.cs
r15944 r16236 86 86 public const byte BinaryFactorVariable = 47; 87 87 public const byte Absolute = 48; 88 public const byte AnalyticalQuotient = 49; 88 89 89 90 … … 137 138 { typeof(FactorVariable), OpCodes.FactorVariable }, 138 139 { typeof(BinaryFactorVariable), OpCodes.BinaryFactorVariable }, 139 {typeof(Absolute), OpCodes.Absolute } 140 { typeof(Absolute), OpCodes.Absolute } 141 { typeof(AnalyticalQuotient), OpCodes.AnalyticalQuotient } 140 142 }; 141 143 -
branches/2915-AbsoluteSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeLinearInterpreter.cs
r15944 r16236 215 215 if (instr.nArguments == 1) p = 1.0 / p; 216 216 instr.value = p; 217 } else if (instr.opCode == OpCodes.AnalyticalQuotient) { 218 var x1 = code[instr.childIndex].value; 219 var x2 = code[instr.childIndex + 1].value; 220 instr.value = x1 / Math.Sqrt(1 + x2 * x2); 217 221 } else if (instr.opCode == OpCodes.Average) { 218 222 double s = code[instr.childIndex].value;
Note: See TracChangeset
for help on using the changeset viewer.