Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/04/08 00:34:29 (16 years ago)
Author:
gkronber
Message:

added creation of empty SubOperatorTypeConstraints for each input of each function (#163)

Location:
trunk/sources/HeuristicLab.Functions
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Functions/Addition.cs

    r229 r434  
    4444      // 2 - 3 seems like an reasonable defaut (used for +,-,*,/) (discussion with swinkler and maffenze)
    4545      AddConstraint(new NumberOfSubOperatorsConstraint(2, 3));
     46      AddConstraint(new SubOperatorTypeConstraint(0));
     47      AddConstraint(new SubOperatorTypeConstraint(1));
     48      AddConstraint(new SubOperatorTypeConstraint(2));
    4649    }
    4750
  • trunk/sources/HeuristicLab.Functions/And.cs

    r229 r434  
    4040      : base() {
    4141      AddConstraint(new NumberOfSubOperatorsConstraint(2, 3));
     42      AddConstraint(new SubOperatorTypeConstraint(0));
     43      AddConstraint(new SubOperatorTypeConstraint(1));
     44      AddConstraint(new SubOperatorTypeConstraint(2));
    4245    }
    4346
  • trunk/sources/HeuristicLab.Functions/Average.cs

    r229 r434  
    3838      : base() {
    3939      AddConstraint(new NumberOfSubOperatorsConstraint(2, 3));
     40      AddConstraint(new SubOperatorTypeConstraint(0));
     41      AddConstraint(new SubOperatorTypeConstraint(1));
     42      AddConstraint(new SubOperatorTypeConstraint(2));
    4043    }
    4144
  • trunk/sources/HeuristicLab.Functions/Cosinus.cs

    r229 r434  
    3838      // must have exactly one subfunction
    3939      AddConstraint(new NumberOfSubOperatorsConstraint(1, 1));
     40      AddConstraint(new SubOperatorTypeConstraint(0));
    4041    }
    4142
  • trunk/sources/HeuristicLab.Functions/Division.cs

    r229 r434  
    5050      // 2 - 3 seems like an reasonable defaut (used for +,-,*,/) (discussion with swinkler and maffenze)
    5151      AddConstraint(new NumberOfSubOperatorsConstraint(2, 3));
     52      AddConstraint(new SubOperatorTypeConstraint(0));
     53      AddConstraint(new SubOperatorTypeConstraint(1));
     54      AddConstraint(new SubOperatorTypeConstraint(2));
    5255    }
    5356
  • trunk/sources/HeuristicLab.Functions/Equal.cs

    r229 r434  
    3838      : base() {
    3939      AddConstraint(new NumberOfSubOperatorsConstraint(2, 2));
     40      AddConstraint(new SubOperatorTypeConstraint(0));
     41      AddConstraint(new SubOperatorTypeConstraint(1));
    4042    }
    4143
  • trunk/sources/HeuristicLab.Functions/Exponential.cs

    r229 r434  
    3838      // must have exactly one sub-operator
    3939      AddConstraint(new NumberOfSubOperatorsConstraint(1, 1));
     40      AddConstraint(new SubOperatorTypeConstraint(0));
    4041    }
    4142
  • trunk/sources/HeuristicLab.Functions/GreaterThan.cs

    r229 r434  
    3838      : base() {
    3939      AddConstraint(new NumberOfSubOperatorsConstraint(2, 2));
     40      AddConstraint(new SubOperatorTypeConstraint(0));
     41      AddConstraint(new SubOperatorTypeConstraint(1));
    4042    }
    4143    public override void Accept(IFunctionVisitor visitor) {
  • trunk/sources/HeuristicLab.Functions/IfThenElse.cs

    r229 r434  
    3939      : base() {
    4040      AddConstraint(new NumberOfSubOperatorsConstraint(3, 3));
     41      AddConstraint(new SubOperatorTypeConstraint(0));
     42      AddConstraint(new SubOperatorTypeConstraint(1));
     43      AddConstraint(new SubOperatorTypeConstraint(2));
    4144    }
    4245
  • trunk/sources/HeuristicLab.Functions/LessThan.cs

    r229 r434  
    3838      : base() {
    3939      AddConstraint(new NumberOfSubOperatorsConstraint(2, 2));
     40      AddConstraint(new SubOperatorTypeConstraint(0));
     41      AddConstraint(new SubOperatorTypeConstraint(1));
    4042    }
    4143
  • trunk/sources/HeuristicLab.Functions/Logarithm.cs

    r229 r434  
    3838      // must have exactly 1 suboperator
    3939      AddConstraint(new NumberOfSubOperatorsConstraint(1, 1));
     40      AddConstraint(new SubOperatorTypeConstraint(0));
    4041    }
    4142
  • trunk/sources/HeuristicLab.Functions/Multiplication.cs

    r229 r434  
    4444      // 2 - 3 seems like an reasonable defaut (used for +,-,*,/) (discussion with swinkler and maffenze)
    4545      AddConstraint(new NumberOfSubOperatorsConstraint(2, 3));
     46      AddConstraint(new SubOperatorTypeConstraint(0));
     47      AddConstraint(new SubOperatorTypeConstraint(1));
     48      AddConstraint(new SubOperatorTypeConstraint(2));
    4649    }
    4750
  • trunk/sources/HeuristicLab.Functions/Not.cs

    r229 r434  
    3838      : base() {
    3939      AddConstraint(new NumberOfSubOperatorsConstraint(1, 1));
     40      AddConstraint(new SubOperatorTypeConstraint(0));
    4041    }
    4142
  • trunk/sources/HeuristicLab.Functions/Or.cs

    r229 r434  
    3939      : base() {
    4040      AddConstraint(new NumberOfSubOperatorsConstraint(2, 3));
     41      AddConstraint(new SubOperatorTypeConstraint(0));
     42      AddConstraint(new SubOperatorTypeConstraint(1));
     43      AddConstraint(new SubOperatorTypeConstraint(2));
    4144    }
    4245
  • trunk/sources/HeuristicLab.Functions/Power.cs

    r229 r434  
    3838      // must have exactly 2 suboperators base ^ exponent
    3939      AddConstraint(new NumberOfSubOperatorsConstraint(2, 2));
     40      AddConstraint(new SubOperatorTypeConstraint(0));
     41      AddConstraint(new SubOperatorTypeConstraint(1));
    4042    }
    4143
  • trunk/sources/HeuristicLab.Functions/Signum.cs

    r229 r434  
    3838      // must have exactly 1 suboperator
    3939      AddConstraint(new NumberOfSubOperatorsConstraint(1, 1));
     40      AddConstraint(new SubOperatorTypeConstraint(0));
    4041    }
    4142
  • trunk/sources/HeuristicLab.Functions/Sinus.cs

    r229 r434  
    3838      // must have exactly 1 suboperator
    3939      AddConstraint(new NumberOfSubOperatorsConstraint(1, 1));
     40      AddConstraint(new SubOperatorTypeConstraint(0));
    4041    }
    4142
  • trunk/sources/HeuristicLab.Functions/Sqrt.cs

    r229 r434  
    3838      // must have exactly 1 suboperator
    3939      AddConstraint(new NumberOfSubOperatorsConstraint(1, 1));
     40      AddConstraint(new SubOperatorTypeConstraint(0));
    4041    }
    4142
  • trunk/sources/HeuristicLab.Functions/Subtraction.cs

    r308 r434  
    4444      // 2 - 3 seems like an reasonable defaut (used for +,-,*,/) (discussion with swinkler and maffenze)
    4545      AddConstraint(new NumberOfSubOperatorsConstraint(2, 3));
     46      AddConstraint(new SubOperatorTypeConstraint(0));
     47      AddConstraint(new SubOperatorTypeConstraint(1));
     48      AddConstraint(new SubOperatorTypeConstraint(2));
    4649    }
    4750
  • trunk/sources/HeuristicLab.Functions/Tangens.cs

    r229 r434  
    3838      // must have exactly one suboperator
    3939      AddConstraint(new NumberOfSubOperatorsConstraint(1, 1));
     40      AddConstraint(new SubOperatorTypeConstraint(0));
    4041    }
    4142
  • trunk/sources/HeuristicLab.Functions/Xor.cs

    r229 r434  
    3838      : base() {
    3939      AddConstraint(new NumberOfSubOperatorsConstraint(2, 2));
     40      AddConstraint(new SubOperatorTypeConstraint(0));
     41      AddConstraint(new SubOperatorTypeConstraint(1));
    4042    }
    4143
Note: See TracChangeset for help on using the changeset viewer.