Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/26/08 14:59:06 (17 years ago)
Author:
gkronber
Message:

merged changes r338 r339 r340 r341 r342 r343 from the ticket-specific branch into the main trunk

Location:
trunk/sources/HeuristicLab.Functions
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Functions/BakedFunctionTree.cs

    r324 r344  
    286286        if(f.data.Count > 0) {
    287287          XmlAttribute dataAttribute = document.CreateAttribute("Data");
    288           dataAttribute.Value = GetString<double>(f.data);
     288          dataAttribute.Value = GetString(f.data);
    289289          entryNode.Attributes.Append(dataAttribute);
    290290        }
     
    311311    }
    312312
    313     private string GetString<T>(IEnumerable<T> xs) where T : IConvertible {
     313    private string GetString(IEnumerable<double> xs) {
    314314      StringBuilder builder = new StringBuilder();
    315       foreach(T x in xs) {
    316         builder.Append(x.ToString(CultureInfo.InvariantCulture) + "; ");
     315      foreach(double x in xs) {
     316        builder.Append(x.ToString("r", CultureInfo.InvariantCulture) + "; ");
    317317      }
    318318      if(builder.Length > 0) builder.Remove(builder.Length - 2, 2);
  • trunk/sources/HeuristicLab.Functions/ModelAnalyzerExporter.cs

    r310 r344  
    5454    public void Visit(Constant constant) {
    5555      double value = ((ConstrainedDoubleData)currentBranch.GetLocalVariable(HeuristicLab.Functions.Constant.VALUE).Value).Data;
    56       prefix += currentIndend + "[T]Constant(" + value + ";0;0)";
     56      prefix += currentIndend + "[T]Constant(" + value.ToString("r") + ";0;0)";
    5757    }
    5858
     
    106106      double offset = ((ConstrainedIntData)currentBranch.GetLocalVariable(HeuristicLab.Functions.Variable.OFFSET).Value).Data;
    107107
    108       prefix += currentIndend + "[T]Variable(" + weight + ";" + index + ";" + -offset + ")";
     108      prefix += currentIndend + "[T]Variable(" + weight.ToString("r") + ";" + index + ";" + -offset + ")";
    109109    }
    110110
Note: See TracChangeset for help on using the changeset viewer.