Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/06/10 01:56:04 (14 years ago)
Author:
swagner
Message:

Merged cloning refactoring branch back into trunk (#922)

Location:
trunk/sources
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources

  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/ChangeNodeTypeManipulationTest.cs

    r4189 r4722  
    2323using System.Collections.Generic;
    2424using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    25 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureManipulators;
    2625using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
     26using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Manipulators;
    2727using HeuristicLab.Random;
    2828using Microsoft.VisualStudio.TestTools.UnitTesting;
    29 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Manipulators;
    3029
    3130namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding_3._3.Tests {
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/Grammars.cs

    r4106 r4722  
    2121
    2222using System.Collections.Generic;
     23using HeuristicLab.Common;
    2324using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2425using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
     
    2627namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding_3._3.Tests {
    2728  public static class Grammars {
    28     private class Addition : Symbol { public Addition() : base("Addition", "") { } }
    29     private class Subtraction : Symbol { public Subtraction() : base("Subtraction", "") { } }
    30     private class Multiplication : Symbol { public Multiplication() : base("Multiplication", "") { } }
    31     private class Division : Symbol { public Division() : base("Division", "") { } }
    32     private class Terminal : Symbol { public Terminal() : base("Terminal", "") { } }
     29    private class Addition : Symbol {
     30      protected Addition(Addition original, Cloner cloner) : base(original, cloner) { }
     31      public Addition() : base("Addition", "") { }
     32      public override IDeepCloneable Clone(Cloner cloner) {
     33        return new Addition(this, cloner);
     34      }
     35    }
     36    private class Subtraction : Symbol {
     37      protected Subtraction(Subtraction original, Cloner cloner) : base(original, cloner) { }
     38      public Subtraction() : base("Subtraction", "") { }
     39      public override IDeepCloneable Clone(Cloner cloner) {
     40        return new Subtraction(this, cloner);
     41      }
     42    }
     43    private class Multiplication : Symbol {
     44      protected Multiplication(Multiplication original, Cloner cloner) : base(original, cloner) { }
     45      public Multiplication() : base("Multiplication", "") { }
     46      public override IDeepCloneable Clone(Cloner cloner) {
     47        return new Multiplication(this, cloner);
     48      }
     49    }
     50    private class Division : Symbol {
     51      protected Division(Division original, Cloner cloner) : base(original, cloner) { }
     52      public Division() : base("Division", "") { }
     53      public override IDeepCloneable Clone(Cloner cloner) {
     54        return new Division(this, cloner);
     55      }
     56    }
     57    private class Terminal : Symbol {
     58      protected Terminal(Terminal original, Cloner cloner) : base(original, cloner) { }
     59      public Terminal() : base("Terminal", "") { }
     60      public override IDeepCloneable Clone(Cloner cloner) {
     61        return new Terminal(this, cloner);
     62      }
     63    }
    3364
    3465    private class SimpleArithmeticGrammar : DefaultSymbolicExpressionGrammar {
     66      protected SimpleArithmeticGrammar(SimpleArithmeticGrammar original, Cloner cloner) : base(original, cloner) { }
    3567      public SimpleArithmeticGrammar()
    3668        : base() {
    3769        Initialize();
     70      }
     71
     72      public override IDeepCloneable Clone(Cloner cloner) {
     73        return new SimpleArithmeticGrammar(this, cloner);
    3874      }
    3975
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/ReplaceBranchManipulationTest.cs

    r4189 r4722  
    2323using System.Collections.Generic;
    2424using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    25 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureManipulators;
    2625using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
     26using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Manipulators;
    2727using HeuristicLab.Random;
    2828using Microsoft.VisualStudio.TestTools.UnitTesting;
    29 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Manipulators;
    3029
    3130namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding_3._3.Tests {
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/Util.cs

    r4524 r4722  
    2525using System.Text;
    2626using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
     27using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
    2728using Microsoft.VisualStudio.TestTools.UnitTesting;
    28 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
    2929
    3030namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding_3._3.Tests {
Note: See TracChangeset for help on using the changeset viewer.