axiom-math
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-math] Re: [Axiom-developer] RE: PATCH: src/algebra/Makefile.pamph


From: Martin Rubey
Subject: [Axiom-math] Re: [Axiom-developer] RE: PATCH: src/algebra/Makefile.pamphlet
Date: Mon, 5 Jul 2004 14:33:19 +0000

I'm forwarding this to math because I think some of the issues belong there.

Dear Tim,

Hm, in fact, I thought that it was a little to earlz to release rinterp.spad to
the world, since I expect it to change. I also noticed that you included the
version which does *not* parallel pinterp.spad... in fact, I think that there
should be one package pinterp.spad which includes all sorts of interpolation
algorithms, and a common interface should be worked out, i.e., what kind of
arguments does it take, what's the type of the result and so on. I don't want
to have a bad setup which is difficult to change once its included in the
"official" release because somebody might be using it already.

Here are the questions involved:

1* RINTERP has the following interface:

PolynomialInterpolation(xx, F): Cat == Body   where
    xx: Symbol
    F:  Field
    UP  ==> UnivariatePolynomial
    SUP ==> SparseUnivariatePolynomial
 
    Cat ==> with
        interpolate: (UP(xx,F), List F, List F) -> UP(xx,F)
                ++ interpolate(u,lf,lg) \undocumented
        interpolate: (List F, List F)           -> SUP F
                ++ interpolate(lf,lg) \undocumented

What I do not understand is: although the constructor takes an argument xx,
this argument is *not* used by the exported functions. For example, you have to
say interpolate(x,[1,2,3],[1,4,9])$PINTERP(x,FRAC INT) to get a UP in x. In
fact, this function does nothing more than the second version, followed by an
elt. To be honest, I would remove it.

2* Furthermore, when the xdata contain duplicates, interpolate exits with
  catdef: division by zero, which is correct. However, since it seems
  impossible to catch an error programmatically, it might be sensible to return
  "failed" instead.

3* RationalInterpolation is a tiny bit more subtle, since it may happen that
  some points are "unattainable", i.e., not interpolated correctly, and it may
  even happen that the interpolating function is undefined at certain points
  (because the denominator vanishes).  It might be the case that it is more
  effective to test this during the interpolation and to return a list of these
  points, but I'm not sure about it (as above)

4* rationalinterpolation currently returns a FRAC POLY F, which is not good. I
  did this, because I was unable how to convert a SUP into a POLY at the time,
  and I needed a POLY. This should definitely be changed.

5* What's the proper modeline of Hermite-interpolation (giving derivatives on
  some points) ?

When we have discussed (or I have reached a conclusion regarding) at least
points 3 and 4 its OK for me to include rinterp (or an extension of pinterp,
what I would prefer) into the official release.

Martin

PS: Tim, why did you convert pmatrix into array in the pamphlet file?

root writes:
 > Grigory,
 > 
 > re: RINTERP. fixed. thanks. 
 > 
 > Martin,
 > 
 > Do you have a simple test case for RINTERP?
 > 
 > Tim





reply via email to

[Prev in Thread] Current Thread [Next in Thread]