Safe Haskell | None |
---|

- class (VectorSpace v, Fractional (Scalar v), Ord (Scalar v)) => Spline s v where
- splineDomain :: s v -> Maybe (Scalar v, Scalar v)
- evalSpline :: s v -> Scalar v -> v
- splineDegree :: s v -> Int
- knotVector :: s v -> Knots (Scalar v)
- toBSpline :: s v -> BSpline Vector v

- class Spline s v => ControlPoints s v where
- controlPoints :: s v -> Vector v

# 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`

.

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

(not
necessarily exactly, but up to reasonable expectations of numerical
accuracy).
`evalSpline`

. `toBSpline`

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

splineDegree :: s v -> IntSource

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

(VectorSpace v, Fractional (Scalar v), Ord (Scalar v)) => Spline BezierCurve v | |

(VectorSpace v, Fractional (Scalar v), Ord (Scalar v)) => Spline MSpline v | |

(VectorSpace v, Fractional (Scalar v), Ord (Scalar v)) => Spline ISpline v | |

(VectorSpace a, Fractional (Scalar a), Ord (Scalar a)) => Spline CSpline a | |

(VectorSpace a, Fractional (Scalar a), Ord (Scalar a), Vector v a, Vector v (Scalar a)) => Spline (BSpline v) a | |

(VectorSpace v, Fractional (Scalar v), Ord (Scalar v)) => Spline (BSpline Vector) v |

class Spline s v => ControlPoints s v whereSource

controlPoints :: s v -> Vector vSource

Spline BezierCurve v => ControlPoints BezierCurve v | |

Spline MSpline v => ControlPoints MSpline v | |

Spline ISpline v => ControlPoints ISpline v | |

(Spline (BSpline v) a, Vector v a) => ControlPoints (BSpline v) a | |

Spline (BSpline Vector) a => ControlPoints (BSpline Vector) a |