mpolynomials-0.1.1.0: Simple multivariate polynomials.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Math.Algebra.MultiPol

Synopsis

Documentation

data Polynomial a Source #

Instances

Instances details
(C a, Eq a) => C a (Polynomial a) Source # 
Instance details

Defined in Math.Algebra.MultiPol

Methods

(*>) :: a -> Polynomial a -> Polynomial a #

Show a => Show (Polynomial a) Source # 
Instance details

Defined in Math.Algebra.MultiPol

(C a, Eq a) => Eq (Polynomial a) Source # 
Instance details

Defined in Math.Algebra.MultiPol

Methods

(==) :: Polynomial a -> Polynomial a -> Bool #

(/=) :: Polynomial a -> Polynomial a -> Bool #

(C a, Eq a) => C (Polynomial a) Source # 
Instance details

Defined in Math.Algebra.MultiPol

(C a, Eq a) => C (Polynomial a) Source # 
Instance details

Defined in Math.Algebra.MultiPol

data Monomial a Source #

Constructors

Monomial 

Fields

Instances

Instances details
Show a => Show (Monomial a) Source # 
Instance details

Defined in Math.Algebra.MultiPol

Methods

showsPrec :: Int -> Monomial a -> ShowS #

show :: Monomial a -> String #

showList :: [Monomial a] -> ShowS #

Eq a => Eq (Monomial a) Source # 
Instance details

Defined in Math.Algebra.MultiPol

Methods

(==) :: Monomial a -> Monomial a -> Bool #

(/=) :: Monomial a -> Monomial a -> Bool #

lone :: (C a, Eq a) => Int -> Polynomial a Source #

Polynomial x_n

constant :: (C a, Eq a) => a -> Polynomial a Source #

Constant polynomial

terms :: (C a, Eq a) => Polynomial a -> [Monomial a] Source #

List of the terms of a polynomial

(*^) :: (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

evalPoly :: (C a, Eq a) => Polynomial a -> [a] -> a Source #

Evaluates a polynomial

prettyPol :: (C a, Eq a) => (a -> String) -> String -> Polynomial a -> String Source #

Pretty form of a polynomial