-- laphi.ads Lagrange Phi functions, orthogonal polynomials -- function prototype naming convention: -- phi basic Lagrange polynomial -- phip first derivative "p for prime" -- phipp second derivative, etc -- -- example phip(x, i, n, xg()) is -- ^__ nth degree -- ^__ ith polynomial in set -- ^___first derivative "prime" -- xg() is x grid values, not necessarily uniformly spaced. -- xg(0) is minimum, left boundary. -- xg(n) is maximum, right boundary. -- All grid coordinates must be in increasing order. with Real_Arrays; -- types real and real_vector and real_matrix use Real_Arrays; package laphi is -- phi function phi(x:real; j:integer; n:integer; xg:real_vector) return real; -- first derivative function phip(x:real; j:integer; n:integer; xg:real_vector) return real; -- second derivative function phipp(x:real; j:integer; n:integer; xg:real_vector) return real; -- third derivative function phippp(x:real; j:integer; n:integer; xg:real_vector) return real; -- fourth derivative function phipppp(x:real; j:integer; n:integer; xg:real_vector) return real; end Laphi;