Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Polynomial a
- data Monomial a = Monomial {
- coefficient :: a
- powers :: Seq Int
- lone :: (C a, Eq a) => Int -> Polynomial a
- constant :: (C a, Eq a) => a -> Polynomial a
- terms :: (C a, Eq a) => Polynomial a -> [Monomial a]
- (*^) :: (C a, Eq a) => a -> Polynomial a -> Polynomial a
- (^+^) :: (C a, Eq a) => Polynomial a -> Polynomial a -> Polynomial a
- (^-^) :: (C a, Eq a) => Polynomial a -> Polynomial a -> Polynomial a
- (^*^) :: (C a, Eq a) => Polynomial a -> Polynomial a -> Polynomial a
- (^**^) :: (C a, Eq a) => Polynomial a -> Int -> Polynomial a
- evalPoly :: (C a, Eq a) => Polynomial a -> [a] -> a
- prettyPol :: (C a, Eq a) => (a -> String) -> String -> Polynomial a -> String
Documentation
data Polynomial a Source #
Instances
(C a, Eq a) => C a (Polynomial a) Source # | |
Defined in Math.Algebra.MultiPol (*>) :: a -> Polynomial a -> Polynomial a # | |
Show a => Show (Polynomial a) Source # | |
Defined in Math.Algebra.MultiPol showsPrec :: Int -> Polynomial a -> ShowS # show :: Polynomial a -> String # showList :: [Polynomial a] -> ShowS # | |
(C a, Eq a) => Eq (Polynomial a) Source # | |
Defined in Math.Algebra.MultiPol (==) :: Polynomial a -> Polynomial a -> Bool # (/=) :: Polynomial a -> Polynomial a -> Bool # | |
(C a, Eq a) => C (Polynomial a) Source # | |
Defined in Math.Algebra.MultiPol zero :: Polynomial a # (+) :: Polynomial a -> Polynomial a -> Polynomial a # (-) :: Polynomial a -> Polynomial a -> Polynomial a # negate :: Polynomial a -> Polynomial a # | |
(C a, Eq a) => C (Polynomial a) Source # | |
Defined in Math.Algebra.MultiPol (*) :: Polynomial a -> Polynomial a -> Polynomial a # one :: Polynomial a # fromInteger :: Integer -> Polynomial a # (^) :: Polynomial a -> Integer -> Polynomial a # |
Monomial | |
|
(*^) :: (C a, Eq a) => a -> Polynomial a -> Polynomial a infixr 7 Source #
Scale polynomial by a scalar
(^+^) :: (C a, Eq a) => Polynomial a -> Polynomial a -> Polynomial a infixl 6 Source #
Addition of two polynomials
(^-^) :: (C a, Eq a) => Polynomial a -> Polynomial a -> Polynomial a infixl 6 Source #
Substraction
(^*^) :: (C a, Eq a) => Polynomial a -> Polynomial a -> Polynomial a infixl 7 Source #
Multiply two polynomials
(^**^) :: (C a, Eq a) => Polynomial a -> Int -> Polynomial a infixr 8 Source #
Power of a polynomial