splines-0.5.0.1: B-Splines, other splines, and NURBS.

Safe HaskellNone

Math.Spline.Class

Synopsis

Documentation

class (VectorSpace v, Fractional (Scalar v), Ord (Scalar v)) => Spline s v whereSource

A spline is a piecewise polynomial vector-valued function. The necessary and sufficient instance definition is toBSpline.

Methods

splineDomain :: s v -> Maybe (Scalar v, Scalar v)Source

Returns the domain of a spline. In the case of B-splines, this is the domain on which a spline with this degree and knot vector has a full basis set. In other cases, it should be no larger than splineDomain . toBSpline, but may be smaller. Within this domain, evalSpline should agree with evalSpline . toBSpline (not necessarily exactly, but up to reasonable expectations of numerical accuracy).

evalSpline :: s v -> Scalar v -> vSource

splineDegree :: s v -> IntSource

knotVector :: s v -> Knots (Scalar v)Source

toBSpline :: s v -> BSpline Vector vSource