Hi Leonard,
On Friday, 2006-11-10 18:32:23 +0200, Leonard Mada wrote:
> 1. I forget a "count++;" in the first for LOOP
> [inside the: if (!pMat1->IsString(i,j) && !pMat2->IsString(i,j)) {} body]
>
> 2. because this count would be from 1 to n, the 2nd for LOOP should be
> modified accordingly:
> for(j = 0; j < count; j++) { // NOT j <= count
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.
Eike
--
OOo/SO Calc core developer. Number formatter stricken i18n transpositionizer.
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't send personal mail to the [EMAIL PROTECTED] account, which I use
for
mailing lists only and don't read from outside Sun. Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]