Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/08/09 11:07:24 (15 years ago)
Author:
gkronber
Message:

Fixed bug in s-exp export format of terminal nodes. #715

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/CEDMA-Exporter-715/tools/CedmaExporter/SymbolicExpressionExporter.cs

    r2232 r2262  
    7171        BuildExportString(subTree);
    7272      }
    73       if(tree.SubTrees.Count > 0) builder.Append(")");
     73      builder.Append(")");
    7474      currentIndent = currentIndent.Remove(0, 2);
    7575    }
     
    181181
    182182    public static string ExportToScheme(this Variable variable, IFunctionTree tree, Dataset ds) {
    183       return "(variable " + tree.GetLocalVariable(Variable.WEIGHT).Value + " " +
    184         ds.GetVariableName(int.Parse(tree.GetLocalVariable(Variable.INDEX).Value.ToString())) + " " + tree.GetLocalVariable(Variable.OFFSET).Value + ")";
     183      return "variable " + tree.GetLocalVariable(Variable.WEIGHT).Value + " " +
     184        ds.GetVariableName(int.Parse(tree.GetLocalVariable(Variable.INDEX).Value.ToString())) + " " + tree.GetLocalVariable(Variable.OFFSET).Value;
    185185    }
    186186    public static string ExportToScheme(this Differential differential, IFunctionTree tree, Dataset ds) {
    187       return "(differential " + tree.GetLocalVariable(Differential.WEIGHT).Value + " " +
    188         ds.GetVariableName(int.Parse(tree.GetLocalVariable(Differential.INDEX).Value.ToString())) + " " + tree.GetLocalVariable(Differential.OFFSET).Value + ")";
     187      return "differential " + tree.GetLocalVariable(Differential.WEIGHT).Value + " " +
     188        ds.GetVariableName(int.Parse(tree.GetLocalVariable(Differential.INDEX).Value.ToString())) + " " + tree.GetLocalVariable(Differential.OFFSET).Value;
    189189    }
    190190
Note: See TracChangeset for help on using the changeset viewer.