code: public Node mutate(Random rng, Probability mutationProbability, TreeFactory treeFactory)
      {
          if (mutationProbability.nextEvent(rng))
          {
              return treeFactory.generateRandomCandidate(rng);
          }
          else
          {
              Node newCondition = condition.mutate(rng, mutationProbability, treeFactory);
              Node newThen = then.mutate(rng, mutationProbability, treeFactory);
              Node newOtherwise = otherwise.mutate(rng, mutationProbability, treeFactory);
              if (newCondition != condition || newThen != then || newOtherwise != otherwise)
              {
                  return new IfThenElse(newCondition, newThen, newOtherwise);
              }
              else
              {
                  // Tree has not changed.
                  return this;
              }
          }
  
      }
docs: {@inheritDoc}