public final double doOperation() throws OperatorFailedException {
  final double scale=(scaleFactor + (MathUtils.nextDouble() * ((1.0 / scaleFactor) - scaleFactor)));
  List<NodeRef> listNode=new ArrayList<NodeRef>();
  double logq=0;
  if (scaleAll) {
  }
 else {
    int r=MathUtils.nextInt(tree.getInternalNodeCount());
    NodeRef node=tree.getNode(r);
    double oldValue, newValue;
    oldValue=tree.getNodeHeight(node);
    newValue=oldValue * scale;
    tree.setNodeHeight(node,newValue);
    logq=getJacobian(node);
  }
  logq=(listNode.size() - 2) * Math.log(scale);
  return logq;
}

public final double doOperation ( ) throws OperatorFailedException { final double scale = ( scaleFactor + ( MathUtils . nextDouble ( ) * ( ( 1.0 / scaleFactor ) - scaleFactor ) ) ) ; List < NodeRef > listNode = new ArrayList < NodeRef > ( ) ; double logq = 0 ; if ( scaleAll ) { } else { int r = MathUtils . nextInt ( tree . getInternalNodeCount ( ) ) ; NodeRef node = tree . getNode ( r ) ; double oldValue , newValue ; oldValue = tree . getNodeHeight ( node ) ; newValue = oldValue * scale ; tree . setNodeHeight ( node , newValue ) ; logq = getJacobian ( node ) ; } logq = ( listNode . size ( ) - 2 ) * Math . log ( scale ) ; return logq ; }
scale the rates of a subtree and return the hastings ratio .
