Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/30/09 19:41:58 (15 years ago)
Author:
gkronber
Message:

GP Refactoring #713

  • cleaned code
  • reintegrated GP.Boolean and GP.SantaFe
  • worked on serialization of function trees
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GP-Refactoring-713/sources/HeuristicLab.GP.StructureIdentification/3.3/ModelAnalyzerExporter.cs

    r2212 r2216  
    2121
    2222using HeuristicLab.GP.Interfaces;
     23using System;
    2324
    2425namespace HeuristicLab.GP.StructureIdentification {
    25   public class ModelAnalyzerExporter : IFunctionTreeExporter, IFunctionTreeNameGenerator {
     26  public class ModelAnalyzerExporter : IFunctionTreeSerializer, IFunctionTreeNameGenerator {
    2627    #region IFunctionTreeExporter Members
    2728
     
    5354      if(tree.SubTrees.Count > 0) result += ")";
    5455      return result;
     56    }
     57
     58    public IFunctionTree Import(string tree) {
     59      throw new UnknownFunctionException(tree);
     60    }
     61
     62    public bool TryImport(string tree, out IFunctionTree importedTree) {
     63      try {
     64        importedTree = Import(tree);
     65        return true;
     66      }
     67      catch (UnknownFunctionException) {
     68        importedTree = null;
     69        return false;
     70      }
    5571    }
    5672
     
    104120
    105121    #endregion
     122
     123
    106124  }
    107125
Note: See TracChangeset for help on using the changeset viewer.