monadiccp-0.7.7: Constraint Programming

Safe HaskellSafe
LanguageHaskell98

Data.Linear

Documentation

data (Ord t, Num v) => Linear t v Source #

Instances

(Num v, Eq v, Ord t, Eq t) => Eq (Linear t v) Source # 

Methods

(==) :: Linear t v -> Linear t v -> Bool #

(/=) :: Linear t v -> Linear t v -> Bool #

(Num v, Eq v, Ord t, Eq t, Show t) => Num (Linear t v) Source # 

Methods

(+) :: Linear t v -> Linear t v -> Linear t v #

(-) :: Linear t v -> Linear t v -> Linear t v #

(*) :: Linear t v -> Linear t v -> Linear t v #

negate :: Linear t v -> Linear t v #

abs :: Linear t v -> Linear t v #

signum :: Linear t v -> Linear t v #

fromInteger :: Integer -> Linear t v #

(Num v, Ord v, Ord t, Eq t) => Ord (Linear t v) Source # 

Methods

compare :: Linear t v -> Linear t v -> Ordering #

(<) :: Linear t v -> Linear t v -> Bool #

(<=) :: Linear t v -> Linear t v -> Bool #

(>) :: Linear t v -> Linear t v -> Bool #

(>=) :: Linear t v -> Linear t v -> Bool #

max :: Linear t v -> Linear t v -> Linear t v #

min :: Linear t v -> Linear t v -> Linear t v #

(Num v, Show v, Ord t, Show t) => Show (Linear t v) Source # 

Methods

showsPrec :: Int -> Linear t v -> ShowS #

show :: Linear t v -> String #

showList :: [Linear t v] -> ShowS #

constToLinear :: (Num v, Ord t) => v -> Linear t v Source #

termToLinear :: (Num v, Ord t) => t -> Linear t v Source #

linearToConst :: (Num v, Ord t) => Linear t v -> Maybe v Source #

linearToTerm :: (Num v, Eq v, Ord t) => Linear t v -> Maybe t Source #

linearMultiply :: (Num v, Eq v, Ord t) => Linear t v -> Linear t v -> Maybe (Linear t v) Source #

linearMult :: (Num v, Eq v, Ord t) => v -> Linear t v -> Linear t v Source #

linearToList :: (Ord t, Num v) => Linear t v -> [(Maybe t, v)] Source #

linearToListEx :: (Ord t, Num v) => Linear t v -> (v, [(t, v)]) Source #

getCoef :: (Num v, Ord t) => Maybe t -> Linear t v -> v Source #