| Copyright | (c) Ross Paterson 2011 |
|---|---|
| License | BSD-style (see the file LICENSE) |
| Maintainer | [email protected] |
| Stability | provisional |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.YAP.DifferentialOperator
Description
An example instance of the algebraic classes: the semiring of linear differential operators under addition and composition.
Synopsis
- data DifferentialOperator a
- type Weyl a = DifferentialOperator (Polynomial a)
- multiply :: a -> DifferentialOperator a
- diff :: Semiring a => DifferentialOperator a
- fromCoefficients :: [a] -> DifferentialOperator a
- order :: (Eq a, AdditiveMonoid a) => DifferentialOperator a -> Int
- coefficients :: (Eq a, AdditiveMonoid a) => DifferentialOperator a -> [a]
- evaluate :: Differentiable a => DifferentialOperator a -> a -> a
Linear differential operators
data DifferentialOperator a Source #
A linear differential operator of the form \[ p_0(x) + p_1(x) \partial_x + \cdots + p_n(x) \partial_x^n \] where each \(p_i(x)\) is a differentiable function in \(x\) and each \(\partial_x^i\) is the differentiation operator with respect to \(x\) repeated \(i\) times.
Instances
type Weyl a = DifferentialOperator (Polynomial a) Source #
The (first) Weyl algebra over a, consisting of linear differential
operators with polynomial coefficients.
multiply :: a -> DifferentialOperator a Source #
Operator representing multiplication by a differentiable function
diff :: Semiring a => DifferentialOperator a Source #
fromCoefficients :: [a] -> DifferentialOperator a Source #
Construct an operator from a list of coefficients of the iterated differential operators in order of increasing number of iterations.
Queries
order :: (Eq a, AdditiveMonoid a) => DifferentialOperator a -> Int Source #
The order of a differential operator.
coefficients :: (Eq a, AdditiveMonoid a) => DifferentialOperator a -> [a] Source #
Coefficients of the iterated differential operators in order of increasing number of iterations, and with no trailing zeros.
evaluate :: Differentiable a => DifferentialOperator a -> a -> a Source #
Evaluate an operator on a given differentiable function.