Hi Eike,

I wish to mention the following 3 issues:
1. compiling and testing the new algorithm
2. "void ScInterpreter::ScCorrel()" AND "void ScInterpreter::ScPearson()" seem to be identical -- I have found NO difference in the documentation for CORREL() and PEARSON(), but I may have overlooked something -- IF they are truly identical, than calling within ::ScPearson() the ScCorrel() function would be OK
  -- NO need to maintain 2 times an identical code
3. other functions seem/are broken, like "void ScInterpreter::ScCovar()" AND "void ScInterpreter::ScRSQ()",...
  -- would need to be fixed, too

I wish to discuss only shortly issue 1:

Eike Rathke wrote:
...
Noticed.

3. the x and y values (fValX[count] and fValY[count]) must be stored, so we have to define (variable) arrays. I do not know which method is best suited/ will affect speed less. I usually prefer vectors when dealing with such a situation, but might be too much for this one, especially if we do NOT do any sorting. Size is unfortunately not known beforehand.

A maximum size is known: there can't be more than nC1*nR1 elements, so
pre-allocating new double[nC1*nR1] is fine.

Ok, then everything is fine. Can somebody compile this? I do not really know how to (or have the utilities to) compile it. Before integrating this into an official OOo, I believe it should be extensively tested.

Is it possible to compile only a dll so that I have only to replace one file in my official OOo. (I have NO idea if this file gets compiled as a separate dll, but that would be really helpful.)

Although this algorithm is more accurate than the original naive algorithm, it necessitates 2 passes, so it is undoubtedly more slow. The Wikipedia describes a one pass robust algorithm. While that would execute slightly more rapid, it is (probably) less accurate. Also, even this algorithm may fail in special situations (therefore the need for the test condition in the code). Unlike the STD DEV, I have really no solid mathematical background how robust every implementation is.

Kind regards,

Leonard Mada

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to