Hi Regina,
Regina Henschel schrieb:
Hi Daniel, hi Kohei,
I've learned now, that I can get erfc(z) by GetUpRegIGamma(0.5,z^2), so
I need no copy&paste. GetUpRegIGamma is a private function of
ScInterpreter, in file interpr6.cxx. But now I have the next problem:
The structure now is:
We have a public function
void ScInterpreter::ScBetaDist()
Inside this, and in some other functions too, there is a call to the
private function
double ScInterpreter::GetBetaDist
This function is so complex, that I thought, it would be a good idea to
swap out some steps into local functions. For example, I have defined a
function
lcl_GetBetaHelperContFrac
which calculates a continued fraction needed for GetBetaDist. Thats
works good, because it uses only 'normal' functions.
But the next part, which I want to modularize, is the algoritm known as
BASYM (Didonato/Morris algoritm 708). It is a part of about 90 lines.
Unfortunately it needs the private functions
double ScInterpreter::GetUpRegIGamma( double fA, double fX )
and
double ScInterpreter::GetLogBeta(double fAlpha, double fBeta)
How to solve this? I know, if I would make it a private function of
ScInterpreter too, I can access GetUpRegIGamma and GetLogBeta. But is
that the structure you want? Are there other, better ways to get access
to that functions?
Are ScInterpreter::GetUpRegIGamma() and ScInterpreter::GetLogBeta()
static (A), can they be static (B), or do they actually use members or
other non-static functions of ScInterpreter (C)?
(A) remove them from ScInterpreter and make them local functions.
(B) same as (A)
(C) it does not help, BASYM has to be a private member of ScInterpreter.
Daniel
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]