Changeset 18026 for branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/ResultFormatters
- Timestamp:
- 07/20/21 17:39:48 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/ResultFormatters/SymbolicRegressionSolutionFormatterBase.cs
r17843 r18026 10 10 public override bool CanFormatType(Type t) { 11 11 var interfaces = t.GetInterfaces(); 12 return t.GetInterfaces().Any(x => x == typeof(ISymbolicRegressionSolution)); 12 var symRegSolutionType = typeof(ISymbolicRegressionSolution); 13 return t == symRegSolutionType || interfaces.Any(x => x == symRegSolutionType); 13 14 } 14 15 15 16 protected abstract ISymbolicExpressionTreeStringFormatter SymbolicExpressionTreeStringFormatter { get; } 16 17 17 public override string Format(object o) => SymbolicExpressionTreeStringFormatter.Format(( ISymbolicExpressionTree)((ISymbolicRegressionSolution)o).Model.SymbolicExpressionTree);18 public override string Format(object o) => SymbolicExpressionTreeStringFormatter.Format(((ISymbolicRegressionSolution)o).Model.SymbolicExpressionTree); 18 19 } 19 20 }
Note: See TracChangeset
for help on using the changeset viewer.