public double mergeDiscreteValue(
      RealParameter removed, RealParameter merge, ConditionalCategoricalDistribution distr) {
    int removedModel = (int) (double) removed.getValue();
    int mergeModel = (int) (double) merge.getValue();

    return distr.logConditionalDensity(mergeModel, removedModel);
  }
 public double proposeDiscreteValue(
     QuietRealParameter proposal,
     double oldValue,
     ConditionalCategoricalDistribution distr,
     double upper,
     double lower) {
   int oldModel = (int) oldValue;
   double newValue =
       Randomizer.randomChoicePDF(distr.conditionalDensities(oldModel)) + distr.getOffset();
   proposal.setValueQuietly(0, newValue);
   proposal.setBounds(lower, upper);
   return distr.logConditionalDensity(oldModel, (int) newValue);
 }