Debian Codegraph @

src/dr/inference/markovjumps/MarkovJumpsType.java

raw symbols SCIP
1 /*
2 * MarkovJumpsType.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.inference.markovjumps;
27
28 /**
29 * @author Marc Suchard
30 * @author Vladimir Minin
31 * <p/>
32 * A base class for implementing Markov chain-induced counting processes (markovjumps) in BEAST using BEAGLE
33 * This work is supported by NSF grant 0856099
34 * <p/>
35 * Minin VN and Suchard MA (2008) Counting labeled transitions in continous-time Markov models of evolution.
36 * Journal of Mathematical Biology, 56, 391-412.
37 */
38
39 public enum MarkovJumpsType {
40
41 HISTORY("history"),
42 COUNTS("counts"),
43 REWARDS("rewards");
44
45 MarkovJumpsType(String text) {
46 this.text = text;
47 }
48
49 public String getText() {
50 return text;
51 }
52
53 private final String text;
54
55 public static MarkovJumpsType parseFromString(String text) {
56 for (MarkovJumpsType scheme : MarkovJumpsType.values()) {
57 if (scheme.getText().compareToIgnoreCase(text) == 0)
58 return scheme;
59 }
60 return null;
61 }
62 }