Debian Codegraph @

src/dr/app/beauti/options/GlobalModelOptions.java

raw symbols SCIP
1 /*
2 * SiteModelOptions.java
3 *
4 * Copyright (c) 2002-2015 Alexei Drummond, Andrew Rambaut and Marc Suchard
5 *
6 * This file is part of BEAST.
7 * See the NOTICE file distributed with this work for additional
8 * information regarding copyright ownership and licensing.
9 *
10 * BEAST is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU Lesser General Public License as
12 * published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
14 *
15 * BEAST is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with BEAST; if not, write to the
22 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
23 * Boston, MA 02110-1301 USA
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 * @author Andrew Rambaut
36 */
37 public class GlobalModelOptions extends ModelOptions {
38 private static final long serialVersionUID = -3347506415688390314L;
39
40 // Instance variables
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 // createOperator("treePriorMultivariate", "Multiple", "Adaptive Multivariate Normal", null,
56 // OperatorType.ADAPTIVE_MULTIVARIATE, 1.0, treeWeights);
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 // ops.add(getOperator("treePriorMultivariate"));
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 }