Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/28/09 19:24:23 (15 years ago)
Author:
gkronber
Message:

Created a branch for #713

Location:
branches/GP-Refactoring-713
Files:
7 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/GP-Refactoring-713/sources/HeuristicLab.GP.SantaFe/3.3/FunctionLibraryInjector.cs

    r1529 r2202  
    3333    private const string OPERATORLIBRARY = "FunctionLibrary";
    3434
    35     private GPOperatorLibrary operatorLibrary;
     35    private FunctionLibrary operatorLibrary;
    3636
    3737    public override string Description {
     
    4141    public FunctionLibraryInjector()
    4242      : base() {
    43       AddVariableInfo(new VariableInfo(OPERATORLIBRARY, "Preconfigured default operator library", typeof(GPOperatorLibrary), VariableKind.New));
     43      AddVariableInfo(new VariableInfo(OPERATORLIBRARY, "Preconfigured default operator library", typeof(FunctionLibrary), VariableKind.New));
    4444    }
    4545
     
    7171      SetAllowedSubOperators(prog3, allFunctions);
    7272
    73       operatorLibrary = new GPOperatorLibrary();
    74       operatorLibrary.GPOperatorGroup.AddOperator(ifFoodAhead);
    75       operatorLibrary.GPOperatorGroup.AddOperator(prog2);
    76       operatorLibrary.GPOperatorGroup.AddOperator(prog3);
    77       operatorLibrary.GPOperatorGroup.AddOperator(move);
    78       operatorLibrary.GPOperatorGroup.AddOperator(left);
    79       operatorLibrary.GPOperatorGroup.AddOperator(right);
     73      operatorLibrary = new FunctionLibrary();
     74      operatorLibrary.FunctionGroup.AddFunction(ifFoodAhead);
     75      operatorLibrary.FunctionGroup.AddFunction(prog2);
     76      operatorLibrary.FunctionGroup.AddFunction(prog3);
     77      operatorLibrary.FunctionGroup.AddFunction(move);
     78      operatorLibrary.FunctionGroup.AddFunction(left);
     79      operatorLibrary.FunctionGroup.AddFunction(right);
    8080    }
    8181
  • branches/GP-Refactoring-713/sources/HeuristicLab.GP.SantaFe/3.3/IfFoodAhead.cs

    r1529 r2202  
    3939    public IfFoodAhead()
    4040      : base() {
    41       AddConstraint(new NumberOfSubOperatorsConstraint(2, 2));
    42       AddConstraint(new SubOperatorTypeConstraint(0));
    43       AddConstraint(new SubOperatorTypeConstraint(1));
     41      MinArity = 2; MaxArity = 2;
    4442    }
    4543  }
  • branches/GP-Refactoring-713/sources/HeuristicLab.GP.SantaFe/3.3/Left.cs

    r1529 r2202  
    3939    public Left()
    4040      : base() {
    41       AddConstraint(new NumberOfSubOperatorsConstraint(0, 0));
     41      MinArity = 0; MaxArity = 0;
    4242    }
    4343  }
  • branches/GP-Refactoring-713/sources/HeuristicLab.GP.SantaFe/3.3/Move.cs

    r1529 r2202  
    3939    public Move()
    4040      : base() {
    41       AddConstraint(new NumberOfSubOperatorsConstraint(0, 0));
     41      MinArity = 0; MaxArity = 0;
    4242    }
    4343  }
  • branches/GP-Refactoring-713/sources/HeuristicLab.GP.SantaFe/3.3/Prog2.cs

    r1529 r2202  
    3939    public Prog2()
    4040      : base() {
    41       AddConstraint(new NumberOfSubOperatorsConstraint(2, 2));
    42       AddConstraint(new SubOperatorTypeConstraint(0));
    43       AddConstraint(new SubOperatorTypeConstraint(1));
     41      MinArity = 2; MaxArity = 2;
    4442    }
    4543  }
  • branches/GP-Refactoring-713/sources/HeuristicLab.GP.SantaFe/3.3/Prog3.cs

    r1529 r2202  
    3939    public Prog3()
    4040      : base() {
    41       AddConstraint(new NumberOfSubOperatorsConstraint(3, 3));
    42       AddConstraint(new SubOperatorTypeConstraint(0));
    43       AddConstraint(new SubOperatorTypeConstraint(1));
    44       AddConstraint(new SubOperatorTypeConstraint(2));
     41      MinArity = 3; MaxArity = 3;
    4542    }
    4643  }
  • branches/GP-Refactoring-713/sources/HeuristicLab.GP.SantaFe/3.3/Right.cs

    r1529 r2202  
    3838    public Right()
    3939      : base() {
    40       AddConstraint(new NumberOfSubOperatorsConstraint(0, 0));
     40      MinArity = 0; MaxArity = 0;
    4141    }
    4242  }
Note: See TracChangeset for help on using the changeset viewer.