Debian Codegraph @

src/dr/app/beauti/components/hpm/HierarchicalPhylogeneticModel.java

raw symbols SCIP
1 /*
2 * HierarchicalPhylogeneticModel.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.components.hpm;
27
28 import dr.app.beauti.options.Parameter;
29 import dr.app.beauti.types.PriorType;
30
31 import java.util.List;
32
33 /**
34 * @author Marc A. Suchard
35 */
36 public class HierarchicalPhylogeneticModel {
37
38 final private String name;
39 final private List<Parameter> argumentParameterList;
40 final private List<Parameter> conditionalParameterList;
41 final private PriorType priorType;
42
43 public static final String TIP_TOOL = "<html>Select two or more parameters. " +
44 "HPMs are described in<br>Suchard et al. (2003) Syst Biol 52, 649 - 664 " +
45 "and <br>Edo-Matas et al. (2011) Mol Biol Evol 28, 1605 - 1616.</html>";
46
47 public HierarchicalPhylogeneticModel(String name, List<Parameter> argumentParameterList,
48 List<Parameter> conditionalParameterList, PriorType priorType) {
49 this.name = name;
50 this.argumentParameterList = argumentParameterList;
51 this.conditionalParameterList = conditionalParameterList;
52 this.priorType = priorType;
53 }
54
55 public List<Parameter> getArgumentParameterList() {
56 return argumentParameterList;
57 }
58
59 public List<Parameter> getConditionalParameterList() {
60 return conditionalParameterList;
61 }
62
63 public String getName() {
64 return name;
65 }
66
67 public PriorType getPriorType() {
68 return priorType;
69 }
70
71 public boolean isEmpty() {
72 return getArgumentParameterList().size() == 0;
73 }
74
75 // public void selectOperators(ModelOptions modelOptions, final List<Operator> ops) {
76 // // Do nothing because Gibbs operator format do not fit into the current Operator implementation
77 // }
78 //
79 // public void removeParameter(Parameter parameter) {
80 // if (argumentParameterList.contains(parameter)) {
81 // argumentParameterList.remove(parameter);
82 // }
83 // }
84 //
85 // public void generateDistribution(final XMLWriter writer) {
86 // System.err.println("Generating distribution for " + getName());
87 // }
88 //
89 // public void generatePriors(final XMLWriter writer) {
90 // System.err.println("Generating priors for " + getName());
91 // }
92 }