Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/23/21 16:36:44 (4 years ago)
Author:
dpiringe
Message:

#3026

  • removed property ConvertableType from all converters
  • removed the option to fixate or loosen the path of JsonItems (obsolete)
  • added a abstract formatter SymbolicRegressionSolutionFormatterBase as base formatter for ISymbolicRegressionSolution
  • unified the construction of exporter controls
  • code cleanup
Location:
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/ResultFormatter
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/ResultFormatter/MatlabResultFormatter.cs

    r17834 r17843  
    1 using System;
    2 using System.Collections.Generic;
    3 using System.Linq;
    4 using System.Text;
    5 using System.Threading.Tasks;
    6 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
     1using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    72using HeuristicLab.Problems.DataAnalysis.Symbolic;
    8 using HeuristicLab.Problems.DataAnalysis.Symbolic.Regression;
    93
    104namespace HeuristicLab.JsonInterface {
    11   public class MatlabResultFormatter : ResultFormatter {
    12     public override int Priority => 5;
    13 
    14     public override bool CanFormatType(Type t) {
    15       var interfaces = t.GetInterfaces();
    16       return t.GetInterfaces().Any(x => x == typeof(ISymbolicRegressionSolution));
    17     }
    18      
    19     private ISymbolicExpressionTreeStringFormatter MatlabFormatter => new SymbolicDataAnalysisExpressionMATLABFormatter();
    20 
    21     public override string Format(object o) => MatlabFormatter.Format((ISymbolicExpressionTree)((ISymbolicRegressionSolution)o).Model.SymbolicExpressionTree);
     5  public class MatlabResultFormatter : SymbolicRegressionSolutionFormatterBase {
     6    protected override ISymbolicExpressionTreeStringFormatter SymbolicExpressionTreeStringFormatter
     7      => new SymbolicDataAnalysisExpressionMATLABFormatter();
    228  }
    239}
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/ResultFormatter/ResultFormatter.cs

    r17834 r17843  
    1212  public abstract class ResultFormatter : IResultFormatter {
    1313    public abstract int Priority { get; }
    14 
    1514    public abstract bool CanFormatType(Type t);
    1615    public abstract string Format(object o);
Note: See TracChangeset for help on using the changeset viewer.