test_class.declarator: optimiser = new DecisionTreeOptimiser()
test_class.original_string: DecisionTreeOptimiser optimiser = new DecisionTreeOptimiser();
test_class.type: DecisionTreeOptimiser
test_class.var_name: optimiser
test_class.declarator: A = createField("A")
test_class.original_string: Field A = createField("A");
test_class.type: Field
test_class.var_name: A
test_class.declarator: B = createField("B")
test_class.original_string: Field B = createField("B");
test_class.type: Field
test_class.var_name: B
test_class.declarator: C = createField("C")
test_class.original_string: Field C = createField("C");
test_class.type: Field
test_class.var_name: C
test_class.declarator: D = createField("D")
test_class.original_string: Field D = createField("D");
test_class.type: Field
test_class.var_name: D
test_class.declarator: E = createField("E")
test_class.original_string: Field E = createField("E");
test_class.type: Field
test_class.var_name: E
test_class.declarator: F = createField("F")
test_class.original_string: Field F = createField("F");
test_class.type: Field
test_class.var_name: F
test_class.file: core/src/test/java/com/scottlogic/datahelix/generator/core/decisiontree/DecisionTreeOptimiserTest.java
test_class.identifier: DecisionTreeOptimiserTest
test_case.body: @Test
      public void optimise_oneCommonIf(){
          ConstraintNode original = constraintNode()
              .where(A).isInSet("a1", "a2")
              .where(B).isInSet("b1", "b2")
              .where(C).isInSet("c1", "c2")
              .where(D).isInSet("d1", "d2")
              .where(E).isInSet("e1", "e2")
              .withDecision(
                  constraintNode()
                      .where(A).isInSet("a1")
                      .withDecision(
                          constraintNode()
                              .where(B).isInSet("b1")
                              .where(D).isInSet("d1"),
                          constraintNode()
                              .where(B).isNotInSet("b1"))
                      .withDecision(
                          constraintNode()
                              .where(C).isInSet("c1")
                              .where(E).isInSet("e1"),
                          constraintNode()
                              .where(C).isNotInSet("c1")),
                  constraintNode()
                      .where(A).isNotInSet("a1"))
              .build();
  
          ConstraintNode actual = optimiser.optimiseTree(new DecisionTree(original, new ProfileFields(Collections.EMPTY_LIST)))
              .getRootNode();
  
          assertThat(actual, sameBeanAs(original));
      }
test_case.class_method_signature: DecisionTreeOptimiserTest.optimise_oneCommonIf()
test_case.full_signature: @Test public void optimise_oneCommonIf()
test_case.identifier: optimise_oneCommonIf
test_case.invocations: build withDecision isInSet where isInSet where isInSet where isInSet where isInSet where constraintNode withDecision withDecision isInSet where constraintNode isInSet where isInSet where constraintNode isNotInSet where constraintNode isInSet where isInSet where constraintNode isNotInSet where constraintNode isNotInSet where constraintNode getRootNode optimiseTree assertThat sameBeanAs
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void optimise_oneCommonIf()
focal_class.declarator: MAX_ITERATIONS = 50
focal_class.modifier: private static final
focal_class.original_string: private static final int MAX_ITERATIONS = 50;
focal_class.type: int
focal_class.var_name: MAX_ITERATIONS
focal_class.file: core/src/main/java/com/scottlogic/datahelix/generator/core/decisiontree/DecisionTreeOptimiser.java
focal_class.identifier: DecisionTreeOptimiser
focal_class.class_method_signature: DecisionTreeOptimiser.optimiseTree(DecisionTree tree)
focal_class.full_signature: public DecisionTree optimiseTree(DecisionTree tree)
focal_class.identifier: optimiseTree
focal_class.modifiers: public
focal_class.parameters: (DecisionTree tree)
focal_class.return: DecisionTree
focal_class.signature: DecisionTree optimiseTree(DecisionTree tree)
focal_class.class_method_signature: DecisionTreeOptimiser.optimiseLevelOfTree(ConstraintNode rootNode)
focal_class.full_signature: private ConstraintNode optimiseLevelOfTree(ConstraintNode rootNode)
focal_class.identifier: optimiseLevelOfTree
focal_class.modifiers: private
focal_class.parameters: (ConstraintNode rootNode)
focal_class.return: ConstraintNode
focal_class.signature: ConstraintNode optimiseLevelOfTree(ConstraintNode rootNode)
focal_class.class_method_signature: DecisionTreeOptimiser.noChangeInDecisionCount(ConstraintNode rootNode, ConstraintNode newRootNode)
focal_class.full_signature: private boolean noChangeInDecisionCount(ConstraintNode rootNode, ConstraintNode newRootNode)
focal_class.identifier: noChangeInDecisionCount
focal_class.modifiers: private
focal_class.parameters: (ConstraintNode rootNode, ConstraintNode newRootNode)
focal_class.return: boolean
focal_class.signature: boolean noChangeInDecisionCount(ConstraintNode rootNode, ConstraintNode newRootNode)
focal_class.class_method_signature: DecisionTreeOptimiser.optimiseDecisions(ConstraintNode rootNode)
focal_class.full_signature: private ConstraintNode optimiseDecisions(ConstraintNode rootNode)
focal_class.identifier: optimiseDecisions
focal_class.modifiers: private
focal_class.parameters: (ConstraintNode rootNode)
focal_class.return: ConstraintNode
focal_class.signature: ConstraintNode optimiseDecisions(ConstraintNode rootNode)
focal_class.class_method_signature: DecisionTreeOptimiser.constraintNodeContainsNegatedConstraints(ConstraintNode node, Set<AtomicConstraint> constraints)
focal_class.full_signature: private boolean constraintNodeContainsNegatedConstraints(ConstraintNode node, Set<AtomicConstraint> constraints)
focal_class.identifier: constraintNodeContainsNegatedConstraints
focal_class.modifiers: private
focal_class.parameters: (ConstraintNode node, Set<AtomicConstraint> constraints)
focal_class.return: boolean
focal_class.signature: boolean constraintNodeContainsNegatedConstraints(ConstraintNode node, Set<AtomicConstraint> constraints)
focal_class.class_method_signature: DecisionTreeOptimiser.addOptionsAsDecisionUnderConstraintNode(
          ConstraintNode newNode,
          Set<ConstraintNode> optionsToAdd)
