Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Polynomial a
- data CompactPolynomial a
- compact :: Polynomial a -> CompactPolynomial 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
- polytest :: Bool
Documentation
data Polynomial a Source #
Instances
(C a, Eq a) => C a (Polynomial a) Source # | |
Defined in MultiPol (*>) :: a -> Polynomial a -> Polynomial a # | |
(C a, Eq a) => Eq (Polynomial a) Source # | |
Defined in MultiPol (==) :: Polynomial a -> Polynomial a -> Bool # (/=) :: Polynomial a -> Polynomial a -> Bool # | |
Show a => Show (Polynomial a) Source # | |
Defined in MultiPol showsPrec :: Int -> Polynomial a -> ShowS # show :: Polynomial a -> String # showList :: [Polynomial a] -> ShowS # | |
(C a, Eq a) => C (Polynomial a) Source # | |
Defined in MultiPol (*) :: Polynomial a -> Polynomial a -> Polynomial a # one :: Polynomial a # fromInteger :: Integer -> Polynomial a # (^) :: Polynomial a -> Integer -> Polynomial a # | |
(C a, Eq a) => C (Polynomial a) Source # | |
Defined in MultiPol zero :: Polynomial a # (+) :: Polynomial a -> Polynomial a -> Polynomial a # (-) :: Polynomial a -> Polynomial a -> Polynomial a # negate :: Polynomial a -> Polynomial a # |
data CompactPolynomial a Source #
Instances
compact :: Polynomial a -> CompactPolynomial a Source #
Monomial | |
|
(*^) :: (C a, Eq a) => a -> Polynomial a -> Polynomial a Source #
Scale polynomial by a scalar
(^+^) :: (C a, Eq a) => Polynomial a -> Polynomial a -> Polynomial a Source #
Addition of two polynomials
(^-^) :: (C a, Eq a) => Polynomial a -> Polynomial a -> Polynomial a Source #
Substraction
(^*^) :: (C a, Eq a) => Polynomial a -> Polynomial a -> Polynomial a Source #
Multiply two polynomials
(^**^) :: (C a, Eq a) => Polynomial a -> Int -> Polynomial a Source #
Power of a polynomial