Debian Codegraph @

src/dr/inference/mcmc/MCMCOptions.java

raw symbols SCIP
1 /*
2 * MCMCOptions.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.mcmc;
27
28 import dr.inference.markovchain.MarkovChain;
29
30 /**
31 * A class that brings together the auxillary information associated
32 * with an MCMC analysis.
33 *
34 * @author Alexei Drummond
35 * @author Andrew Rambaut
36 * @version $Id: MCMCOptions.java,v 1.7 2005/05/24 20:25:59 rambaut Exp $
37 */
38 public class MCMCOptions {
39
40 private final long chainLength;
41 private final long fullEvaluationCount;
42 private final int minOperatorCountForFullEvaluation;
43 private final double evaluationTestThreshold;
44 private final boolean useAdaptation;
45 private final long adaptationDelay;
46 private final double adaptationTarget;
47 private final double temperature;
48
49 /**
50 * constructor
51 * @param chainLength
52 */
53 public MCMCOptions(long chainLength) {
54 this(chainLength, 2000, 1, MarkovChain.EVALUATION_TEST_THRESHOLD, true, 0, 0.234, 1.0);
55 }
56
57 /**
58 * constructor
59 * @param chainLength
60 * @param fullEvaluationCount
61 * @param minOperatorCountForFullEvaluation
62 * @param evaluationTestThreshold
63 * @param useAdaptation
64 * @param adaptationDelay
65 * @param temperature
66 */
67 public MCMCOptions(long chainLength, long fullEvaluationCount, int minOperatorCountForFullEvaluation,
68 double evaluationTestThreshold, boolean useAdaptation, long adaptationDelay, double adaptationTarget,
69 double temperature) {
70 this.chainLength = chainLength;
71 this.fullEvaluationCount = fullEvaluationCount;
72 this.minOperatorCountForFullEvaluation = minOperatorCountForFullEvaluation;
73 this.evaluationTestThreshold = evaluationTestThreshold;
74 this.useAdaptation = useAdaptation;
75 this.adaptationDelay = adaptationDelay;
76 this.adaptationTarget = adaptationTarget;
77 this.temperature = temperature;
78 }
79
80 /**
81 * @return the chain length of the MCMC analysis
82 */
83 public final long getChainLength() {
84 return chainLength;
85 }
86
87 public final long getFullEvaluationCount() {
88 return fullEvaluationCount;
89 }
90
91 public double getEvaluationTestThreshold() {
92 return evaluationTestThreshold;
93 }
94
95 public final boolean useAdaptation() {
96 return useAdaptation;
97 }
98
99 public final long getAdaptationDelay() {
100 return adaptationDelay;
101 }
102
103 public final double getAdaptationTarget() {
104 return adaptationTarget;
105 }
106
107 public final double getTemperature() {
108 return temperature;
109 }
110
111 public int minOperatorCountForFullEvaluation() {
112 return minOperatorCountForFullEvaluation;
113 }
114 }