33 #ifndef SOURCE_PROCESSES_ELECTROMAGNETIC_DNA_UTILS_INCLUDE_G4DNAREVERTPROBABILITY_HH_
34 #define SOURCE_PROCESSES_ELECTROMAGNETIC_DNA_UTILS_INCLUDE_G4DNAREVERTPROBABILITY_HH_
105 double proposedProba,
107 double& returnedValue)
109 bool returnFlag =
false;
115 if(proposedXValue >
fXmin)
fXmin = proposedXValue;
119 if(proposedXValue <
fXmax)
fXmax = proposedXValue;
129 if(proposedXValue <
fXmax)
131 fXmax = proposedXValue;
136 if(proposedXValue >
fXmin)
138 fXmin = proposedXValue;
151 fXmax = proposedXValue;
155 fXmin = proposedXValue;
168 double Revert(
double probaForSearchedTime,
172 bool notFound =
true;
181 double newProba = funct(x);
183 if(
Propose(x, newProba, probaForSearchedTime, proposedX))
G4double(* function)(G4double)
G4DNARevertProbability(double toleranceY)
double fIncreasingCumulativeFunction
void SetBoundaries(double xmin, double xmax)
G4DNARevertProbability(double xmin, double xmax, double toleranceY)
double Revert(double probaForSearchedTime, std::function< double(double)> &funct)
bool Propose(double proposedXValue, double proposedProba, double nextProba, double &returnedValue)
void SetTolerance(double toleranceY)