- Timestamp:
- 07/28/09 19:24:23 (15 years ago)
- 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 33 33 private const string OPERATORLIBRARY = "FunctionLibrary"; 34 34 35 private GPOperatorLibrary operatorLibrary;35 private FunctionLibrary operatorLibrary; 36 36 37 37 public override string Description { … … 41 41 public FunctionLibraryInjector() 42 42 : 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)); 44 44 } 45 45 … … 71 71 SetAllowedSubOperators(prog3, allFunctions); 72 72 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); 80 80 } 81 81 -
branches/GP-Refactoring-713/sources/HeuristicLab.GP.SantaFe/3.3/IfFoodAhead.cs
r1529 r2202 39 39 public IfFoodAhead() 40 40 : base() { 41 AddConstraint(new NumberOfSubOperatorsConstraint(2, 2)); 42 AddConstraint(new SubOperatorTypeConstraint(0)); 43 AddConstraint(new SubOperatorTypeConstraint(1)); 41 MinArity = 2; MaxArity = 2; 44 42 } 45 43 } -
branches/GP-Refactoring-713/sources/HeuristicLab.GP.SantaFe/3.3/Left.cs
r1529 r2202 39 39 public Left() 40 40 : base() { 41 AddConstraint(new NumberOfSubOperatorsConstraint(0, 0));41 MinArity = 0; MaxArity = 0; 42 42 } 43 43 } -
branches/GP-Refactoring-713/sources/HeuristicLab.GP.SantaFe/3.3/Move.cs
r1529 r2202 39 39 public Move() 40 40 : base() { 41 AddConstraint(new NumberOfSubOperatorsConstraint(0, 0));41 MinArity = 0; MaxArity = 0; 42 42 } 43 43 } -
branches/GP-Refactoring-713/sources/HeuristicLab.GP.SantaFe/3.3/Prog2.cs
r1529 r2202 39 39 public Prog2() 40 40 : base() { 41 AddConstraint(new NumberOfSubOperatorsConstraint(2, 2)); 42 AddConstraint(new SubOperatorTypeConstraint(0)); 43 AddConstraint(new SubOperatorTypeConstraint(1)); 41 MinArity = 2; MaxArity = 2; 44 42 } 45 43 } -
branches/GP-Refactoring-713/sources/HeuristicLab.GP.SantaFe/3.3/Prog3.cs
r1529 r2202 39 39 public Prog3() 40 40 : 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; 45 42 } 46 43 } -
branches/GP-Refactoring-713/sources/HeuristicLab.GP.SantaFe/3.3/Right.cs
r1529 r2202 38 38 public Right() 39 39 : base() { 40 AddConstraint(new NumberOfSubOperatorsConstraint(0, 0));40 MinArity = 0; MaxArity = 0; 41 41 } 42 42 }
Note: See TracChangeset
for help on using the changeset viewer.