Hi all,

the current implementation of the class lcl_SplineCalculation does it in a way that it can be used with a wide range of use cases.

The interpolation line is currently calculated as parametric cubic spline with equidistant distance 1, but the calculation inside the class takes no advantage of it.

For example, it has expressions like
u[ i ] =
            ( ( p_ip1.second - p_i.second ) /
              ( p_ip1.first - p_i.first ) ) -
            ( ( p_i.second - p_im1.second ) /
              ( p_i.first - p_im1.first ) );

If it would use the actual equidistant distance 1,
then
 ( p_ip1.first - p_i.first ) equals 1
and
 ( p_i.first - p_im1.first ) equals 1
and the expression would reduce to
u[ i ] = ( p_ip1.second - p_i.second ) - ( p_i.second - p_im1.second ) ;

I guess, that this would not only be shorter in source but also faster.

The cubic spline interpolation is defined in chapter 20.24 of the
upcoming ODF1.2 standard [1]. And there the equidistant distance 1 is the only possible way.

Do you think, that we should reduce the implementation of the class lcl_SplineCalculation in a way, that it has the precondition of equidistant distance 1, and therefor calculations can be more simple?

Kind regards
Regina

[1] http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2-part1.odt
--
-----------------------------------------------------------------
To unsubscribe send email to [email protected]
For additional commands send email to [email protected]
with Subject: help

Reply via email to