Debian Codegraph @

src/dr/evomodel/treedatalikelihood/RateRescalingScheme.java

raw symbols SCIP
1 package dr.evomodel.treedatalikelihood;
2
3 /**
4 * @author Marc A. Suchard
5 */
6 public enum RateRescalingScheme {
7
8 NONE("none"), // no scaling
9 TREE_LENGTH("length"), // rescale to one-unit per tree length (in time)
10 TREE_HEIGHT("height"); // rescale to one-unit per tree height (in time)
11
12 RateRescalingScheme(String text) {
13 this.text = text;
14 }
15
16 public String getText() {
17 return text;
18 }
19
20 private final String text;
21
22 public static RateRescalingScheme parseFromString(String text) {
23 for (RateRescalingScheme scheme : RateRescalingScheme.values()) {
24 if (scheme.getText().compareToIgnoreCase(text) == 0)
25 return scheme;
26 }
27 return NONE;
28 }
29
30 @Override
31 public String toString() {
32 return text;
33 }
34 }