Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/26/08 11:20:48 (16 years ago)
Author:
gkronber
Message:

fixed serialization in plugin HeuristicLab.Functions (ticket #175)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Ticket175Branch/HeuristicLab.Functions/BakedFunctionTree.cs

    r324 r339  
    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);
Note: See TracChangeset for help on using the changeset viewer.