combinat-0.2.10.0: Generate and manipulate various combinatorial objects.

Math.Combinat.Sign

Description

Signs

Synopsis

# Documentation

data Sign Source #

Constructors

 Plus Minus

#### Instances

Instances details
 Source # Instance detailsDefined in Math.Combinat.Sign Methods(==) :: Sign -> Sign -> Bool #(/=) :: Sign -> Sign -> Bool # Source # Instance detailsDefined in Math.Combinat.Sign Methodscompare :: Sign -> Sign -> Ordering #(<) :: Sign -> Sign -> Bool #(<=) :: Sign -> Sign -> Bool #(>) :: Sign -> Sign -> Bool #(>=) :: Sign -> Sign -> Bool #max :: Sign -> Sign -> Sign #min :: Sign -> Sign -> Sign # Source # Instance detailsDefined in Math.Combinat.Sign Methods Source # Instance detailsDefined in Math.Combinat.Sign MethodsshowsPrec :: Int -> Sign -> ShowS #show :: Sign -> String #showList :: [Sign] -> ShowS # Source # Instance detailsDefined in Math.Combinat.Sign Methods(<>) :: Sign -> Sign -> Sign #stimes :: Integral b => b -> Sign -> Sign # Source # Instance detailsDefined in Math.Combinat.Sign Methodsmappend :: Sign -> Sign -> Sign #mconcat :: [Sign] -> Sign # Source # Instance detailsDefined in Math.Combinat.Sign MethodsrandomR :: 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

paritySignValue :: Integral a => a -> Integer Source #

(-1)^k

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

Negate the second argument if the first is odd