-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | A solver for systems of polynomial equations in bernstein form
--   
--   This library defines an optimized type for representing polynomials in
--   Bernstein form, as well as instances of numeric classes and other
--   manipulation functions, and a solver of systems of polynomial
--   equations in this form.
@package polynomials-bernstein
@version 1.1.2


-- | This module contains the definition of the main arithmetic tools used
--   in Metafont'.
module Algebra.Polynomials.Numerical

-- | Converts an <a>Integral</a> value into an interval.
fromIntegral# :: Integral x => x -> (# Double, Double #)

-- | Interval addition
plus :: Double -> Double -> Double -> Double -> (# Double, Double #)

-- | Interval substraction
minus :: Double -> Double -> Double -> Double -> (# Double, Double #)

-- | Interval division
over :: Double -> Double -> Double -> Double -> (# Double, Double #)

-- | Interval multiplication
times :: Double -> Double -> Double -> Double -> (# Double, Double #)
sqrt# :: Double -> Double -> (# Double, Double #)

-- | Interval cosine
cos# :: Double -> Double -> (# Double, Double #)

-- | Interval sine
sin# :: Double -> Double -> (# Double, Double #)
acos# :: Double -> Double -> (# Double, Double #)
asin# :: Double -> Double -> (# Double, Double #)

-- | The interval type (most of its operations are calls to the raw
--   functions)
data Interval
Interval :: Double -> Double -> Interval
[ilow] :: Interval -> Double
[iup] :: Interval -> Double

-- | Two common operations on types defined with intervals.
class Intervalize a
intervalize :: Intervalize a => a Double -> a Interval
intersects :: Intervalize a => a Interval -> a Interval -> Bool

-- | Converts an optimal IEEE-754 representation of a number into an
--   optimal interval containing this number.
interval :: Double -> Interval

-- | Intersection of two <a>Interval</a>s.
intersectsd :: Interval -> Interval -> Bool

-- | Union of two intersecting intervals (undefined behaviour if they do
--   not intersect).
union :: Interval -> Interval -> Interval
fpred :: Double -> Double
fsucc :: Double -> Double
instance GHC.Show.Show Algebra.Polynomials.Numerical.Interval
instance GHC.Classes.Eq Algebra.Polynomials.Numerical.Interval
instance GHC.Float.Floating Algebra.Polynomials.Numerical.Interval
instance GHC.Num.Num Algebra.Polynomials.Numerical.Interval
instance GHC.Real.Fractional Algebra.Polynomials.Numerical.Interval
instance Data.Vector.Unboxed.Base.Unbox Algebra.Polynomials.Numerical.Interval
instance Data.Vector.Generic.Mutable.Base.MVector Data.Vector.Unboxed.Base.MVector Algebra.Polynomials.Numerical.Interval
instance Data.Vector.Generic.Base.Vector Data.Vector.Unboxed.Base.Vector Algebra.Polynomials.Numerical.Interval


-- | Various functions for manipulating polynomials, essentially when
--   represented in the Bernstein basis, in one or two variables.
module Algebra.Polynomials.Bernstein

-- | The type for Bernstein polynomials with an arbitrary number of
--   variables
data Bernsteinp a b
Bernsteinp :: a -> Vector b -> Bernsteinp a b
[bounds] :: Bernsteinp a b -> a
[coefs] :: Bernsteinp a b -> Vector b

-- | Computes the intersection of a given Bezier hypersurface, given by its
--   graph, with plane <tt>z=0</tt>.
solve :: (Show a, Show i, Eq a, Box a i) => Double -> Vector (Bernsteinp i Interval) -> a -> [a]
class Bernstein a where scale a (Bernsteinp i b) = Bernsteinp i $ map (* a) b
(?) :: (Bernstein a, Unbox b) => Bernsteinp a b -> a -> b
constant :: (Bernstein a, Unbox b, Num b, Fractional b) => b -> Bernsteinp a b
scale :: (Bernstein a, Num b, Fractional b, Unbox b) => b -> Bernsteinp a b -> Bernsteinp a b
promote :: (Bernstein a, Unbox b, Num b, Fractional b) => Int -> Bernsteinp Int b -> Bernsteinp a b
elevate :: (Bernstein a, Unbox b, Num b, Fractional b) => a -> Bernsteinp a b -> Bernsteinp a b
eval :: (Bernstein a, Unbox b, Num b, Fractional b) => Bernsteinp a b -> Param a b -> b
restriction :: (Bernstein a, Unbox b, Fractional b, Num b) => Bernsteinp a b -> Param a b -> Param a b -> Bernsteinp a b

-- | Computes the derivative of a univariate Bernstein polynomial.
derivate :: (Unbox a, Num a) => Bernsteinp Int a -> Bernsteinp Int a

-- | Computes <tt>f(1-x)</tt> (useful when used with Bezier curves).
reorient :: (Unbox a) => Bernsteinp Int a -> Bernsteinp Int a
instance (Data.Vector.Unboxed.Base.Unbox b, GHC.Show.Show b, GHC.Show.Show a) => GHC.Show.Show (Algebra.Polynomials.Bernstein.Bernsteinp a b)
instance (GHC.Classes.Eq b, GHC.Classes.Eq a, Data.Vector.Unboxed.Base.Unbox b) => GHC.Classes.Eq (Algebra.Polynomials.Bernstein.Bernsteinp a b)
instance GHC.Num.Num (Algebra.Polynomials.Bernstein.Bernsteinp a Algebra.Polynomials.Numerical.Interval) => Algebra.Polynomials.Numerical.Intervalize (Algebra.Polynomials.Bernstein.Bernsteinp a)
instance Algebra.Polynomials.Bernstein.Bernstein GHC.Types.Int
instance Algebra.Polynomials.Bernstein.Bernstein (GHC.Types.Int, GHC.Types.Int)
instance Algebra.Polynomials.Bernstein.Bernstein (GHC.Types.Int, GHC.Types.Int, GHC.Types.Int)
instance Algebra.Polynomials.Bernstein.Bernstein (GHC.Types.Int, GHC.Types.Int, GHC.Types.Int, GHC.Types.Int)
instance (GHC.Num.Num a, GHC.Real.Fractional a, Data.Vector.Unboxed.Base.Unbox a) => GHC.Num.Num (Algebra.Polynomials.Bernstein.Bernsteinp GHC.Types.Int a)
instance (GHC.Real.Fractional a, GHC.Num.Num a, Data.Vector.Unboxed.Base.Unbox a) => GHC.Num.Num (Algebra.Polynomials.Bernstein.Bernsteinp (GHC.Types.Int, GHC.Types.Int) a)
instance (GHC.Real.Fractional a, GHC.Num.Num a, Data.Vector.Unboxed.Base.Unbox a) => GHC.Num.Num (Algebra.Polynomials.Bernstein.Bernsteinp (GHC.Types.Int, GHC.Types.Int, GHC.Types.Int) a)
instance (GHC.Real.Fractional a, GHC.Num.Num a, Data.Vector.Unboxed.Base.Unbox a) => GHC.Num.Num (Algebra.Polynomials.Bernstein.Bernsteinp (GHC.Types.Int, GHC.Types.Int, GHC.Types.Int, GHC.Types.Int) a)
instance Algebra.Polynomials.Bernstein.Box (GHC.Types.Double, GHC.Types.Double) GHC.Types.Int
instance Algebra.Polynomials.Bernstein.Box (GHC.Types.Double, GHC.Types.Double, GHC.Types.Double, GHC.Types.Double) (GHC.Types.Int, GHC.Types.Int)
instance Algebra.Polynomials.Bernstein.Box (GHC.Types.Double, GHC.Types.Double, GHC.Types.Double, GHC.Types.Double, GHC.Types.Double, GHC.Types.Double) (GHC.Types.Int, GHC.Types.Int, GHC.Types.Int)
instance Algebra.Polynomials.Bernstein.Box (GHC.Types.Double, GHC.Types.Double, GHC.Types.Double, GHC.Types.Double, GHC.Types.Double, GHC.Types.Double, GHC.Types.Double, GHC.Types.Double) (GHC.Types.Int, GHC.Types.Int, GHC.Types.Int, GHC.Types.Int)
