Changeset 14766
- Timestamp:
- 03/19/17 17:17:56 (8 years ago)
- Location:
- branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisAlleleFrequencyAnalyzer.cs
r14185 r14766 85 85 86 86 private static string GetTextualRepresentationFromSubtreeOfDepth(ISymbolicExpressionTreeNode tree, int d) { 87 if 87 if(d == 0) return ""; 88 88 StringBuilder builder = new StringBuilder(); 89 89 var varTreeNode = tree as VariableTreeNode; 90 90 var constTreeNode = tree as ConstantTreeNode; 91 if (varTreeNode != null) { 91 var factorVarTreeNode = tree as FactorVariableTreeNode; 92 var binFactorVarTreeNode = tree as BinaryFactorVariableTreeNode; 93 if(varTreeNode != null) { 92 94 builder.Append("(var " + varTreeNode.VariableName); 93 } else if (constTreeNode != null) { 95 } else if(factorVarTreeNode != null) { 96 builder.Append("(factor " + factorVarTreeNode.VariableName); 97 } else if(binFactorVarTreeNode != null) { 98 builder.Append("(factor " + binFactorVarTreeNode.VariableName + "=" + binFactorVarTreeNode.VariableValue); 99 } else if(constTreeNode != null) { 94 100 builder.Append("(const"); 95 101 } else { 96 102 builder.Append("(" + tree.ToString()); 97 103 } 98 for 104 for(int i = 0; i < tree.SubtreeCount; i++) { 99 105 builder.Append(" " + GetTextualRepresentationFromSubtreeOfDepth(tree.GetSubtree(i), d - 1)); 100 106 } -
branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisVariableFrequencyAnalyzer.cs
r14243 r14766 186 186 if (node is IVariableTreeNode) { 187 187 var laggedVarTreeNode = node as LaggedVariableTreeNode; 188 var factorVarTreeNode = node as BinaryFactorVariableTreeNode;188 var binFactorVariableTreeNode = node as BinaryFactorVariableTreeNode; 189 189 var varConditionTreeNode = node as VariableConditionTreeNode; 190 190 if (laggedVarTreeNode != null) { 191 191 IncReferenceCount(references, laggedVarTreeNode.VariableName, currentLag + laggedVarTreeNode.Lag); 192 } else if ( factorVarTreeNode != null) {192 } else if (binFactorVariableTreeNode != null) { 193 193 if (aggregateFactorVariables) { 194 IncReferenceCount(references, factorVarTreeNode.VariableName, currentLag);194 IncReferenceCount(references, binFactorVariableTreeNode.VariableName, currentLag); 195 195 } else { 196 IncReferenceCount(references, factorVarTreeNode.VariableName + "=" + factorVarTreeNode.VariableValue, currentLag);196 IncReferenceCount(references, binFactorVariableTreeNode.VariableName + "=" + binFactorVariableTreeNode.VariableValue, currentLag); 197 197 } 198 198 } else if (varConditionTreeNode != null) {
Note: See TracChangeset
for help on using the changeset viewer.