combinat-0.2.10.0: Generate and manipulate various combinatorial objects.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Math.Combinat.Sign

Description

Signs

Synopsis

Documentation

data Sign Source #

Constructors

Plus 
Minus 

Instances

Instances details
Eq Sign Source # 
Instance details

Defined in Math.Combinat.Sign

Methods

(==) :: Sign -> Sign -> Bool #

(/=) :: Sign -> Sign -> Bool #

Ord Sign Source # 
Instance details

Defined in Math.Combinat.Sign

Methods

compare :: Sign -> Sign -> Ordering #

(<) :: Sign -> Sign -> Bool #

(<=) :: Sign -> Sign -> Bool #

(>) :: Sign -> Sign -> Bool #

(>=) :: Sign -> Sign -> Bool #

max :: Sign -> Sign -> Sign #

min :: Sign -> Sign -> Sign #

Read Sign Source # 
Instance details

Defined in Math.Combinat.Sign

Show Sign Source # 
Instance details

Defined in Math.Combinat.Sign

Methods

showsPrec :: Int -> Sign -> ShowS #

show :: Sign -> String #

showList :: [Sign] -> ShowS #

Semigroup Sign Source # 
Instance details

Defined in Math.Combinat.Sign

Methods

(<>) :: Sign -> Sign -> Sign #

sconcat :: NonEmpty Sign -> Sign #

stimes :: Integral b => b -> Sign -> Sign #

Monoid Sign Source # 
Instance details

Defined in Math.Combinat.Sign

Methods

mempty :: Sign #

mappend :: Sign -> Sign -> Sign #

mconcat :: [Sign] -> Sign #

Random Sign Source # 
Instance details

Defined in Math.Combinat.Sign

Methods

randomR :: RandomGen g => (Sign, Sign) -> g -> (Sign, g) #

random :: RandomGen g => g -> (Sign, g) #

randomRs :: RandomGen g => (Sign, Sign) -> g -> [Sign] #

randoms :: RandomGen g => g -> [Sign] #

signValue :: Num a => Sign -> a Source #

+1 or -1

signed :: Num a => Sign -> a -> a Source #

Negate the second argument if the first is Minus

paritySign :: Integral a => a -> Sign Source #

Plus if even, Minus if odd

negateIfOdd :: (Integral a, Num b) => a -> b -> b Source #

Negate the second argument if the first is odd