| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
package dr.app.beauti.options; |
| 27 |
|
| 28 |
import dr.app.beauti.types.OperatorSetType; |
| 29 |
import dr.app.beauti.types.OperatorType; |
| 30 |
|
| 31 |
import java.util.ArrayList; |
| 32 |
import java.util.List; |
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
public class GlobalModelOptions extends ModelOptions { |
| 38 |
private static final long serialVersionUID = -3347506415688390314L; |
| 39 |
|
| 40 |
|
| 41 |
private final BeautiOptions options; |
| 42 |
|
| 43 |
|
| 44 |
public GlobalModelOptions(BeautiOptions options) { |
| 45 |
this.options = options; |
| 46 |
|
| 47 |
initModelParametersAndOpererators(); |
| 48 |
} |
| 49 |
|
| 50 |
|
| 51 |
@Override |
| 52 |
public void initModelParametersAndOpererators() { |
| 53 |
createOperator("dataLikelihoodMultivariate", "Multiple", "Adaptive Multivariate Normal", null, |
| 54 |
OperatorType.ADAPTIVE_MULTIVARIATE, 1.0, treeWeights); |
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
} |
| 59 |
|
| 60 |
@Override |
| 61 |
public List<Parameter> selectParameters(List<Parameter> params) { |
| 62 |
return params; |
| 63 |
} |
| 64 |
|
| 65 |
@Override |
| 66 |
public List<Operator> selectOperators(List<Operator> operators) { |
| 67 |
List<Operator> ops = new ArrayList<Operator>(); |
| 68 |
|
| 69 |
ops.add(getOperator("dataLikelihoodMultivariate")); |
| 70 |
|
| 71 |
|
| 72 |
if (options.operatorSetType != OperatorSetType.CUSTOM) { |
| 73 |
for (Operator op : ops) { |
| 74 |
op.setUsed(options.operatorSetType == OperatorSetType.ADAPTIVE_MULTIVARIATE); |
| 75 |
} |
| 76 |
} |
| 77 |
|
| 78 |
operators.addAll(ops); |
| 79 |
|
| 80 |
return operators; |
| 81 |
} |
| 82 |
|
| 83 |
@Override |
| 84 |
public String getPrefix() { |
| 85 |
return null; |
| 86 |
} |
| 87 |
|
| 88 |
} |