Debian Codegraph @

src/dr/evomodel/substmodel/AbstractPCARateMatrix.java

raw symbols SCIP
1 /*
2 * AbstractPCARateMatrix.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.evomodel.substmodel;
27
28 import dr.evolution.datatype.DataType;
29
30 /**
31 * Abstract baseclass for PCA rate matrix
32 *
33 * @author Stefan Zoller
34 *
35 */
36 public abstract class AbstractPCARateMatrix {
37
38 /**
39 * constructor
40 *
41 * @param name Name of matrix
42 * @param dataType Data type as Codons.UNIVERSAL
43 * @param dir Directory which includes the rate matrix csv files
44 */
45 public AbstractPCARateMatrix(String name, DataType dataType, String dir) {
46 this.name = name;
47 this.dataType = dataType;
48 this.dataDir = dir;
49 }
50
51 public static final String getName() { return name; }
52 public final DataType getDataType() { return dataType; }
53
54 public double[] getPCAt(int i) { return pcs[i]; }
55 public double[] getFrequencies() { return frequencies; }
56 public double[] getMeans() { return means; }
57 public double[] getScales() { return scales; }
58 public double[] getStartFacs() { return startFacs; }
59
60 public void setFrequencies(double[] f) {
61 this.frequencies = f;
62 }
63
64 public void setMeans(double[] m) {
65 this.means = m;
66 }
67
68 public void setScales(double[] s) {
69 this.scales = s;
70 }
71
72 public void setPCs(double[][] p) {
73 this.pcs = p;
74 }
75
76 public void setStartFacs(double[] sf) {
77 this.startFacs = sf;
78 }
79
80 protected double[][] pcs;
81 protected double[] means;
82 protected double[] frequencies;
83 protected double[] scales;
84 protected double[] startFacs;
85
86 private static String name;
87 protected static String dataDir;
88 protected DataType dataType;
89 }