1 // $Id: chainparam_interface.h,v 1.35 2011/03/07 06:08:53 bobgian Exp $
2 
3 /*
4  *  Copyright 2002  Peter Beerli, Mary Kuhner, Jon Yamato and Joseph Felsenstein
5  *
6  *  This software is distributed free of charge for non-commercial use
7  *  and is copyrighted.  Of course, we do not guarantee that the software
8  *  works, and are not responsible for any damage you may cause or have.
9  *
10  */
11 
12 #ifndef CHAINPARAM_INTERFACE_H
13 #define CHAINPARAM_INTERFACE_H
14 
15 #include <string>
16 #include "setget.h"
17 
18 class UIVars;
19 
20 class uiInitialChains : public SetGetLong
21 {
22   public:
23     uiInitialChains();
24     virtual ~uiInitialChains();
25     long Get(UIVars& vars, UIId id);
26     void Set(UIVars& vars, UIId id,long val);
27 };
28 
29 class uiInitialDiscard : public SetGetLong
30 {
31   public:
32     uiInitialDiscard();
33     virtual ~uiInitialDiscard();
34     long Get(UIVars& vars, UIId id);
35     void Set(UIVars& vars, UIId id,long val) ;
36 };
37 
38 class uiInitialSamples : public SetGetLong
39 {
40   public:
41     uiInitialSamples();
42     virtual ~uiInitialSamples();
43     long Get(UIVars& vars, UIId id);
44     void Set(UIVars& vars, UIId id,long val);
45 };
46 
47 class uiInitialInterval : public SetGetLong
48 {
49   public:
50     uiInitialInterval();
51     virtual ~uiInitialInterval();
52     long Get(UIVars& vars, UIId id);
53     void Set(UIVars& vars, UIId id,long val);
54 };
55 
56 class uiFinalChains : public SetGetLong
57 {
58   public:
59     uiFinalChains();
60     virtual ~uiFinalChains();
61     long Get(UIVars& vars, UIId id);
62     void Set(UIVars& vars, UIId id,long val);
63 };
64 
65 class uiFinalDiscard : public SetGetLong
66 {
67   public:
68     uiFinalDiscard();
69     virtual ~uiFinalDiscard();
70     long Get(UIVars& vars, UIId id);
71     void Set(UIVars& vars, UIId id,long val) ;
72 };
73 
74 class uiFinalSamples : public SetGetLong
75 {
76   public:
77     uiFinalSamples();
78     virtual ~uiFinalSamples();
79     long Get(UIVars& vars, UIId id);
80     void Set(UIVars& vars, UIId id,long val);
81 };
82 
83 class uiFinalInterval : public SetGetLong
84 {
85   public:
86     uiFinalInterval();
87     virtual ~uiFinalInterval();
88     long Get(UIVars& vars, UIId id);
89     void Set(UIVars& vars, UIId id,long val);
90 };
91 
92 class uiHeatedChain: public SetGetDouble
93 {
94   public:
95     uiHeatedChain();
96     virtual ~uiHeatedChain();
97     double Get(UIVars& vars, UIId id);
98     void Set(UIVars& vars, UIId id, double val);
99 };
100 
101 class uiHeatedChains : public GetDoubleVec1d
102 {
103   public:
104     uiHeatedChains();
105     virtual ~uiHeatedChains();
106     DoubleVec1d Get(UIVars& vars, UIId id);
107 };
108 
109 class uiHeatedChainCount : public SetGetLong
110 {
111   public:
112     uiHeatedChainCount();
113     virtual ~uiHeatedChainCount();
114     long Get(UIVars& vars, UIId id);
115     void Set(UIVars& vars, UIId id, long val);
116 };
117 
118 class uiTempInterval : public SetGetLong
119 {
120   public:
121     uiTempInterval();
122     virtual ~uiTempInterval();
123     long Get(UIVars& vars, UIId id);
124     void Set(UIVars& vars, UIId id,long val) ;
125 };
126 
127 class uiAdaptiveTemp : public SetGetBool
128 {
129   public:
130     uiAdaptiveTemp();
131     virtual ~uiAdaptiveTemp();
132     bool Get(UIVars& vars, UIId id);
133     void Set(UIVars& vars, UIId id, bool val);
134 };
135 
136 class uiNumReps : public SetGetLong
137 {
138   public:
139     uiNumReps();
140     virtual ~uiNumReps();
141     long Get(UIVars& vars, UIId id);
142     void Set(UIVars& vars, UIId id,long val) ;
143 };
144 
145 class uiDropArranger : public SetGetDouble
146 {
147   public:
148     uiDropArranger();
149     virtual ~uiDropArranger();
150     double Get(UIVars& vars, UIId id);
151     void Set(UIVars& vars, UIId id,double val);
152 };
153 
154 class uiSizeArranger : public SetGetDouble
155 {
156   public:
157     uiSizeArranger();
158     virtual ~uiSizeArranger();
159     double Get(UIVars& vars, UIId id);
160     void Set(UIVars& vars, UIId id,double val);
161 };
162 
163 class uiBayesArranger : public SetGetDouble
164 {
165   public:
166     uiBayesArranger();
167     virtual ~uiBayesArranger();
168     double Get(UIVars& vars, UIId id);
169     void Set(UIVars& vars, UIId id, double val);
170 };
171 
172 class uiLocusArranger : public SetGetDouble
173 {
174   public:
175     uiLocusArranger();
176     virtual ~uiLocusArranger();
177     double Get(UIVars& vars, UIId id);
178     void Set(UIVars& vars, UIId id, double val);
179 };
180 
181 class uiHapArranger : public SetGetDouble
182 {
183   public:
184     uiHapArranger();
185     virtual ~uiHapArranger();
186     double Get(UIVars& vars, UIId id);
187     void Set(UIVars& vars, UIId id,double val);
188 };
189 
190 class uiProbHapArranger : public SetGetDouble
191 {
192   public:
193     uiProbHapArranger();
194     virtual ~uiProbHapArranger();
195     double Get(UIVars& vars, UIId id);
196     void Set(UIVars& vars, UIId id,double val);
197 };
198 
199 class uiZilchArranger : public SetGetDouble
200 {
201   public:
202     uiZilchArranger();
203     virtual ~uiZilchArranger();
204     double Get(UIVars& vars, UIId id);
205     void Set(UIVars& vars, UIId id,double val);
206 };
207 
208 class uiStairArranger : public SetGetDouble
209 {
210   public:
211     uiStairArranger();
212     virtual ~uiStairArranger();
213     double Get(UIVars& vars, UIId id);
214     void Set(UIVars& vars, UIId id,double val);
215 };
216 
217 class uiEpochSizeArranger : public SetGetDouble
218 {
219   public:
220     uiEpochSizeArranger();
221     virtual ~uiEpochSizeArranger();
222     double Get(UIVars& vars, UIId id);
223     void Set(UIVars& vars, UIId id,double val);
224 };
225 
226 class uiCanHapArrange : public GetBool
227 {
228   public:
229     uiCanHapArrange();
230     virtual ~uiCanHapArrange();
231     bool Get(UIVars& vars, UIId id);
232 };
233 
234 //------------------------------------------------------------------------------------
235 // Refinement of SetGetBool which prints "bayesian" for
236 // a true value and "likelihood" for a false one
237 class SetGetBoolBayesLike : public SetGetBool
238 {
239   public:
SetGetBoolBayesLike(const std::string & key)240     SetGetBoolBayesLike(const std::string & key) : SetGetBool(key) {};
~SetGetBoolBayesLike()241     virtual ~SetGetBoolBayesLike() {};
MakePrintString(UIVars & vars,bool val)242     virtual std::string MakePrintString(UIVars& vars, bool val)
243     {
244         if(val) return "bayesian";
245         return "likelihood";
246     };
247 };
248 
249 class uiBayesianAnalysis : public SetGetBoolBayesLike
250 {
251   public:
252     uiBayesianAnalysis();
253     virtual ~uiBayesianAnalysis();
254     bool Get(UIVars& vars, UIId id);
255     void Set(UIVars& vars, UIId id, bool val);
256 };
257 
258 #endif  // CHAINPARAM_INTERFACE_H
259 
260 //____________________________________________________________________________________
261