Changeset 14766


Ignore:
Timestamp:
03/19/17 17:17:56 (7 months ago)
Author:
gkronber
Message:

#2650 reviewed and tested all analyzers and made some smaller changes

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  
    8585
    8686    private static string GetTextualRepresentationFromSubtreeOfDepth(ISymbolicExpressionTreeNode tree, int d) {
    87       if (d == 0) return "";
     87      if(d == 0) return "";
    8888      StringBuilder builder = new StringBuilder();
    8989      var varTreeNode = tree as VariableTreeNode;
    9090      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) {
    9294        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) {
    94100        builder.Append("(const");
    95101      } else {
    96102        builder.Append("(" + tree.ToString());
    97103      }
    98       for (int i = 0; i < tree.SubtreeCount; i++) {
     104      for(int i = 0; i < tree.SubtreeCount; i++) {
    99105        builder.Append(" " + GetTextualRepresentationFromSubtreeOfDepth(tree.GetSubtree(i), d - 1));
    100106      }
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisVariableFrequencyAnalyzer.cs

    r14243 r14766  
    186186      if (node is IVariableTreeNode) {
    187187        var laggedVarTreeNode = node as LaggedVariableTreeNode;
    188         var factorVarTreeNode = node as BinaryFactorVariableTreeNode;
     188        var binFactorVariableTreeNode = node as BinaryFactorVariableTreeNode;
    189189        var varConditionTreeNode = node as VariableConditionTreeNode;
    190190        if (laggedVarTreeNode != null) {
    191191          IncReferenceCount(references, laggedVarTreeNode.VariableName, currentLag + laggedVarTreeNode.Lag);
    192         } else if (factorVarTreeNode != null) {
     192        } else if (binFactorVariableTreeNode != null) {
    193193          if (aggregateFactorVariables) {
    194             IncReferenceCount(references, factorVarTreeNode.VariableName, currentLag);
     194            IncReferenceCount(references, binFactorVariableTreeNode.VariableName, currentLag);
    195195          } else {
    196             IncReferenceCount(references, factorVarTreeNode.VariableName + "=" + factorVarTreeNode.VariableValue, currentLag);
     196            IncReferenceCount(references, binFactorVariableTreeNode.VariableName + "=" + binFactorVariableTreeNode.VariableValue, currentLag);
    197197          }
    198198        } else if (varConditionTreeNode != null) {
Note: See TracChangeset for help on using the changeset viewer.