Îõ³h$°t.      !"#$%&'()*+,-  Safe-Inferredh interpolation1list must be sorted with respect to first element interpolationÅ\x y -> Nodes.singleton x y == Nodes.fromList [(x,y)::(Integer,Char)] interpolationÁ\xs -> xs == Nodes.toList (Nodes.fromList (xs::[(Integer,Char)])) interpolation;Nodes.lookup (Nodes.fromList ([(0,'a'),(2::Int,'b')])) (-1)(Nothing,Just (0,'a'))8Nodes.lookup (Nodes.fromList ([(0,'a'),(2::Int,'b')])) 0(Just (0,'a'),Just (2,'b'))8Nodes.lookup (Nodes.fromList ([(0,'a'),(2::Int,'b')])) 1(Just (0,'a'),Just (2,'b'))8Nodes.lookup (Nodes.fromList ([(0,'a'),(2::Int,'b')])) 2(Just (2,'b'),Nothing)8Nodes.lookup (Nodes.fromList ([(0,'a'),(2::Int,'b')])) 3(Just (2,'b'),Nothing)ÀNodes.lookup (Nodes.fromList ([(0,'a'),(2,'b'),(5::Int,'c')])) 3(Just (2,'b'),Just (5,'c')) interpolation—\x xs -> let f acc y = (acc+y,acc) in List.mapAccumL f x (map snd xs) == mapSnd Fold.toList (Trav.mapAccumL f x (Nodes.fromList (xs::[(Int,Integer)]))) interpolationÈ\xs -> map snd xs == Fold.toList (Nodes.fromList (xs::[(Integer,Char)]))  interpolationÝ\xs -> map (mapSnd ord) xs == Nodes.toList (fmap ord (Nodes.fromList (xs::[(Integer,Char)]))) Safe-Inferredœ    Safe-InferredÆ./0  Safe-Inferredð12345  Safe-Inferred 6789:;<=> Safe-Inferred^ interpolationáCubic interpolation where the derivative at a node is set to the slope of the two adjacent nodes. interpolation†Cubic interpolation where the derivative at a node is set to the slope of the parabola through the current and the two adjacent nodes. Safe-Inferred¿ interpolation'coefficientsToLinear nodes coefficients' creates an interpolation function for nodes , where the  coefficients4 correspond to the basis functions constructed with Basis.linear nodes. interpolationCf.  interpolationCf.  interpolationCf.  Safe-Inferred " interpolationÏforAllDistinctPoints $ \p1 p2 x -> Piece.linear p1 p2 x == Piece.linear p2 p1 x interpolationãHermite interpolation with one derivative per node. That is, the interpolating polynomial is cubic.ÓforAllDistinctPoints $ \p1 p2 x -> Piece.hermite1 p1 p2 x == Piece.hermite1 p2 p1 xœforAllDistinctPoints $ \p1@(x1,y1) p2@(x2,y2) x -> Piece.linear p1 p2 x == let slope = (y2-y1)/(x2-x1) in Piece.hermite1 (x1, (y1,slope)) (x2, (y2,slope)) x×forAllDistinctPoints $ \p1 p2 x -> Piece.hermite1 p1 p2 x == PiecePriv.hermite1 p1 p2 x Safe-Inferred N Safe-Inferred “# interpolationÆmaximum difference of indices of basis functions that overlap plus one( interpolationcheckOverlap Type.linear) interpolationcheckOverlap Type.hermite1* interpolationcheckOverlap Type.cubicLinear+ interpolationcheckOverlap Type.cubicParabola  !"#$%&'()*+  !"#$%&'()*+ Safe-Inferredl, interpolationÃIt is a checked error to interpolate outside of the range of nodes.ÓPiecewise.interpolate Type.linear (Nodes.fromList [(0,0),(3,6),(5,10::Rational)]) 24 % 1âPiecewise.interpolate Type.hermite1 (Nodes.fromList [(0,(0,0)),(3,(9,6)),(5,(25,10::Rational))]) 24 % 1âPiecewise.interpolate Type.hermite1 (Nodes.fromList [(0,(1,-2)),(3,(4,4)),(5,(16,8::Rational))]) 21 % 1- interpolationßOutside the range of nodes the interpolation function takes the value of the respective border.(forAllSortedRatios $ checkEq Type.linear*forAllSortedRatios $ checkEq Type.hermite1ÞforAllSortedRatios $ \nodeXs x -> lengthAtLeast 4 nodeXs ==> checkEq Type.cubicLinear nodeXs xàforAllSortedRatios $ \nodeXs x -> lengthAtLeast 4 nodeXs ==> checkEq Type.cubicParabola nodeXs xøLinear interpolation can be used to compute the median, a quartile or any other quantile of a list of arbitrary numbers.quantile [2,5,3::Rational] 0.53 % 1 quantile [2,5,3,7::Rational] 0.54 % 1!quantile [2,5,3,7::Rational] 0.2511 % 4>\(QC.NonEmpty xs) -> quantile (xs::[Rational]) 0 == minimum xs>\(QC.NonEmpty xs) -> quantile (xs::[Rational]) 1 == maximum xs,-,-?       !"#$%&'()* + , - .   / 0 1 2 3 4 5 6 7 8 9:+interpolation-0.1.1.2-ZPmhKvlyMlBIYhoVkTiBhNumeric.Interpolation.NodeList Numeric.Interpolation.Basis.FullNumeric.Interpolation.Piece#Numeric.Interpolation.Basis.CompactNumeric.Interpolation.BasisNumeric.Interpolation.SampleNumeric.Interpolation.TypeNumeric.Interpolation.Piecewise"Numeric.Interpolation.Private.List#Numeric.Interpolation.Private.Piece#Numeric.Interpolation.Private.BasisTIntervalNodefromList singletontoListlookup$fTraversableT $fFoldableT $fFunctorT$fEqT$fOrdT$fShowTlinearhermite1 cubicLinear cubicParabolacoefficientsToLinearcoefficientsToHermite1coefficientsToCubicLinearcoefficientsToCubicParabolaCons ssvFromNodesinterpolatePiece basisOverlapbasisFunctionssampleBasisFunctionscoefficientsToInterpolator valueFromNode interpolateinterpolateConstantExt mapAdjacent3mapAdjacentMaybe3mapAdjacentMaybe5sqr hermite1' hermite1''_hermite1Split hermite1SplitpairsparabolaDerivativeparabolaBasisDerivativeLeftparabolaBasisDerivativeCenterparabolaBasisDerivativeRightparabolaDerivativeCenterNodeparabola2ndDerivativeCenterNode