focal_class.full_signature: private ConstraintNode addOptionsAsDecisionUnderConstraintNode(
          ConstraintNode newNode,
          Set<ConstraintNode> optionsToAdd)
focal_class.identifier: addOptionsAsDecisionUnderConstraintNode
focal_class.modifiers: private
focal_class.parameters: (
          ConstraintNode newNode,
          Set<ConstraintNode> optionsToAdd)
focal_class.return: ConstraintNode
focal_class.signature: ConstraintNode addOptionsAsDecisionUnderConstraintNode(
          ConstraintNode newNode,
          Set<ConstraintNode> optionsToAdd)
focal_class.class_method_signature: DecisionTreeOptimiser.getMostProlificAtomicConstraint(Collection<DecisionNode> decisions)
focal_class.full_signature: private AtomicConstraint getMostProlificAtomicConstraint(Collection<DecisionNode> decisions)
focal_class.identifier: getMostProlificAtomicConstraint
focal_class.modifiers: private
focal_class.parameters: (Collection<DecisionNode> decisions)
focal_class.return: AtomicConstraint
focal_class.signature: AtomicConstraint getMostProlificAtomicConstraint(Collection<DecisionNode> decisions)
focal_class.class_method_signature: DecisionTreeOptimiser.getConstraint(List<AtomicConstraint> identicalAtomicConstraints)
focal_class.full_signature: private AtomicConstraint getConstraint(List<AtomicConstraint> identicalAtomicConstraints)
focal_class.identifier: getConstraint
focal_class.modifiers: private
focal_class.parameters: (List<AtomicConstraint> identicalAtomicConstraints)
focal_class.return: AtomicConstraint
focal_class.signature: AtomicConstraint getConstraint(List<AtomicConstraint> identicalAtomicConstraints)
focal_class.class_method_signature: DecisionTreeOptimiser.decisionIsFactorisable(DecisionNode decision, AtomicConstraint factorisingConstraint, AtomicConstraint negatedFactorisingConstraint)
focal_class.full_signature: private boolean decisionIsFactorisable(DecisionNode decision, AtomicConstraint factorisingConstraint, AtomicConstraint negatedFactorisingConstraint)
focal_class.identifier: decisionIsFactorisable
focal_class.modifiers: private
focal_class.parameters: (DecisionNode decision, AtomicConstraint factorisingConstraint, AtomicConstraint negatedFactorisingConstraint)
focal_class.return: boolean
focal_class.signature: boolean decisionIsFactorisable(DecisionNode decision, AtomicConstraint factorisingConstraint, AtomicConstraint negatedFactorisingConstraint)
focal_class.class_method_signature: DecisionTreeOptimiser.atomicConstraintExists(ConstraintNode atomicConstraints, AtomicConstraint constraint)
focal_class.full_signature: private boolean atomicConstraintExists(ConstraintNode atomicConstraints, AtomicConstraint constraint)
focal_class.identifier: atomicConstraintExists
focal_class.modifiers: private
focal_class.parameters: (ConstraintNode atomicConstraints, AtomicConstraint constraint)
focal_class.return: boolean
focal_class.signature: boolean atomicConstraintExists(ConstraintNode atomicConstraints, AtomicConstraint constraint)
focal_method.body: public DecisionTree optimiseTree(DecisionTree tree){
          ConstraintNode newRootNode = optimiseLevelOfTree(tree.getRootNode());
          return new DecisionTree(newRootNode, tree.getFields());
      }
focal_method.class_method_signature: DecisionTreeOptimiser.optimiseTree(DecisionTree tree)
focal_method.full_signature: public DecisionTree optimiseTree(DecisionTree tree)
focal_method.identifier: optimiseTree
focal_method.invocations: optimiseLevelOfTree getRootNode getFields
focal_method.modifiers: public
focal_method.parameters: (DecisionTree tree)
focal_method.return: DecisionTree
focal_method.signature: DecisionTree optimiseTree(DecisionTree tree)