Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/12/21 15:24:18 (4 years ago)
Author:
dpiringe
Message:

#3026

  • added ResultFormatter to add an extra layer of result transformation logic (converting a result value to a string with a defined logic, e.g. MatlabResultFormatter for ISymbolicRegressionSolution)
  • extended the IResultJsonItem with two properties for result formatting
  • added a new control to selected a result formatter for a result value
  • refactored the Runner for the new result formatting process
Location:
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JsonItems
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JsonItems/JsonItem.cs

    r17828 r17834  
    125125      });
    126126
    127     public virtual void SetJObject(JObject jObject) { }
     127    public virtual void SetJObject(JObject jObject) {
     128      Name = (jObject[nameof(IJsonItem.Name)]?.ToObject<string>());
     129      Description = (jObject[nameof(IJsonItem.Description)]?.ToObject<string>());
     130    }
    128131    #endregion
    129132
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JsonItems/ResultJsonItem.cs

    r17828 r17834  
    1 namespace HeuristicLab.JsonInterface {
     1using System;
     2using System.Collections.Generic;
     3using System.Linq;
     4using Newtonsoft.Json.Linq;
     5
     6namespace HeuristicLab.JsonInterface {
    27  public class ResultJsonItem : JsonItem, IResultJsonItem {
     8    public string ResultFormatterType { get; set; }
     9
     10    public Type ValueType { get; set; }
     11
    312    protected override ValidationResult Validate() => ValidationResult.Successful();
    413
    5     public string Converter { get; set; }
     14    public override void SetJObject(JObject jObject) {
     15      base.SetJObject(jObject);
     16      ResultFormatterType = (jObject[nameof(IResultJsonItem.ResultFormatterType)]?.ToObject<string>());
     17    }
     18
    619  }
    720}
Note: See TracChangeset for help on using the changeset viewer.