satchmo-2.8.2: SAT encoding monad

Safe HaskellNone
LanguageHaskell98

Satchmo.Polynomial

Synopsis

Documentation

data Poly a Source

polynomial in one variable, coefficients starting from degree zero

Constructors

Poly [a] 

Instances

Decode m a Integer => Decode m (Poly a) (Poly Integer) 
Eq a => Eq (Poly a) 
Ord a => Ord (Poly a) 
Show a => Show (Poly a) 

polynomial Source

Arguments

:: MonadSAT m 
=> Int

Bits

-> Int

Degree

-> m NumPoly 

fromCoefficients Source

Arguments

:: MonadSAT m 
=> Int

Bits

-> [Integer]

Coefficients

-> m NumPoly 

compose :: MonadSAT m => NumPoly -> NumPoly -> m NumPoly Source

compose p(x) q(x) = p(q(x))

apply :: MonadSAT m => NumPoly -> Number -> m Number Source

apply p x applies number x to polynomial p

derive :: MonadSAT m => NumPoly -> m NumPoly Source

derive p computes the derivation of p