Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Polynomial expressions (used for parsing)
Synopsis
- data Sign
- negateIfMinus :: Num a => Sign -> a -> a
- newtype Monom var = Monom [(var, Int)]
- data Term coeff var = Term !coeff !(Monom var)
- newtype GenPoly coeff var = GenPoly [Term coeff var]
- data Expr v
- evalSign :: Num c => Sign -> c -> c
- evalMonom :: Num c => (var -> c) -> Monom var -> c
- evalTerm :: Num c => (coeff -> c) -> (var -> c) -> Term coeff var -> c
- evalGenPoly :: Num c => (coeff -> c) -> (var -> c) -> GenPoly coeff var -> c
- evalExpr :: Num c => (var -> c) -> Expr var -> c
Types
negateIfMinus :: Num a => Sign -> a -> a Source #
Monomials
Instances
Functor Monom Source # | |
Foldable Monom Source # | |
Defined in Math.Singular.Factory.Expr fold :: Monoid m => Monom m -> m # foldMap :: Monoid m => (a -> m) -> Monom a -> m # foldr :: (a -> b -> b) -> b -> Monom a -> b # foldr' :: (a -> b -> b) -> b -> Monom a -> b # foldl :: (b -> a -> b) -> b -> Monom a -> b # foldl' :: (b -> a -> b) -> b -> Monom a -> b # foldr1 :: (a -> a -> a) -> Monom a -> a # foldl1 :: (a -> a -> a) -> Monom a -> a # elem :: Eq a => a -> Monom a -> Bool # maximum :: Ord a => Monom a -> a # minimum :: Ord a => Monom a -> a # | |
Traversable Monom Source # | |
Eq var => Eq (Monom var) Source # | |
Ord var => Ord (Monom var) Source # | |
Defined in Math.Singular.Factory.Expr | |
Show var => Show (Monom var) Source # | |
A monomial multiplied by a constant
Instances
Functor (Term coeff) Source # | |
Foldable (Term coeff) Source # | |
Defined in Math.Singular.Factory.Expr fold :: Monoid m => Term coeff m -> m # foldMap :: Monoid m => (a -> m) -> Term coeff a -> m # foldr :: (a -> b -> b) -> b -> Term coeff a -> b # foldr' :: (a -> b -> b) -> b -> Term coeff a -> b # foldl :: (b -> a -> b) -> b -> Term coeff a -> b # foldl' :: (b -> a -> b) -> b -> Term coeff a -> b # foldr1 :: (a -> a -> a) -> Term coeff a -> a # foldl1 :: (a -> a -> a) -> Term coeff a -> a # toList :: Term coeff a -> [a] # null :: Term coeff a -> Bool # length :: Term coeff a -> Int # elem :: Eq a => a -> Term coeff a -> Bool # maximum :: Ord a => Term coeff a -> a # minimum :: Ord a => Term coeff a -> a # | |
Traversable (Term coeff) Source # | |
Defined in Math.Singular.Factory.Expr | |
(Eq coeff, Eq var) => Eq (Term coeff var) Source # | |
(Ord coeff, Ord var) => Ord (Term coeff var) Source # | |
Defined in Math.Singular.Factory.Expr compare :: Term coeff var -> Term coeff var -> Ordering # (<) :: Term coeff var -> Term coeff var -> Bool # (<=) :: Term coeff var -> Term coeff var -> Bool # (>) :: Term coeff var -> Term coeff var -> Bool # (>=) :: Term coeff var -> Term coeff var -> Bool # | |
(Show coeff, Show var) => Show (Term coeff var) Source # | |
newtype GenPoly coeff var Source #
Polynomials as linear combination of monomials
Instances
Functor (GenPoly coeff) Source # | |
Foldable (GenPoly coeff) Source # | |
Defined in Math.Singular.Factory.Expr fold :: Monoid m => GenPoly coeff m -> m # foldMap :: Monoid m => (a -> m) -> GenPoly coeff a -> m # foldr :: (a -> b -> b) -> b -> GenPoly coeff a -> b # foldr' :: (a -> b -> b) -> b -> GenPoly coeff a -> b # foldl :: (b -> a -> b) -> b -> GenPoly coeff a -> b # foldl' :: (b -> a -> b) -> b -> GenPoly coeff a -> b # foldr1 :: (a -> a -> a) -> GenPoly coeff a -> a # foldl1 :: (a -> a -> a) -> GenPoly coeff a -> a # toList :: GenPoly coeff a -> [a] # null :: GenPoly coeff a -> Bool # length :: GenPoly coeff a -> Int # elem :: Eq a => a -> GenPoly coeff a -> Bool # maximum :: Ord a => GenPoly coeff a -> a # minimum :: Ord a => GenPoly coeff a -> a # | |
Traversable (GenPoly coeff) Source # | |
Defined in Math.Singular.Factory.Expr | |
(Eq coeff, Eq var) => Eq (GenPoly coeff var) Source # | |
(Ord coeff, Ord var) => Ord (GenPoly coeff var) Source # | |
Defined in Math.Singular.Factory.Expr compare :: GenPoly coeff var -> GenPoly coeff var -> Ordering # (<) :: GenPoly coeff var -> GenPoly coeff var -> Bool # (<=) :: GenPoly coeff var -> GenPoly coeff var -> Bool # (>) :: GenPoly coeff var -> GenPoly coeff var -> Bool # (>=) :: GenPoly coeff var -> GenPoly coeff var -> Bool # max :: GenPoly coeff var -> GenPoly coeff var -> GenPoly coeff var # min :: GenPoly coeff var -> GenPoly coeff var -> GenPoly coeff var # | |
(Show coeff, Show var) => Show (GenPoly coeff var) Source # | |
Polynomial expressions
Instances
Functor Expr Source # | |
Foldable Expr Source # | |
Defined in Math.Singular.Factory.Expr fold :: Monoid m => Expr m -> m # foldMap :: Monoid m => (a -> m) -> Expr a -> m # foldr :: (a -> b -> b) -> b -> Expr a -> b # foldr' :: (a -> b -> b) -> b -> Expr a -> b # foldl :: (b -> a -> b) -> b -> Expr a -> b # foldl' :: (b -> a -> b) -> b -> Expr a -> b # foldr1 :: (a -> a -> a) -> Expr a -> a # foldl1 :: (a -> a -> a) -> Expr a -> a # elem :: Eq a => a -> Expr a -> Bool # maximum :: Ord a => Expr a -> a # | |
Traversable Expr Source # | |
Eq v => Eq (Expr v) Source # | |
Ord v => Ord (Expr v) Source # | |
Show v => Show (Expr v) Source # | |
Evaluation to Num
evalGenPoly :: Num c => (coeff -> c) -> (var -> c) -> GenPoly coeff var -> c Source #