Safe Haskell | Safe-Inferred |
---|
- data Expr a where
- data GExpr a b where
- data Nums a
- data Fractionals a
- = Div a a
- | FromRational Rational
- data Floatings a
- data Sym
- sym :: String -> Expr a
- symDependent :: String -> Expr a -> Expr a
- symDependentN :: String -> Expr a -> Int -> Expr a
- const' :: a -> Expr a
- extractLinearPart :: (Num a, Eq a, Show a) => Expr a -> Expr a -> (Expr a, a)
- getConst :: Expr a -> Maybe a
- substitute :: (Ord a, Hashable a, Show a) => Expr a -> [(Expr a, Expr a)] -> Expr a
- sketchySubstitute :: (Eq a, Hashable a, Show a) => Expr a -> [(Expr a, Expr a)] -> Expr a
- foldExpr :: (Expr a -> b -> b) -> b -> Expr a -> b
- fromNeg :: Expr a -> Maybe (Expr a)
Documentation
data Fractionals a Source
Div a a | |
FromRational Rational |
Functor Fractionals | |
Foldable Fractionals | |
Traversable Fractionals | |
Eq a => Eq (Fractionals a) | |
Ord a => Ord (Fractionals a) | |
Show a => Show (Fractionals a) | |
Generic (Fractionals a) | |
Hashable a => Hashable (Fractionals a) |
symDependent :: String -> Expr a -> Expr aSource
Symbolic scalar which is a function of some independent variable, like time. . This lets you do d(f(g(t)))/dt == f'(g(t))*g'(t)
symDependentN :: String -> Expr a -> Int -> Expr aSource
same as symDependent but it can start as the Nth derivative
getConst :: Expr a -> Maybe aSource
if the expression is a constant, a fromInteger, or a fromRational, return the constant part otherwise return nothing