periodic-polynomials-0.2.0.0: A library for working with periodic polynomials (very basic functionality)

Data.Periodic

Description

Maintainer : olexandr543@yahoo.com

A library for working with periodic polynomials (very basic functionality). Provides also simple tools to make a numerical function a periodic (or somewhat similar) one.

Synopsis

# The simplest finite periodic polynomials

polyG1 :: Floating a => (a -> a) -> (a -> a) -> Vector a -> a -> a Source #

The first function f :: a -> a is applied to the vector to produce weighted coefficients for the sum and the second one g :: a -> a is used as a basis function. For the periodic function g the resulting function is also periodic with the same period. Among possible variants there are finite trigonometric polynomials. See as examples trigPolySin and trigPolyCos functions.

trigPolyCos :: Floating a => (a -> a) -> Vector a -> a -> a Source #

A finite trigonometric polynomial of cosines. The Vector argument is used to produce its coefficients (weights) by applying to each of the element the function f:: a -> a given as the first argument.

trigPolySin :: Floating a => (a -> a) -> Vector a -> a -> a Source #

A finite trigonometric polynomial of sines. The Vector argument is used to produce its coefficients (weights) by applying to each of the element the function f:: a -> a given as the first argument.

trigPoly :: Floating a => (a -> a) -> Vector a -> (a -> a) -> Vector a -> a -> a Source #

Sum of the sine and cosine finite trigonometric polynomials. Can represent Fourier series (without the first coefficient), but no numerical high accuracy is guaranteed.

# Periodizer functions

periodizer :: RealFrac a => (a -> b) -> a -> a -> a -> b Source #

Makes a function f :: a -> b periodic with the period given by the third argument and the starting point given by the second argument.

concatPeriodizer :: (RealFrac a, Num b) => (a -> b) -> a -> a -> a -> b Source #

Modified periodizer that tries to concat the pieces of the function so that it can be (generally speaking) continuous. Needs more mathematical studies.

# Periodizer applications

polyG2 :: RealFrac a => (a -> a) -> (a -> a) -> a -> a -> Vector a -> a -> a Source #

Instead of simply use the second function in polyG1 it applies to it a periodizer with the given arguments.

polyG3 :: RealFrac a => (a -> a) -> (a -> a) -> a -> a -> Vector a -> a -> a Source #

Instead of simply use the second function in polyG1 it applies to it a concatPeriodizer with the given arguments.