Math.Spline.Knots
- data Knots a
- knot :: Ord a => a -> Knots a
- multipleKnot :: Ord a => a -> Int -> Knots a
- mkKnots :: Ord a => [a] -> Knots a
- fromList :: Ord k => [(k, Int)] -> Knots k
- knots :: Knots t -> [t]
- numKnots :: Knots t -> Int
- toList :: Knots k -> [(k, Int)]
- distinctKnots :: Knots t -> [t]
- numDistinctKnots :: Knots t -> Int
- knotMultiplicity :: Ord k => k -> Knots k -> Int
- setKnotMultiplicity :: Ord k => k -> Int -> Knots k -> Knots k
- knotDomain :: Knots a -> Int -> Maybe (a, a)
Documentation
Knot vectors - multisets of points in a 1-dimensional space.
multipleKnot :: Ord a => a -> Int -> Knots aSource
Create a knot vector consisting of one knot with the specified multiplicity.
fromList :: Ord k => [(k, Int)] -> Knots kSource
Create a knot vector consisting of all the knots and corresponding multiplicities in a list.
Returns a list of all knots (not necessarily distinct) of a knot vector in ascending order
numKnots :: Knots t -> IntSource
Returns the number of knots (not necessarily distinct) in a knot vector.
toList :: Knots k -> [(k, Int)]Source
Returns a list of all distinct knots in ascending order along with their multiplicities.
distinctKnots :: Knots t -> [t]Source
Returns a list of all distinct knots of a knot vector in ascending order
numDistinctKnots :: Knots t -> IntSource
Returns the number of distinct knots in a knot vector.
knotMultiplicity :: Ord k => k -> Knots k -> IntSource
Looks up the multiplicity of a knot (which is 0 if the point is not a knot)
setKnotMultiplicity :: Ord k => k -> Int -> Knots k -> Knots kSource
Returns a new knot vector with the given knot set to the specified multiplicity and all other knots unchanged.
knotDomain :: Knots a -> Int -> Maybe (a, a)Source
knotDomain kts p return the domain of a B-spline or NURBS with knot
vector kts and degree p. This is the subrange spanned by all
except the first and last p knots. Outside this domain, the spline
does not have a complete basis set. De Boor's algorithm assumes that
the basis functions sum to 1, which is only true on this range, and so
this is also precisely the domain on which de Boor's algorithm is valid.