[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: Review Request: KSpread: Define +,-,*,/,% and ^ on arrays
From:       "Marijn Kruisselbrink" <m.kruisselbrink () student ! tue ! nl>
Date:       2010-06-03 9:38:54
Message-ID: 20100603093854.30919.13143 () localhost
[Download RAW message or body]


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/3994/#review5968
-----------------------------------------------------------

Ship it!


Looks good to me, but maybe add a couple more unit tests to actually test all the new \
functionality, not only the sumproduct function. So if you add unit tests for all (or \
at least a significant part) the various array/scalar options that are now possible \
you can commit it.

- Marijn


On 2010-05-16 17:41:41, Johannes Simon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/3994/
> -----------------------------------------------------------
> 
> (Updated 2010-05-16 17:41:41)
> 
> 
> Review request for KOffice.
> 
> 
> Summary
> -------
> 
> Allows arrays to be mapped using one of the listed operators. For example, 2*A1:C1 \
> with A1:C1=[1,2,3] is now evaluated to [2,3,6] instead of simply 2. This makes it \
> possible, for example, to first exponentiate an array element-wise, and then \
> summing up the result, e.g. with "=SUM(A1:C1^2)" 
> Though this is most intuitive and needed, it seems OpenOffice distinguishes between \
> functions that take a "list of numbers" and functions that can consume an array. In \
> OOo COUNT() (which consumes a list of numbers, not an array) therefore returns 1 \
> for COUNT(A1:C1^2), COUNT(A1:C1) however returns 3. I'm not sure whether this is a \
> bug or a missing feature in OO Calc, or if it's done on purpose, but I in no way \
> understand it. Hands up if somebody can defend OO Calc there. 
> The functionality to map arrays element-wise is needed for functions that do \
> consume arrays, like SUMPRODUCT(). Here OO Calc works as expected and does not crop \
> the rest of the array if some operation is applied to it beforehand, like "^2" \
> above. 
> Bottom line is, the functionality provided by this patch is needed, but I'm not \
> entirely sure if the issue above is a problem for us, or if it's a bug in OOo. 
> 
> Diffs
> -----
> 
> trunk/koffice/kspread/ValueCalc.cpp 1124538 
> trunk/koffice/kspread/ValueCalc.h 1124538 
> trunk/koffice/kspread/tests/TestStatisticalFunctions.h 1124538 
> trunk/koffice/kspread/tests/TestStatisticalFunctions.cpp 1124538 
> 
> Diff: http://reviewboard.kde.org/r/3994/diff
> 
> 
> Testing
> -------
> 
> No regressions in unit tests. New test case added.
> 
> 
> Thanks,
> 
> Johannes
> 
> 

_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic