Debian Codegraph @

src/dr/inference/trace/TraceList.java

raw symbols SCIP
1 /*
2 * TraceList.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.trace;
27
28 import java.util.List;
29
30 /**
31 * An interface and default class that stores a set of traces from a single chain
32 *
33 * @author Andrew Rambaut
34 * @author Alexei Drummond
35 * @version $Id: TraceList.java,v 1.2 2006/05/22 15:52:06 rambaut Exp $
36 */
37
38 public interface TraceList {
39
40 /**
41 * @return the name of this trace list
42 */
43 String getName();
44
45 /**
46 * @return the the full name of this trace list (possibly the path)
47 */
48 String getFullName();
49
50 /**
51 * @return the number of traces in this trace list
52 */
53 int getTraceCount();
54
55 /**
56 * @param name trace name
57 * @return the index of the trace with the given name
58 */
59 int getTraceIndex(String name);
60
61 /**
62 * @param index trace ordinal index
63 * @return the name of the trace with the given index
64 */
65 String getTraceName(int index);
66
67 /**
68 * @return the burn-in for this trace list (the number of actual states to discard)
69 */
70 long getBurnIn();
71
72 /**
73 * @return the number of states in the traces (without the burnin)
74 */
75 int getStateCount();
76
77 /**
78 * @return the number of states in the burnin
79 */
80 int getBurninStateCount();
81
82 /**
83 * @return the size of the step between states
84 */
85 long getStepSize();
86
87 /**
88 * @return the last state in the chain
89 */
90 long getMaxState();
91
92 boolean isIncomplete();
93
94 /**
95 * get the values of trace with the given index (without burnin)
96 * @param index the index of trace
97 * @param fromIndex low endpoint (inclusive) of the subList.
98 * @param toIndex high endpoint (exclusive) of the subList.
99 * @return The list of values (which are selected values if filter applied)
100 */
101 List<Double> getValues(int index, int fromIndex, int toIndex);
102
103 /**
104 * get the values of trace with the given index (without burnin)
105 * @param index the index of trace
106 * @return The list of values (which are selected values if filter applied)
107 */
108 List<Double> getValues(int index);
109
110 /**
111 * get the values of the burnin of the trace
112 * @param index the index of trace
113 * @return The list of values (which are selected values if filter applied)
114 */
115 List<Double> getBurninValues(int index);
116
117 /**
118 * @param traceIndex the index of the trace
119 * @return the trace distribution statistic object for the given index
120 */
121 @Deprecated
122 TraceDistribution getDistributionStatistics(int traceIndex);
123
124 /**
125 * @param traceIndex the index of the trace
126 * @return the trace correlation statistic object for the given index
127 */
128 TraceCorrelation getCorrelationStatistics(int traceIndex);
129
130 // create TraceCorrelation regarding Trace
131 void analyseTrace(int index);
132
133 Trace getTrace(int index);
134
135 // public interface D extends TraceList {
136 // Double[] getValues(int index, int length);
137 // Double[] getValues(int index, int length, int offset);
138 // Double[] getBurninValues(int index, int length);
139 // }
140 }