[BACK]Return to chebychev_polynomials.ads CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / PHC / Ada / Schubert

File: [local] / OpenXM_contrib / PHC / Ada / Schubert / chebychev_polynomials.ads (download)

Revision 1.1, Sun Oct 29 17:45:32 2000 UTC (23 years, 7 months ago) by maekawa
Branch point for: MAIN

Initial revision

with Standard_Floating_Numbers;          use Standard_Floating_Numbers;
with Standard_Floating_Vectors;          use Standard_Floating_Vectors;

package Chebychev_Polynomials is

-- DESCRIPTION :
--   This is a simple implementation to generate, differentiate and
--   evaluate Chebychev polynomials.  The polynomials are represented
--   as vectors of range 0..d, with d their degree.

  function Create ( k : natural ) return Vector;

  -- DESCRIPTION :
  --   Creates the kth Chebychev polynomial.

  function Eval ( k : natural; x : double_float ) return double_float;

  -- DESCRIPTION :
  --   Evaluates the kth Chebychev polynomial at x.

  -- REQUIRED : x lies in [-1,+1].

  function Eval ( p : Vector; x : double_float ) return double_float;

  -- DESCRIPTION :
  --   Evaluates the polynomial at x.

  function Diff ( p : Vector ) return Vector;

  -- DESCRIPTION :
  --   Returns the 1st derivative of p.

  function Diff ( p : Vector; k : natural ) return Vector;

  -- DESCRIPTION :
  --   Returns the kth derivative of the polynomial p.

  function Int ( p : Vector ) return Vector;

  -- DESCRIPTION :
  --   Returns the antiderivative of p.

  function Int ( p : Vector; k : natural ) return Vector;

  -- DESCRIPTION :
  --   Returns the kth antiderivative of p.

end Chebychev_Polynomials;