Safe Haskell | Safe-Inferred |
---|
- data BernsteinPoly = BernsteinPoly {
- bernsteinDegree :: !Int
- bernsteinCoeffs :: ![Double]
- bernsteinSubsegment :: BernsteinPoly -> Double -> Double -> BernsteinPoly
- listToBernstein :: [Double] -> BernsteinPoly
- zeroPoly :: BernsteinPoly
- (~*) :: BernsteinPoly -> BernsteinPoly -> BernsteinPoly
- (*~) :: Double -> BernsteinPoly -> BernsteinPoly
- (~+) :: BernsteinPoly -> BernsteinPoly -> BernsteinPoly
- (~-) :: BernsteinPoly -> BernsteinPoly -> BernsteinPoly
- degreeElevate :: BernsteinPoly -> Int -> BernsteinPoly
- bernsteinSplit :: BernsteinPoly -> Double -> (BernsteinPoly, BernsteinPoly)
- bernsteinEval :: BernsteinPoly -> Double -> Double
- bernsteinEvalDerivs :: BernsteinPoly -> Double -> [Double]
- bernsteinDeriv :: BernsteinPoly -> BernsteinPoly
Documentation
data BernsteinPoly Source
BernsteinPoly | |
|
bernsteinSubsegment :: BernsteinPoly -> Double -> Double -> BernsteinPolySource
Return the subsegment between the two parameters.
listToBernstein :: [Double] -> BernsteinPolySource
Create a bernstein polynomail from a list of coëfficients.
zeroPoly :: BernsteinPolySource
The constant zero.
(~*) :: BernsteinPoly -> BernsteinPoly -> BernsteinPolySource
Multiply two bernstein polynomials. The final degree will be the sum of either degrees. This operation takes O((n+m)^2) with n and m the degree of the beziers.
(*~) :: Double -> BernsteinPoly -> BernsteinPolySource
Scale a bernstein polynomial by a constant.
(~+) :: BernsteinPoly -> BernsteinPoly -> BernsteinPolySource
Sum two bernstein polynomials. The final degree will be the maximum of either degrees.
(~-) :: BernsteinPoly -> BernsteinPoly -> BernsteinPolySource
Subtract two bernstein polynomials. The final degree will be the maximum of either degrees.
degreeElevate :: BernsteinPoly -> Int -> BernsteinPolySource
Degree elevate a bernstein polynomail a number of times.
bernsteinSplit :: BernsteinPoly -> Double -> (BernsteinPoly, BernsteinPoly)Source
Split a bernstein polynomial
bernsteinEval :: BernsteinPoly -> Double -> DoubleSource
Evaluate the bernstein polynomial.
bernsteinEvalDerivs :: BernsteinPoly -> Double -> [Double]Source
Evaluate the bernstein polynomial and its derivatives.
bernsteinDeriv :: BernsteinPoly -> BernsteinPolySource
Find the derivative of a bernstein polynomial.