#include <G4DNARevertProbability.hh>
Definition at line 43 of file G4DNARevertProbability.hh.
◆ G4DNARevertProbability() [1/2]
G4DNARevertProbability::G4DNARevertProbability |
( |
double | toleranceY | ) |
|
|
inline |
◆ G4DNARevertProbability() [2/2]
G4DNARevertProbability::G4DNARevertProbability |
( |
double | xmin, |
|
|
double | xmax, |
|
|
double | toleranceY ) |
|
inline |
◆ Propose()
bool G4DNARevertProbability::Propose |
( |
double | proposedXValue, |
|
|
double | proposedProba, |
|
|
double | nextProba, |
|
|
double & | returnedValue ) |
|
inline |
Definition at line 104 of file G4DNARevertProbability.hh.
108 {
109 bool returnFlag = false;
110
112 {
114 {
115 if(proposedXValue >
fXmin)
fXmin = proposedXValue;
116 }
118 {
119 if(proposedXValue <
fXmax)
fXmax = proposedXValue;
120 }
121
123 returnFlag = false;
124 }
126 {
128 {
129 if(proposedXValue <
fXmax)
130 {
131 fXmax = proposedXValue;
132 }
133 }
135 {
136 if(proposedXValue >
fXmin)
137 {
138 fXmin = proposedXValue;
139 }
140 }
141
143 returnFlag = false;
144 }
145 else
146 {
147
149 {
151 fXmax = proposedXValue;
152 }
154 {
155 fXmin = proposedXValue;
157 }
158 returnFlag = true;
159 }
160
161 return returnFlag;
162 }
Referenced by Revert().
◆ Reset()
void G4DNARevertProbability::Reset |
( |
| ) |
|
|
inline |
◆ Revert()
double G4DNARevertProbability::Revert |
( |
double | probaForSearchedTime, |
|
|
std::function< double(double)> & | funct ) |
|
inline |
Definition at line 168 of file G4DNARevertProbability.hh.
170 {
172 bool notFound = true;
173 double proposedX;
175
178
179 while(notFound)
180 {
181 double newProba = funct(x);
182
183 if(
Propose(x, newProba, probaForSearchedTime, proposedX))
184 {
185 notFound = false;
186 }
187 else
188 {
189 if(x == proposedX)
190 {
191 return x;
192
193
194
195
196 }
197 x = proposedX;
198 }
199 }
200 return x;
201 }
bool Propose(double proposedXValue, double proposedProba, double nextProba, double &returnedValue)
◆ SetBoundaries()
void G4DNARevertProbability::SetBoundaries |
( |
double | xmin, |
|
|
double | xmax ) |
|
inline |
◆ SetTolerance()
void G4DNARevertProbability::SetTolerance |
( |
double | toleranceY | ) |
|
|
inline |
◆ fIncreasingCumulativeFunction
double G4DNARevertProbability::fIncreasingCumulativeFunction |
◆ fToleranceProba
double G4DNARevertProbability::fToleranceProba |
◆ fXmax
double G4DNARevertProbability::fXmax |
◆ fXmaxDef
double G4DNARevertProbability::fXmaxDef |
◆ fXmin
double G4DNARevertProbability::fXmin |
◆ fXminDef
double G4DNARevertProbability::fXminDef |
The documentation for this class was generated from the following file: