[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pdf-devel] pdf_function.c
From: |
Hardy Falk |
Subject: |
Re: [pdf-devel] pdf_function.c |
Date: |
Mon, 17 Sep 2007 23:32:27 +0200 |
User-agent: |
KMail/1.9.5 |
Am Montag, 17. September 2007 22:51 schrieb address@hidden:
> Do a general formula to solve m-dimensional cubic splines
> exist? Something like that (the link talks about multi-linear
> interpolation):
> http://kanushu.uwaterloo.ca/~tveldhui/papers/MAScThesis/node3
>2.html
Ah. "Interpolating a single value involves 2^D function
values - one function value for each node in the enclosing
element."
This explains the warnings in the spec:
"The dimensionality of a sampled function is restricted only by
implementation limits. However, the number of samples required
to represent functions with high dimensionality multiplies
rapidly unless the sampling resolution is very low. Also,
the process of multilinear interpolation becomes computationally
intensive if the number of inputs m is greater than 2.
The multidimensional spline interpolation is even more
computationally intensive"
Multilinear interpolation is done by successive reductions of
the dimension.
The first step requires 2^(D-1) linear interpolation operations.
The last step leaves just a single value.
Linear interpolation may be replaced by spline interpolation.
This is much more expensive computationally. but the code
structure is not affected at all.
> If that helps, there is an implementation of multidimensional
> cubic splines in Octave 2.9.3 (written in octave). I dont
> know the approach used to implement it.
I'll consider this if the above doesn't work.
> I have finished an implementation of type 2 functions.
> Many thanks!
Shall I send a patch for review?
> BTW: are you using the `pdf_stm_peek' function?
Not yet :-) pdf_create_func_2() uses only a dictionary.
I intend to store the sample table as byte array, reading it
from a stream is *very* simple.
Mfg.