Safe Haskell | None |
---|
- 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
- isVal :: Eq a => a -> Expr a -> Bool
- sym :: String -> Expr a
- symDependent :: String -> Expr a -> Expr a
- symDependentN :: String -> Expr a -> Int -> Expr a
- const' :: a -> Expr a
- getParents :: GExpr a b -> [b]
- extractLinearPart :: (Num a, Ord 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 :: (Num a, Ord a) => Expr a -> Maybe (Expr a)
Documentation
ESym :: Sym -> Expr a | |
EConst :: a -> Expr a | |
ENum :: Num a => Nums (Expr a) -> Expr a | |
EFractional :: Fractional a => Fractionals (Expr a) -> Expr a | |
EFloating :: Floating a => Floatings (Expr a) -> Expr a |
Typeable1 Expr | |
Eq a => Eq (Expr a) | |
(Floating a, Ord a) => Floating (Expr a) | |
(Fractional a, Ord a) => Fractional (Expr a) | |
(Data a, Floating a) => Data (Expr a) | |
(Num a, Ord a) => Num (Expr a) | |
Show a => Show (Expr a) | |
Hashable a => Hashable (Expr a) | |
MuRef (Expr a) | |
ToFunGraph [[Expr a]] | |
ToFunGraph [Expr a] | |
ToFunGraph (Expr a) |
data Fractionals a Source
Div a a | |
FromRational Rational |
Typeable1 Fractionals | |
Eq a => Eq (Fractionals a) | |
Data a => Data (Fractionals a) | |
Ord a => Ord (Fractionals a) | |
Show a => Show (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
getParents :: GExpr a b -> [b]Source
getConst :: Expr a -> Maybe aSource
if the expression is a constant, a fromInteger, or a fromRational, return the constant part otherwise return nothing