Ejemplo n.º 1
0
 @Override
 public double doOperation() throws OperatorFailedException {
   apspnet.beginNetworkEdit();
   double b = (1.0 - scalingFactor) * (1.0 - scalingFactor) / scalingFactor;
   double c = scalingFactor / (1.0 - scalingFactor);
   double y = MathUtils.nextDouble();
   double s = b * (y + c) * (y + c);
   int i = MathUtils.nextInt(apspnet.getNumberOfTetraTrees());
   apspnet.setOneHybPopValue(i, s * apspnet.getOneHybPopValue(i));
   apspnet.endNetworkEdit();
   return 0.0; // this way of scaling, with proposal proportional to x^-(1/2) has hastings ratio 1
 }