Safe Haskell | None |
---|---|
Language | Haskell2010 |
Construction of a data type that describes piecewise defined curves.
Synopsis
- type T t y sig = [PieceData t y sig]
- newtype Piece t y sig = Piece {
- computePiece :: y -> y -> t -> sig
- pieceFromFunction :: (y -> y -> t -> sig) -> Piece t y sig
- data PieceData t y sig = PieceData {}
- newtype PieceRightSingle y = PRS y
- newtype PieceRightDouble y = PRD y
- data PieceDist t y sig = PD t (Piece t y sig) y
- (#|-) :: (t, Piece t y sig) -> (PieceRightSingle y, T t y sig) -> (PieceDist t y sig, T t y sig)
- (-|#) :: y -> (PieceDist t y sig, T t y sig) -> (PieceRightSingle y, T t y sig)
- (#|=) :: (t, Piece t y sig) -> (PieceRightDouble y, T t y sig) -> (PieceDist t y sig, T t y sig)
- (=|#) :: (y, y) -> (PieceDist t y sig, T t y sig) -> (PieceRightDouble y, T t y sig)
- (#|) :: (t, Piece t y sig) -> y -> (PieceDist t y sig, T t y sig)
- (|#) :: y -> (PieceDist t y sig, T t y sig) -> T t y sig
- data FlatPosition
- splitDurations :: C t => [t] -> [(Int, t)]
Documentation
newtype Piece t y sig Source #
The curve type of a piece of a piecewise defined control curve.
Piece | |
|
pieceFromFunction :: (y -> y -> t -> sig) -> Piece t y sig Source #
newtype PieceRightSingle y Source #
PRS y |
newtype PieceRightDouble y Source #
PRD y |
(#|-) :: (t, Piece t y sig) -> (PieceRightSingle y, T t y sig) -> (PieceDist t y sig, T t y sig) infixr 5 Source #
The 6 operators simplify constructing a list of PieceData a
.
The description consists of nodes (namely the curve values at nodes)
and the connecting curve types.
The naming scheme is as follows:
In the middle there is a bar |
.
With respect to the bar,
the pad symbol #
is at the side of the curve type,
at the other side there is nothing, a minus sign -
, or an equality sign =
.
- Nothing means that here is the start or the end node of a curve.
- Minus means that here is a node where left and right curve meet at the same value. The node description is thus one value.
- Equality sign means that here is a split node, where left and right curve might have different ending and beginning values, respectively. The node description consists of a pair of values.
(#|=) :: (t, Piece t y sig) -> (PieceRightDouble y, T t y sig) -> (PieceDist t y sig, T t y sig) infixr 5 Source #
(=|#) :: (y, y) -> (PieceDist t y sig, T t y sig) -> (PieceRightDouble y, T t y sig) infixr 5 Source #
data FlatPosition Source #
Instances
splitDurations :: C t => [t] -> [(Int, t)] Source #