polynomials-bernstein-1.1.2: A solver for systems of polynomial equations in bernstein form

Safe HaskellNone
LanguageHaskell98

Algebra.Polynomials.Bernstein

Description

Various functions for manipulating polynomials, essentially when represented in the Bernstein basis, in one or two variables.

Synopsis

Documentation

data Bernsteinp a b Source

The type for Bernstein polynomials with an arbitrary number of variables

Constructors

Bernsteinp 

Fields

bounds :: a
 
coefs :: Vector b
 

Instances

solve :: (Show a, Show i, Eq a, Box a i) => Double -> Vector (Bernsteinp i Interval) -> a -> [a] Source

Computes the intersection of a given Bezier hypersurface, given by its graph, with plane z=0.

class Bernstein a where Source

Minimal complete definition

(?), constant, promote, elevate, eval, restriction

Methods

(?) :: Unbox b => Bernsteinp a b -> a -> b Source

constant :: (Unbox b, Num b, Fractional b) => b -> Bernsteinp a b Source

scale :: (Num b, Fractional b, Unbox b) => b -> Bernsteinp a b -> Bernsteinp a b Source

promote :: (Unbox b, Num b, Fractional b) => Int -> Bernsteinp Int b -> Bernsteinp a b Source

elevate :: (Unbox b, Num b, Fractional b) => a -> Bernsteinp a b -> Bernsteinp a b Source

eval :: (Unbox b, Num b, Fractional b) => Bernsteinp a b -> Param a b -> b Source

restriction :: (Unbox b, Fractional b, Num b) => Bernsteinp a b -> Param a b -> Param a b -> Bernsteinp a b Source

derivate :: (Unbox a, Num a) => Bernsteinp Int a -> Bernsteinp Int a Source

Computes the derivative of a univariate Bernstein polynomial.

reorient :: Unbox a => Bernsteinp Int a -> Bernsteinp Int a Source

Computes f(1-x) (useful when used with Bezier curves).