Safe Haskell | None |
---|---|
Language | Haskell98 |
Documentation
diff :: (Num (c e), Container c e) => e -> (e -> c e) -> e -> c e Source
Takes the element-wise first derivative of the given vector/matrix-valued function of a single variable. The first argument gives the spacing epsilon as used in the difference formula, i.e. that thing which limit is taken to zero. The second argument is the matrix function, and the third argument is the point at which to evaluate the derivative.
The derivative is taken using the finite difference method to second order.
diff4 :: (Num (c e), Container c e) => e -> (e -> c e) -> e -> c e Source
As diff
, but uses fourth order finite difference method. This means that
the matrix argument will need to be evaluated at twice as many points, which
increases the runtime twofold until we can implement a full-gridded calculation.