semiring-num-1.6.0.1: Basic semiring class and instances

Data.Semiring.Numeric

Description

Synopsis

# Documentation

newtype Bottleneck a Source #

Useful for some constraint problems.

(<+>) = max
(<.>) = min
zero  = minBound
one   = maxBound

Constructors

 Bottleneck FieldsgetBottleneck :: a

Instances

 Source # Methodsfmap :: (a -> b) -> Bottleneck a -> Bottleneck b #(<) :: a -> Bottleneck b -> Bottleneck a # Source # Methodsfold :: Monoid m => Bottleneck m -> m #foldMap :: Monoid m => (a -> m) -> Bottleneck a -> m #foldr :: (a -> b -> b) -> b -> Bottleneck a -> b #foldr' :: (a -> b -> b) -> b -> Bottleneck a -> b #foldl :: (b -> a -> b) -> b -> Bottleneck a -> b #foldl' :: (b -> a -> b) -> b -> Bottleneck a -> b #foldr1 :: (a -> a -> a) -> Bottleneck a -> a #foldl1 :: (a -> a -> a) -> Bottleneck a -> a #toList :: Bottleneck a -> [a] #null :: Bottleneck a -> Bool #length :: Bottleneck a -> Int #elem :: Eq a => a -> Bottleneck a -> Bool #maximum :: Ord a => Bottleneck a -> a #minimum :: Ord a => Bottleneck a -> a #sum :: Num a => Bottleneck a -> a #product :: Num a => Bottleneck a -> a # Source # Methodstraverse :: Applicative f => (a -> f b) -> Bottleneck a -> f (Bottleneck b) #sequenceA :: Applicative f => Bottleneck (f a) -> f (Bottleneck a) #mapM :: Monad m => (a -> m b) -> Bottleneck a -> m (Bottleneck b) #sequence :: Monad m => Bottleneck (m a) -> m (Bottleneck a) # Source # Associated Typestype Rep1 (Bottleneck :: * -> *) :: * -> * # Methodsto1 :: Rep1 Bottleneck a -> Bottleneck a # Source # MethodsliftEq :: (a -> b -> Bool) -> Bottleneck a -> Bottleneck b -> Bool # Source # MethodsliftCompare :: (a -> b -> Ordering) -> Bottleneck a -> Bottleneck b -> Ordering # Source # MethodsliftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Bottleneck a) #liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Bottleneck a] # Source # MethodsliftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Bottleneck a -> ShowS #liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Bottleneck a] -> ShowS # Unbox a => Vector Vector (Bottleneck a) Source # MethodsbasicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (Bottleneck a) -> m (Vector (Bottleneck a)) #basicUnsafeThaw :: PrimMonad m => Vector (Bottleneck a) -> m (Mutable Vector (PrimState m) (Bottleneck a)) #basicLength :: Vector (Bottleneck a) -> Int #basicUnsafeSlice :: Int -> Int -> Vector (Bottleneck a) -> Vector (Bottleneck a) #basicUnsafeIndexM :: Monad m => Vector (Bottleneck a) -> Int -> m (Bottleneck a) #basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (Bottleneck a) -> Vector (Bottleneck a) -> m () #elemseq :: Vector (Bottleneck a) -> Bottleneck a -> b -> b # Source # MethodsbasicLength :: MVector s (Bottleneck a) -> Int #basicUnsafeSlice :: Int -> Int -> MVector s (Bottleneck a) -> MVector s (Bottleneck a) #basicOverlaps :: MVector s (Bottleneck a) -> MVector s (Bottleneck a) -> Bool #basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (Bottleneck a)) #basicInitialize :: PrimMonad m => MVector (PrimState m) (Bottleneck a) -> m () #basicUnsafeReplicate :: PrimMonad m => Int -> Bottleneck a -> m (MVector (PrimState m) (Bottleneck a)) #basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (Bottleneck a) -> Int -> m (Bottleneck a) #basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (Bottleneck a) -> Int -> Bottleneck a -> m () #basicClear :: PrimMonad m => MVector (PrimState m) (Bottleneck a) -> m () #basicSet :: PrimMonad m => MVector (PrimState m) (Bottleneck a) -> Bottleneck a -> m () #basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (Bottleneck a) -> MVector (PrimState m) (Bottleneck a) -> m () #basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (Bottleneck a) -> MVector (PrimState m) (Bottleneck a) -> m () #basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (Bottleneck a) -> Int -> m (MVector (PrimState m) (Bottleneck a)) # Bounded a => Bounded (Bottleneck a) Source # Methods Enum a => Enum (Bottleneck a) Source # Methodssucc :: Bottleneck a -> Bottleneck a #pred :: Bottleneck a -> Bottleneck a #toEnum :: Int -> Bottleneck a #fromEnum :: Bottleneck a -> Int #enumFrom :: Bottleneck a -> [Bottleneck a] #enumFromThen :: Bottleneck a -> Bottleneck a -> [Bottleneck a] #enumFromTo :: Bottleneck a -> Bottleneck a -> [Bottleneck a] #enumFromThenTo :: Bottleneck a -> Bottleneck a -> Bottleneck a -> [Bottleneck a] # Eq a => Eq (Bottleneck a) Source # Methods(==) :: Bottleneck a -> Bottleneck a -> Bool #(/=) :: Bottleneck a -> Bottleneck a -> Bool # Source # Methods(/) :: Bottleneck a -> Bottleneck a -> Bottleneck a #recip :: Bottleneck a -> Bottleneck a # Num a => Num (Bottleneck a) Source # Methods(+) :: Bottleneck a -> Bottleneck a -> Bottleneck a #(-) :: Bottleneck a -> Bottleneck a -> Bottleneck a #(*) :: Bottleneck a -> Bottleneck a -> Bottleneck a #negate :: Bottleneck a -> Bottleneck a #abs :: Bottleneck a -> Bottleneck a #signum :: Bottleneck a -> Bottleneck a # Ord a => Ord (Bottleneck a) Source # Methodscompare :: Bottleneck a -> Bottleneck a -> Ordering #(<) :: Bottleneck a -> Bottleneck a -> Bool #(<=) :: Bottleneck a -> Bottleneck a -> Bool #(>) :: Bottleneck a -> Bottleneck a -> Bool #(>=) :: Bottleneck a -> Bottleneck a -> Bool #max :: Bottleneck a -> Bottleneck a -> Bottleneck a #min :: Bottleneck a -> Bottleneck a -> Bottleneck a # Read a => Read (Bottleneck a) Source # MethodsreadsPrec :: Int -> ReadS (Bottleneck a) # Real a => Real (Bottleneck a) Source # Methods RealFrac a => RealFrac (Bottleneck a) Source # MethodsproperFraction :: Integral b => Bottleneck a -> (b, Bottleneck a) #truncate :: Integral b => Bottleneck a -> b #round :: Integral b => Bottleneck a -> b #ceiling :: Integral b => Bottleneck a -> b #floor :: Integral b => Bottleneck a -> b # Show a => Show (Bottleneck a) Source # MethodsshowsPrec :: Int -> Bottleneck a -> ShowS #show :: Bottleneck a -> String #showList :: [Bottleneck a] -> ShowS # Source # Associated Typestype Rep (Bottleneck a) :: * -> * # Methodsfrom :: Bottleneck a -> Rep (Bottleneck a) x #to :: Rep (Bottleneck a) x -> Bottleneck a # Storable a => Storable (Bottleneck a) Source # MethodssizeOf :: Bottleneck a -> Int #alignment :: Bottleneck a -> Int #peekElemOff :: Ptr (Bottleneck a) -> Int -> IO (Bottleneck a) #pokeElemOff :: Ptr (Bottleneck a) -> Int -> Bottleneck a -> IO () #peekByteOff :: Ptr b -> Int -> IO (Bottleneck a) #pokeByteOff :: Ptr b -> Int -> Bottleneck a -> IO () #peek :: Ptr (Bottleneck a) -> IO (Bottleneck a) #poke :: Ptr (Bottleneck a) -> Bottleneck a -> IO () # NFData a => NFData (Bottleneck a) Source # Methodsrnf :: Bottleneck a -> () # (Bounded a, Ord a) => DetectableZero (Bottleneck a) Source # Methods (Bounded a, Ord a) => Semiring (Bottleneck a) Source # Methods(<.>) :: Bottleneck a -> Bottleneck a -> Bottleneck a Source #(<+>) :: Bottleneck a -> Bottleneck a -> Bottleneck a Source #add :: [Bottleneck a] -> Bottleneck a Source #mul :: [Bottleneck a] -> Bottleneck a Source # type Rep1 Bottleneck Source # type Rep1 Bottleneck = D1 (MetaData "Bottleneck" "Data.Semiring.Numeric" "semiring-num-1.6.0.1-8yxfjgH769H6fJUPVjj5lJ" True) (C1 (MetaCons "Bottleneck" PrefixI True) (S1 (MetaSel (Just Symbol "getBottleneck") NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)) data MVector s (Bottleneck a) Source # data MVector s (Bottleneck a) = MV_Bottleneck (MVector s a) type Rep (Bottleneck a) Source # type Rep (Bottleneck a) = D1 (MetaData "Bottleneck" "Data.Semiring.Numeric" "semiring-num-1.6.0.1-8yxfjgH769H6fJUPVjj5lJ" True) (C1 (MetaCons "Bottleneck" PrefixI True) (S1 (MetaSel (Just Symbol "getBottleneck") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))) data Vector (Bottleneck a) Source # data Vector (Bottleneck a) = V_Bottleneck (Vector a) newtype Division a Source # Positive numbers only. (<+>) = gcd (<.>) = lcm zero = zero one = one Constructors  Division FieldsgetDivision :: a Instances  Source # Methodsfmap :: (a -> b) -> Division a -> Division b #(<) :: a -> Division b -> Division a # Source # Methodsfold :: Monoid m => Division m -> m #foldMap :: Monoid m => (a -> m) -> Division a -> m #foldr :: (a -> b -> b) -> b -> Division a -> b #foldr' :: (a -> b -> b) -> b -> Division a -> b #foldl :: (b -> a -> b) -> b -> Division a -> b #foldl' :: (b -> a -> b) -> b -> Division a -> b #foldr1 :: (a -> a -> a) -> Division a -> a #foldl1 :: (a -> a -> a) -> Division a -> a #toList :: Division a -> [a] #null :: Division a -> Bool #length :: Division a -> Int #elem :: Eq a => a -> Division a -> Bool #maximum :: Ord a => Division a -> a #minimum :: Ord a => Division a -> a #sum :: Num a => Division a -> a #product :: Num a => Division a -> a # Source # Methodstraverse :: Applicative f => (a -> f b) -> Division a -> f (Division b) #sequenceA :: Applicative f => Division (f a) -> f (Division a) #mapM :: Monad m => (a -> m b) -> Division a -> m (Division b) #sequence :: Monad m => Division (m a) -> m (Division a) # Source # Associated Typestype Rep1 (Division :: * -> *) :: * -> * # Methodsfrom1 :: Division a -> Rep1 Division a #to1 :: Rep1 Division a -> Division a # Source # MethodsliftEq :: (a -> b -> Bool) -> Division a -> Division b -> Bool # Source # MethodsliftCompare :: (a -> b -> Ordering) -> Division a -> Division b -> Ordering # Source # MethodsliftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Division a) #liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Division a] # Source # MethodsliftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Division a -> ShowS #liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Division a] -> ShowS # Unbox a => Vector Vector (Division a) Source # MethodsbasicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (Division a) -> m (Vector (Division a)) #basicUnsafeThaw :: PrimMonad m => Vector (Division a) -> m (Mutable Vector (PrimState m) (Division a)) #basicLength :: Vector (Division a) -> Int #basicUnsafeSlice :: Int -> Int -> Vector (Division a) -> Vector (Division a) #basicUnsafeIndexM :: Monad m => Vector (Division a) -> Int -> m (Division a) #basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (Division a) -> Vector (Division a) -> m () #elemseq :: Vector (Division a) -> Division a -> b -> b # Unbox a => MVector MVector (Division a) Source # MethodsbasicLength :: MVector s (Division a) -> Int #basicUnsafeSlice :: Int -> Int -> MVector s (Division a) -> MVector s (Division a) #basicOverlaps :: MVector s (Division a) -> MVector s (Division a) -> Bool #basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (Division a)) #basicInitialize :: PrimMonad m => MVector (PrimState m) (Division a) -> m () #basicUnsafeReplicate :: PrimMonad m => Int -> Division a -> m (MVector (PrimState m) (Division a)) #basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (Division a) -> Int -> m (Division a) #basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (Division a) -> Int -> Division a -> m () #basicClear :: PrimMonad m => MVector (PrimState m) (Division a) -> m () #basicSet :: PrimMonad m => MVector (PrimState m) (Division a) -> Division a -> m () #basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (Division a) -> MVector (PrimState m) (Division a) -> m () #basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (Division a) -> MVector (PrimState m) (Division a) -> m () #basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (Division a) -> Int -> m (MVector (PrimState m) (Division a)) # Bounded a => Bounded (Division a) Source # Methods Enum a => Enum (Division a) Source # Methodssucc :: Division a -> Division a #pred :: Division a -> Division a #toEnum :: Int -> Division a #fromEnum :: Division a -> Int #enumFrom :: Division a -> [Division a] #enumFromThen :: Division a -> Division a -> [Division a] #enumFromTo :: Division a -> Division a -> [Division a] #enumFromThenTo :: Division a -> Division a -> Division a -> [Division a] # Eq a => Eq (Division a) Source # Methods(==) :: Division a -> Division a -> Bool #(/=) :: Division a -> Division a -> Bool # Fractional a => Fractional (Division a) Source # Methods(/) :: Division a -> Division a -> Division a #recip :: Division a -> Division a # Num a => Num (Division a) Source # Methods(+) :: Division a -> Division a -> Division a #(-) :: Division a -> Division a -> Division a #(*) :: Division a -> Division a -> Division a #negate :: Division a -> Division a #abs :: Division a -> Division a #signum :: Division a -> Division a # Ord a => Ord (Division a) Source # Methodscompare :: Division a -> Division a -> Ordering #(<) :: Division a -> Division a -> Bool #(<=) :: Division a -> Division a -> Bool #(>) :: Division a -> Division a -> Bool #(>=) :: Division a -> Division a -> Bool #max :: Division a -> Division a -> Division a #min :: Division a -> Division a -> Division a # Read a => Read (Division a) Source # MethodsreadsPrec :: Int -> ReadS (Division a) # Real a => Real (Division a) Source # Methods RealFrac a => RealFrac (Division a) Source # MethodsproperFraction :: Integral b => Division a -> (b, Division a) #truncate :: Integral b => Division a -> b #round :: Integral b => Division a -> b #ceiling :: Integral b => Division a -> b #floor :: Integral b => Division a -> b # Show a => Show (Division a) Source # MethodsshowsPrec :: Int -> Division a -> ShowS #show :: Division a -> String #showList :: [Division a] -> ShowS # Source # Associated Typestype Rep (Division a) :: * -> * # Methodsfrom :: Division a -> Rep (Division a) x #to :: Rep (Division a) x -> Division a # Storable a => Storable (Division a) Source # MethodssizeOf :: Division a -> Int #alignment :: Division a -> Int #peekElemOff :: Ptr (Division a) -> Int -> IO (Division a) #pokeElemOff :: Ptr (Division a) -> Int -> Division a -> IO () #peekByteOff :: Ptr b -> Int -> IO (Division a) #pokeByteOff :: Ptr b -> Int -> Division a -> IO () #peek :: Ptr (Division a) -> IO (Division a) #poke :: Ptr (Division a) -> Division a -> IO () # NFData a => NFData (Division a) Source # Methodsrnf :: Division a -> () # (Integral a, DetectableZero a) => DetectableZero (Division a) Source # Methods (Integral a, Semiring a) => Semiring (Division a) Source # Only expects positive numbers Methods(<.>) :: Division a -> Division a -> Division a Source #(<+>) :: Division a -> Division a -> Division a Source #add :: [Division a] -> Division a Source #mul :: [Division a] -> Division a Source # type Rep1 Division Source # type Rep1 Division = D1 (MetaData "Division" "Data.Semiring.Numeric" "semiring-num-1.6.0.1-8yxfjgH769H6fJUPVjj5lJ" True) (C1 (MetaCons "Division" PrefixI True) (S1 (MetaSel (Just Symbol "getDivision") NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)) data MVector s (Division a) Source # data MVector s (Division a) = MV_Division (MVector s a) type Rep (Division a) Source # type Rep (Division a) = D1 (MetaData "Division" "Data.Semiring.Numeric" "semiring-num-1.6.0.1-8yxfjgH769H6fJUPVjj5lJ" True) (C1 (MetaCons "Division" PrefixI True) (S1 (MetaSel (Just Symbol "getDivision") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))) data Vector (Division a) Source # data Vector (Division a) = V_Division (Vector a)

newtype Łukasiewicz a Source #

Wikipedia has some information on this. Also this paper.

(<+>)   = max
x <.> y = max 0 (x + y - 1)
zero    = zero
one     = one

Constructors

 Łukasiewicz FieldsgetŁukasiewicz :: a

Instances

 Source # Methodsfmap :: (a -> b) -> Łukasiewicz a -> Łukasiewicz b #(<) :: a -> Łukasiewicz b -> Łukasiewicz a # Source # Methodsfold :: Monoid m => Łukasiewicz m -> m #foldMap :: Monoid m => (a -> m) -> Łukasiewicz a -> m #foldr :: (a -> b -> b) -> b -> Łukasiewicz a -> b #foldr' :: (a -> b -> b) -> b -> Łukasiewicz a -> b #foldl :: (b -> a -> b) -> b -> Łukasiewicz a -> b #foldl' :: (b -> a -> b) -> b -> Łukasiewicz a -> b #foldr1 :: (a -> a -> a) -> Łukasiewicz a -> a #foldl1 :: (a -> a -> a) -> Łukasiewicz a -> a #toList :: Łukasiewicz a -> [a] #null :: Łukasiewicz a -> Bool #length :: Łukasiewicz a -> Int #elem :: Eq a => a -> Łukasiewicz a -> Bool #maximum :: Ord a => Łukasiewicz a -> a #minimum :: Ord a => Łukasiewicz a -> a #sum :: Num a => Łukasiewicz a -> a #product :: Num a => Łukasiewicz a -> a # Source # Methodstraverse :: Applicative f => (a -> f b) -> Łukasiewicz a -> f (Łukasiewicz b) #sequenceA :: Applicative f => Łukasiewicz (f a) -> f (Łukasiewicz a) #mapM :: Monad m => (a -> m b) -> Łukasiewicz a -> m (Łukasiewicz b) #sequence :: Monad m => Łukasiewicz (m a) -> m (Łukasiewicz a) # Source # Associated Typestype Rep1 (Łukasiewicz :: * -> *) :: * -> * # Methods Source # MethodsliftEq :: (a -> b -> Bool) -> Łukasiewicz a -> Łukasiewicz b -> Bool # Source # MethodsliftCompare :: (a -> b -> Ordering) -> Łukasiewicz a -> Łukasiewicz b -> Ordering # Source # MethodsliftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Łukasiewicz a) #liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Łukasiewicz a] # Source # MethodsliftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Łukasiewicz a -> ShowS #liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Łukasiewicz a] -> ShowS # Unbox a => Vector Vector (Łukasiewicz a) Source # MethodsbasicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (Łukasiewicz a) -> m (Vector (Łukasiewicz a)) #basicUnsafeThaw :: PrimMonad m => Vector (Łukasiewicz a) -> m (Mutable Vector (PrimState m) (Łukasiewicz a)) #basicLength :: Vector (Łukasiewicz a) -> Int #basicUnsafeSlice :: Int -> Int -> Vector (Łukasiewicz a) -> Vector (Łukasiewicz a) #basicUnsafeIndexM :: Monad m => Vector (Łukasiewicz a) -> Int -> m (Łukasiewicz a) #basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (Łukasiewicz a) -> Vector (Łukasiewicz a) -> m () #elemseq :: Vector (Łukasiewicz a) -> Łukasiewicz a -> b -> b # Source # MethodsbasicLength :: MVector s (Łukasiewicz a) -> Int #basicUnsafeSlice :: Int -> Int -> MVector s (Łukasiewicz a) -> MVector s (Łukasiewicz a) #basicOverlaps :: MVector s (Łukasiewicz a) -> MVector s (Łukasiewicz a) -> Bool #basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (Łukasiewicz a)) #basicInitialize :: PrimMonad m => MVector (PrimState m) (Łukasiewicz a) -> m () #basicUnsafeReplicate :: PrimMonad m => Int -> Łukasiewicz a -> m (MVector (PrimState m) (Łukasiewicz a)) #basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (Łukasiewicz a) -> Int -> m (Łukasiewicz a) #basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (Łukasiewicz a) -> Int -> Łukasiewicz a -> m () #basicClear :: PrimMonad m => MVector (PrimState m) (Łukasiewicz a) -> m () #basicSet :: PrimMonad m => MVector (PrimState m) (Łukasiewicz a) -> Łukasiewicz a -> m () #basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (Łukasiewicz a) -> MVector (PrimState m) (Łukasiewicz a) -> m () #basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (Łukasiewicz a) -> MVector (PrimState m) (Łukasiewicz a) -> m () #basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (Łukasiewicz a) -> Int -> m (MVector (PrimState m) (Łukasiewicz a)) # Bounded a => Bounded (Łukasiewicz a) Source # Methods Enum a => Enum (Łukasiewicz a) Source # Methodssucc :: Łukasiewicz a -> Łukasiewicz a #pred :: Łukasiewicz a -> Łukasiewicz a #fromEnum :: Łukasiewicz a -> Int #enumFrom :: Łukasiewicz a -> [Łukasiewicz a] #enumFromThen :: Łukasiewicz a -> Łukasiewicz a -> [Łukasiewicz a] #enumFromTo :: Łukasiewicz a -> Łukasiewicz a -> [Łukasiewicz a] #enumFromThenTo :: Łukasiewicz a -> Łukasiewicz a -> Łukasiewicz a -> [Łukasiewicz a] # Eq a => Eq (Łukasiewicz a) Source # Methods(==) :: Łukasiewicz a -> Łukasiewicz a -> Bool #(/=) :: Łukasiewicz a -> Łukasiewicz a -> Bool # Source # Methods(/) :: Łukasiewicz a -> Łukasiewicz a -> Łukasiewicz a #recip :: Łukasiewicz a -> Łukasiewicz a # Num a => Num (Łukasiewicz a) Source # Methods(+) :: Łukasiewicz a -> Łukasiewicz a -> Łukasiewicz a #(-) :: Łukasiewicz a -> Łukasiewicz a -> Łukasiewicz a #(*) :: Łukasiewicz a -> Łukasiewicz a -> Łukasiewicz a #abs :: Łukasiewicz a -> Łukasiewicz a # Ord a => Ord (Łukasiewicz a) Source # Methodscompare :: Łukasiewicz a -> Łukasiewicz a -> Ordering #(<) :: Łukasiewicz a -> Łukasiewicz a -> Bool #(<=) :: Łukasiewicz a -> Łukasiewicz a -> Bool #(>) :: Łukasiewicz a -> Łukasiewicz a -> Bool #(>=) :: Łukasiewicz a -> Łukasiewicz a -> Bool #max :: Łukasiewicz a -> Łukasiewicz a -> Łukasiewicz a #min :: Łukasiewicz a -> Łukasiewicz a -> Łukasiewicz a # Read a => Read (Łukasiewicz a) Source # Methods Real a => Real (Łukasiewicz a) Source # Methods RealFrac a => RealFrac (Łukasiewicz a) Source # MethodsproperFraction :: Integral b => Łukasiewicz a -> (b, Łukasiewicz a) #truncate :: Integral b => Łukasiewicz a -> b #round :: Integral b => Łukasiewicz a -> b #ceiling :: Integral b => Łukasiewicz a -> b #floor :: Integral b => Łukasiewicz a -> b # Show a => Show (Łukasiewicz a) Source # MethodsshowsPrec :: Int -> Łukasiewicz a -> ShowS #show :: Łukasiewicz a -> String #showList :: [Łukasiewicz a] -> ShowS # Source # Associated Typestype Rep (Łukasiewicz a) :: * -> * # Methodsfrom :: Łukasiewicz a -> Rep (Łukasiewicz a) x #to :: Rep (Łukasiewicz a) x -> Łukasiewicz a # Storable a => Storable (Łukasiewicz a) Source # MethodssizeOf :: Łukasiewicz a -> Int #alignment :: Łukasiewicz a -> Int #peekElemOff :: Ptr (Łukasiewicz a) -> Int -> IO (Łukasiewicz a) #pokeElemOff :: Ptr (Łukasiewicz a) -> Int -> Łukasiewicz a -> IO () #peekByteOff :: Ptr b -> Int -> IO (Łukasiewicz a) #pokeByteOff :: Ptr b -> Int -> Łukasiewicz a -> IO () #peek :: Ptr (Łukasiewicz a) -> IO (Łukasiewicz a) #poke :: Ptr (Łukasiewicz a) -> Łukasiewicz a -> IO () # NFData a => NFData (Łukasiewicz a) Source # Methodsrnf :: Łukasiewicz a -> () # (Ord a, Num a) => DetectableZero (Łukasiewicz a) Source # Methods (Ord a, Num a) => Semiring (Łukasiewicz a) Source # Methodsadd :: [Łukasiewicz a] -> Łukasiewicz a Source #mul :: [Łukasiewicz a] -> Łukasiewicz a Source # type Rep1 Łukasiewicz Source # type Rep1 Łukasiewicz = D1 (MetaData "\321ukasiewicz" "Data.Semiring.Numeric" "semiring-num-1.6.0.1-8yxfjgH769H6fJUPVjj5lJ" True) (C1 (MetaCons "\321ukasiewicz" PrefixI True) (S1 (MetaSel (Just Symbol "get\321ukasiewicz") NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)) data MVector s (Łukasiewicz a) Source # data MVector s (Łukasiewicz a) = MV_Łukasiewicz (MVector s a) type Rep (Łukasiewicz a) Source # type Rep (Łukasiewicz a) = D1 (MetaData "\321ukasiewicz" "Data.Semiring.Numeric" "semiring-num-1.6.0.1-8yxfjgH769H6fJUPVjj5lJ" True) (C1 (MetaCons "\321ukasiewicz" PrefixI True) (S1 (MetaSel (Just Symbol "get\321ukasiewicz") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))) data Vector (Łukasiewicz a) Source # data Vector (Łukasiewicz a) = V_Łukasiewicz (Vector a) newtype Viterbi a Source # Wikipedia has some information on this. Also this paper. Apparently used for probabilistic parsing. (<+>) = max (<.>) = (<.>) zero = zero one = one Constructors  Viterbi FieldsgetViterbi :: a Instances  Source # Methodsfmap :: (a -> b) -> Viterbi a -> Viterbi b #(<) :: a -> Viterbi b -> Viterbi a # Source # Methodsfold :: Monoid m => Viterbi m -> m #foldMap :: Monoid m => (a -> m) -> Viterbi a -> m #foldr :: (a -> b -> b) -> b -> Viterbi a -> b #foldr' :: (a -> b -> b) -> b -> Viterbi a -> b #foldl :: (b -> a -> b) -> b -> Viterbi a -> b #foldl' :: (b -> a -> b) -> b -> Viterbi a -> b #foldr1 :: (a -> a -> a) -> Viterbi a -> a #foldl1 :: (a -> a -> a) -> Viterbi a -> a #toList :: Viterbi a -> [a] #null :: Viterbi a -> Bool #length :: Viterbi a -> Int #elem :: Eq a => a -> Viterbi a -> Bool #maximum :: Ord a => Viterbi a -> a #minimum :: Ord a => Viterbi a -> a #sum :: Num a => Viterbi a -> a #product :: Num a => Viterbi a -> a # Source # Methodstraverse :: Applicative f => (a -> f b) -> Viterbi a -> f (Viterbi b) #sequenceA :: Applicative f => Viterbi (f a) -> f (Viterbi a) #mapM :: Monad m => (a -> m b) -> Viterbi a -> m (Viterbi b) #sequence :: Monad m => Viterbi (m a) -> m (Viterbi a) # Source # Associated Typestype Rep1 (Viterbi :: * -> *) :: * -> * # Methodsfrom1 :: Viterbi a -> Rep1 Viterbi a #to1 :: Rep1 Viterbi a -> Viterbi a # Source # MethodsliftEq :: (a -> b -> Bool) -> Viterbi a -> Viterbi b -> Bool # Source # MethodsliftCompare :: (a -> b -> Ordering) -> Viterbi a -> Viterbi b -> Ordering # Source # MethodsliftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Viterbi a) #liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Viterbi a] # Source # MethodsliftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Viterbi a -> ShowS #liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Viterbi a] -> ShowS # Unbox a => Vector Vector (Viterbi a) Source # MethodsbasicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (Viterbi a) -> m (Vector (Viterbi a)) #basicUnsafeThaw :: PrimMonad m => Vector (Viterbi a) -> m (Mutable Vector (PrimState m) (Viterbi a)) #basicLength :: Vector (Viterbi a) -> Int #basicUnsafeSlice :: Int -> Int -> Vector (Viterbi a) -> Vector (Viterbi a) #basicUnsafeIndexM :: Monad m => Vector (Viterbi a) -> Int -> m (Viterbi a) #basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (Viterbi a) -> Vector (Viterbi a) -> m () #elemseq :: Vector (Viterbi a) -> Viterbi a -> b -> b # Unbox a => MVector MVector (Viterbi a) Source # MethodsbasicLength :: MVector s (Viterbi a) -> Int #basicUnsafeSlice :: Int -> Int -> MVector s (Viterbi a) -> MVector s (Viterbi a) #basicOverlaps :: MVector s (Viterbi a) -> MVector s (Viterbi a) -> Bool #basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (Viterbi a)) #basicInitialize :: PrimMonad m => MVector (PrimState m) (Viterbi a) -> m () #basicUnsafeReplicate :: PrimMonad m => Int -> Viterbi a -> m (MVector (PrimState m) (Viterbi a)) #basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (Viterbi a) -> Int -> m (Viterbi a) #basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (Viterbi a) -> Int -> Viterbi a -> m () #basicClear :: PrimMonad m => MVector (PrimState m) (Viterbi a) -> m () #basicSet :: PrimMonad m => MVector (PrimState m) (Viterbi a) -> Viterbi a -> m () #basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (Viterbi a) -> MVector (PrimState m) (Viterbi a) -> m () #basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (Viterbi a) -> MVector (PrimState m) (Viterbi a) -> m () #basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (Viterbi a) -> Int -> m (MVector (PrimState m) (Viterbi a)) # Bounded a => Bounded (Viterbi a) Source # Methods Enum a => Enum (Viterbi a) Source # Methodssucc :: Viterbi a -> Viterbi a #pred :: Viterbi a -> Viterbi a #toEnum :: Int -> Viterbi a #fromEnum :: Viterbi a -> Int #enumFrom :: Viterbi a -> [Viterbi a] #enumFromThen :: Viterbi a -> Viterbi a -> [Viterbi a] #enumFromTo :: Viterbi a -> Viterbi a -> [Viterbi a] #enumFromThenTo :: Viterbi a -> Viterbi a -> Viterbi a -> [Viterbi a] # Eq a => Eq (Viterbi a) Source # Methods(==) :: Viterbi a -> Viterbi a -> Bool #(/=) :: Viterbi a -> Viterbi a -> Bool # Fractional a => Fractional (Viterbi a) Source # Methods(/) :: Viterbi a -> Viterbi a -> Viterbi a #recip :: Viterbi a -> Viterbi a # Num a => Num (Viterbi a) Source # Methods(+) :: Viterbi a -> Viterbi a -> Viterbi a #(-) :: Viterbi a -> Viterbi a -> Viterbi a #(*) :: Viterbi a -> Viterbi a -> Viterbi a #negate :: Viterbi a -> Viterbi a #abs :: Viterbi a -> Viterbi a #signum :: Viterbi a -> Viterbi a # Ord a => Ord (Viterbi a) Source # Methodscompare :: Viterbi a -> Viterbi a -> Ordering #(<) :: Viterbi a -> Viterbi a -> Bool #(<=) :: Viterbi a -> Viterbi a -> Bool #(>) :: Viterbi a -> Viterbi a -> Bool #(>=) :: Viterbi a -> Viterbi a -> Bool #max :: Viterbi a -> Viterbi a -> Viterbi a #min :: Viterbi a -> Viterbi a -> Viterbi a # Read a => Read (Viterbi a) Source # MethodsreadsPrec :: Int -> ReadS (Viterbi a) # Real a => Real (Viterbi a) Source # Methods RealFrac a => RealFrac (Viterbi a) Source # MethodsproperFraction :: Integral b => Viterbi a -> (b, Viterbi a) #truncate :: Integral b => Viterbi a -> b #round :: Integral b => Viterbi a -> b #ceiling :: Integral b => Viterbi a -> b #floor :: Integral b => Viterbi a -> b # Show a => Show (Viterbi a) Source # MethodsshowsPrec :: Int -> Viterbi a -> ShowS #show :: Viterbi a -> String #showList :: [Viterbi a] -> ShowS # Source # Associated Typestype Rep (Viterbi a) :: * -> * # Methodsfrom :: Viterbi a -> Rep (Viterbi a) x #to :: Rep (Viterbi a) x -> Viterbi a # Storable a => Storable (Viterbi a) Source # MethodssizeOf :: Viterbi a -> Int #alignment :: Viterbi a -> Int #peekElemOff :: Ptr (Viterbi a) -> Int -> IO (Viterbi a) #pokeElemOff :: Ptr (Viterbi a) -> Int -> Viterbi a -> IO () #peekByteOff :: Ptr b -> Int -> IO (Viterbi a) #pokeByteOff :: Ptr b -> Int -> Viterbi a -> IO () #peek :: Ptr (Viterbi a) -> IO (Viterbi a) #poke :: Ptr (Viterbi a) -> Viterbi a -> IO () # NFData a => NFData (Viterbi a) Source # Methodsrnf :: Viterbi a -> () # (Ord a, DetectableZero a) => DetectableZero (Viterbi a) Source # MethodsisZero :: Viterbi a -> Bool Source # (Ord a, Semiring a) => Semiring (Viterbi a) Source # Methods(<.>) :: Viterbi a -> Viterbi a -> Viterbi a Source #(<+>) :: Viterbi a -> Viterbi a -> Viterbi a Source #add :: [Viterbi a] -> Viterbi a Source #mul :: [Viterbi a] -> Viterbi a Source # type Rep1 Viterbi Source # type Rep1 Viterbi = D1 (MetaData "Viterbi" "Data.Semiring.Numeric" "semiring-num-1.6.0.1-8yxfjgH769H6fJUPVjj5lJ" True) (C1 (MetaCons "Viterbi" PrefixI True) (S1 (MetaSel (Just Symbol "getViterbi") NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)) data MVector s (Viterbi a) Source # data MVector s (Viterbi a) = MV_Viterbi (MVector s a) type Rep (Viterbi a) Source # type Rep (Viterbi a) = D1 (MetaData "Viterbi" "Data.Semiring.Numeric" "semiring-num-1.6.0.1-8yxfjgH769H6fJUPVjj5lJ" True) (C1 (MetaCons "Viterbi" PrefixI True) (S1 (MetaSel (Just Symbol "getViterbi") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))) data Vector (Viterbi a) Source # data Vector (Viterbi a) = V_Viterbi (Vector a)

newtype PosFrac a Source #

Adds a star operation to fractional types.

(<+>)  = (<+>)
(<.>)  = (<.>)
zero   = zero
one    = one
star x = if x < 1 then 1 / (1 - x) else positiveInfinity

Constructors

 PosFrac FieldsgetPosFrac :: a

Instances

 Source # Methodsfmap :: (a -> b) -> PosFrac a -> PosFrac b #(<) :: a -> PosFrac b -> PosFrac a # Source # Methodsfold :: Monoid m => PosFrac m -> m #foldMap :: Monoid m => (a -> m) -> PosFrac a -> m #foldr :: (a -> b -> b) -> b -> PosFrac a -> b #foldr' :: (a -> b -> b) -> b -> PosFrac a -> b #foldl :: (b -> a -> b) -> b -> PosFrac a -> b #foldl' :: (b -> a -> b) -> b -> PosFrac a -> b #foldr1 :: (a -> a -> a) -> PosFrac a -> a #foldl1 :: (a -> a -> a) -> PosFrac a -> a #toList :: PosFrac a -> [a] #null :: PosFrac a -> Bool #length :: PosFrac a -> Int #elem :: Eq a => a -> PosFrac a -> Bool #maximum :: Ord a => PosFrac a -> a #minimum :: Ord a => PosFrac a -> a #sum :: Num a => PosFrac a -> a #product :: Num a => PosFrac a -> a # Source # Methodstraverse :: Applicative f => (a -> f b) -> PosFrac a -> f (PosFrac b) #sequenceA :: Applicative f => PosFrac (f a) -> f (PosFrac a) #mapM :: Monad m => (a -> m b) -> PosFrac a -> m (PosFrac b) #sequence :: Monad m => PosFrac (m a) -> m (PosFrac a) # Source # Associated Typestype Rep1 (PosFrac :: * -> *) :: * -> * # Methodsfrom1 :: PosFrac a -> Rep1 PosFrac a #to1 :: Rep1 PosFrac a -> PosFrac a # Source # MethodsliftEq :: (a -> b -> Bool) -> PosFrac a -> PosFrac b -> Bool # Source # MethodsliftCompare :: (a -> b -> Ordering) -> PosFrac a -> PosFrac b -> Ordering # Source # MethodsliftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (PosFrac a) #liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [PosFrac a] # Source # MethodsliftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> PosFrac a -> ShowS #liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [PosFrac a] -> ShowS # Unbox a => Vector Vector (PosFrac a) Source # MethodsbasicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (PosFrac a) -> m (Vector (PosFrac a)) #basicUnsafeThaw :: PrimMonad m => Vector (PosFrac a) -> m (Mutable Vector (PrimState m) (PosFrac a)) #basicLength :: Vector (PosFrac a) -> Int #basicUnsafeSlice :: Int -> Int -> Vector (PosFrac a) -> Vector (PosFrac a) #basicUnsafeIndexM :: Monad m => Vector (PosFrac a) -> Int -> m (PosFrac a) #basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (PosFrac a) -> Vector (PosFrac a) -> m () #elemseq :: Vector (PosFrac a) -> PosFrac a -> b -> b # Unbox a => MVector MVector (PosFrac a) Source # MethodsbasicLength :: MVector s (PosFrac a) -> Int #basicUnsafeSlice :: Int -> Int -> MVector s (PosFrac a) -> MVector s (PosFrac a) #basicOverlaps :: MVector s (PosFrac a) -> MVector s (PosFrac a) -> Bool #basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (PosFrac a)) #basicInitialize :: PrimMonad m => MVector (PrimState m) (PosFrac a) -> m () #basicUnsafeReplicate :: PrimMonad m => Int -> PosFrac a -> m (MVector (PrimState m) (PosFrac a)) #basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (PosFrac a) -> Int -> m (PosFrac a) #basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (PosFrac a) -> Int -> PosFrac a -> m () #basicClear :: PrimMonad m => MVector (PrimState m) (PosFrac a) -> m () #basicSet :: PrimMonad m => MVector (PrimState m) (PosFrac a) -> PosFrac a -> m () #basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (PosFrac a) -> MVector (PrimState m) (PosFrac a) -> m () #basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (PosFrac a) -> MVector (PrimState m) (PosFrac a) -> m () #basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (PosFrac a) -> Int -> m (MVector (PrimState m) (PosFrac a)) # (Bounded a, Semiring a) => Bounded (PosFrac a) Source # Methods Enum a => Enum (PosFrac a) Source # Methodssucc :: PosFrac a -> PosFrac a #pred :: PosFrac a -> PosFrac a #toEnum :: Int -> PosFrac a #fromEnum :: PosFrac a -> Int #enumFrom :: PosFrac a -> [PosFrac a] #enumFromThen :: PosFrac a -> PosFrac a -> [PosFrac a] #enumFromTo :: PosFrac a -> PosFrac a -> [PosFrac a] #enumFromThenTo :: PosFrac a -> PosFrac a -> PosFrac a -> [PosFrac a] # Eq a => Eq (PosFrac a) Source # Methods(==) :: PosFrac a -> PosFrac a -> Bool #(/=) :: PosFrac a -> PosFrac a -> Bool # Fractional a => Fractional (PosFrac a) Source # Methods(/) :: PosFrac a -> PosFrac a -> PosFrac a #recip :: PosFrac a -> PosFrac a # Num a => Num (PosFrac a) Source # Methods(+) :: PosFrac a -> PosFrac a -> PosFrac a #(-) :: PosFrac a -> PosFrac a -> PosFrac a #(*) :: PosFrac a -> PosFrac a -> PosFrac a #negate :: PosFrac a -> PosFrac a #abs :: PosFrac a -> PosFrac a #signum :: PosFrac a -> PosFrac a # Ord a => Ord (PosFrac a) Source # Methodscompare :: PosFrac a -> PosFrac a -> Ordering #(<) :: PosFrac a -> PosFrac a -> Bool #(<=) :: PosFrac a -> PosFrac a -> Bool #(>) :: PosFrac a -> PosFrac a -> Bool #(>=) :: PosFrac a -> PosFrac a -> Bool #max :: PosFrac a -> PosFrac a -> PosFrac a #min :: PosFrac a -> PosFrac a -> PosFrac a # Read a => Read (PosFrac a) Source # MethodsreadsPrec :: Int -> ReadS (PosFrac a) # Real a => Real (PosFrac a) Source # Methods RealFrac a => RealFrac (PosFrac a) Source # MethodsproperFraction :: Integral b => PosFrac a -> (b, PosFrac a) #truncate :: Integral b => PosFrac a -> b #round :: Integral b => PosFrac a -> b #ceiling :: Integral b => PosFrac a -> b #floor :: Integral b => PosFrac a -> b # Show a => Show (PosFrac a) Source # MethodsshowsPrec :: Int -> PosFrac a -> ShowS #show :: PosFrac a -> String #showList :: [PosFrac a] -> ShowS # Source # Associated Typestype Rep (PosFrac a) :: * -> * # Methodsfrom :: PosFrac a -> Rep (PosFrac a) x #to :: Rep (PosFrac a) x -> PosFrac a # Storable a => Storable (PosFrac a) Source # MethodssizeOf :: PosFrac a -> Int #alignment :: PosFrac a -> Int #peekElemOff :: Ptr (PosFrac a) -> Int -> IO (PosFrac a) #pokeElemOff :: Ptr (PosFrac a) -> Int -> PosFrac a -> IO () #peekByteOff :: Ptr b -> Int -> IO (PosFrac a) #pokeByteOff :: Ptr b -> Int -> PosFrac a -> IO () #peek :: Ptr (PosFrac a) -> IO (PosFrac a) #poke :: Ptr (PosFrac a) -> PosFrac a -> IO () # NFData a => NFData (PosFrac a) Source # Methodsrnf :: PosFrac a -> () # Source # MethodsisZero :: PosFrac a -> Bool Source # (Ord a, Fractional a, Semiring a, HasPositiveInfinity a) => StarSemiring (PosFrac a) Source # Methodsstar :: PosFrac a -> PosFrac a Source #plus :: PosFrac a -> PosFrac a Source # Semiring a => Semiring (PosFrac a) Source # Methods(<.>) :: PosFrac a -> PosFrac a -> PosFrac a Source #(<+>) :: PosFrac a -> PosFrac a -> PosFrac a Source #add :: [PosFrac a] -> PosFrac a Source #mul :: [PosFrac a] -> PosFrac a Source # type Rep1 PosFrac Source # type Rep1 PosFrac = D1 (MetaData "PosFrac" "Data.Semiring.Numeric" "semiring-num-1.6.0.1-8yxfjgH769H6fJUPVjj5lJ" True) (C1 (MetaCons "PosFrac" PrefixI True) (S1 (MetaSel (Just Symbol "getPosFrac") NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)) data MVector s (PosFrac a) Source # data MVector s (PosFrac a) = MV_PosFrac (MVector s a) type Rep (PosFrac a) Source # type Rep (PosFrac a) = D1 (MetaData "PosFrac" "Data.Semiring.Numeric" "semiring-num-1.6.0.1-8yxfjgH769H6fJUPVjj5lJ" True) (C1 (MetaCons "PosFrac" PrefixI True) (S1 (MetaSel (Just Symbol "getPosFrac") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))) data Vector (PosFrac a) Source # data Vector (PosFrac a) = V_PosFrac (Vector a) newtype PosInt a Source # Adds a star operation to integral types. (<+>) = (<+>) (<.>) = (<.>) zero = zero one = one star 0 = 1 star _ = positiveInfinity Constructors  PosInt FieldsgetPosInt :: a Instances  Source # Methodsfmap :: (a -> b) -> PosInt a -> PosInt b #(<) :: a -> PosInt b -> PosInt a # Source # Methodsfold :: Monoid m => PosInt m -> m #foldMap :: Monoid m => (a -> m) -> PosInt a -> m #foldr :: (a -> b -> b) -> b -> PosInt a -> b #foldr' :: (a -> b -> b) -> b -> PosInt a -> b #foldl :: (b -> a -> b) -> b -> PosInt a -> b #foldl' :: (b -> a -> b) -> b -> PosInt a -> b #foldr1 :: (a -> a -> a) -> PosInt a -> a #foldl1 :: (a -> a -> a) -> PosInt a -> a #toList :: PosInt a -> [a] #null :: PosInt a -> Bool #length :: PosInt a -> Int #elem :: Eq a => a -> PosInt a -> Bool #maximum :: Ord a => PosInt a -> a #minimum :: Ord a => PosInt a -> a #sum :: Num a => PosInt a -> a #product :: Num a => PosInt a -> a # Source # Methodstraverse :: Applicative f => (a -> f b) -> PosInt a -> f (PosInt b) #sequenceA :: Applicative f => PosInt (f a) -> f (PosInt a) #mapM :: Monad m => (a -> m b) -> PosInt a -> m (PosInt b) #sequence :: Monad m => PosInt (m a) -> m (PosInt a) # Source # Associated Typestype Rep1 (PosInt :: * -> *) :: * -> * # Methodsfrom1 :: PosInt a -> Rep1 PosInt a #to1 :: Rep1 PosInt a -> PosInt a # Source # MethodsliftEq :: (a -> b -> Bool) -> PosInt a -> PosInt b -> Bool # Source # MethodsliftCompare :: (a -> b -> Ordering) -> PosInt a -> PosInt b -> Ordering # Source # MethodsliftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (PosInt a) #liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [PosInt a] # Source # MethodsliftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> PosInt a -> ShowS #liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [PosInt a] -> ShowS # Unbox a => Vector Vector (PosInt a) Source # MethodsbasicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (PosInt a) -> m (Vector (PosInt a)) #basicUnsafeThaw :: PrimMonad m => Vector (PosInt a) -> m (Mutable Vector (PrimState m) (PosInt a)) #basicLength :: Vector (PosInt a) -> Int #basicUnsafeSlice :: Int -> Int -> Vector (PosInt a) -> Vector (PosInt a) #basicUnsafeIndexM :: Monad m => Vector (PosInt a) -> Int -> m (PosInt a) #basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (PosInt a) -> Vector (PosInt a) -> m () #elemseq :: Vector (PosInt a) -> PosInt a -> b -> b # Unbox a => MVector MVector (PosInt a) Source # MethodsbasicLength :: MVector s (PosInt a) -> Int #basicUnsafeSlice :: Int -> Int -> MVector s (PosInt a) -> MVector s (PosInt a) #basicOverlaps :: MVector s (PosInt a) -> MVector s (PosInt a) -> Bool #basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (PosInt a)) #basicInitialize :: PrimMonad m => MVector (PrimState m) (PosInt a) -> m () #basicUnsafeReplicate :: PrimMonad m => Int -> PosInt a -> m (MVector (PrimState m) (PosInt a)) #basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (PosInt a) -> Int -> m (PosInt a) #basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (PosInt a) -> Int -> PosInt a -> m () #basicClear :: PrimMonad m => MVector (PrimState m) (PosInt a) -> m () #basicSet :: PrimMonad m => MVector (PrimState m) (PosInt a) -> PosInt a -> m () #basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (PosInt a) -> MVector (PrimState m) (PosInt a) -> m () #basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (PosInt a) -> MVector (PrimState m) (PosInt a) -> m () #basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (PosInt a) -> Int -> m (MVector (PrimState m) (PosInt a)) # (Bounded a, Semiring a) => Bounded (PosInt a) Source # Methods Enum a => Enum (PosInt a) Source # Methodssucc :: PosInt a -> PosInt a #pred :: PosInt a -> PosInt a #toEnum :: Int -> PosInt a #fromEnum :: PosInt a -> Int #enumFrom :: PosInt a -> [PosInt a] #enumFromThen :: PosInt a -> PosInt a -> [PosInt a] #enumFromTo :: PosInt a -> PosInt a -> [PosInt a] #enumFromThenTo :: PosInt a -> PosInt a -> PosInt a -> [PosInt a] # Eq a => Eq (PosInt a) Source # Methods(==) :: PosInt a -> PosInt a -> Bool #(/=) :: PosInt a -> PosInt a -> Bool # Fractional a => Fractional (PosInt a) Source # Methods(/) :: PosInt a -> PosInt a -> PosInt a #recip :: PosInt a -> PosInt a # Num a => Num (PosInt a) Source # Methods(+) :: PosInt a -> PosInt a -> PosInt a #(-) :: PosInt a -> PosInt a -> PosInt a #(*) :: PosInt a -> PosInt a -> PosInt a #negate :: PosInt a -> PosInt a #abs :: PosInt a -> PosInt a #signum :: PosInt a -> PosInt a # Ord a => Ord (PosInt a) Source # Methodscompare :: PosInt a -> PosInt a -> Ordering #(<) :: PosInt a -> PosInt a -> Bool #(<=) :: PosInt a -> PosInt a -> Bool #(>) :: PosInt a -> PosInt a -> Bool #(>=) :: PosInt a -> PosInt a -> Bool #max :: PosInt a -> PosInt a -> PosInt a #min :: PosInt a -> PosInt a -> PosInt a # Read a => Read (PosInt a) Source # MethodsreadsPrec :: Int -> ReadS (PosInt a) #readList :: ReadS [PosInt a] # Real a => Real (PosInt a) Source # Methods RealFrac a => RealFrac (PosInt a) Source # MethodsproperFraction :: Integral b => PosInt a -> (b, PosInt a) #truncate :: Integral b => PosInt a -> b #round :: Integral b => PosInt a -> b #ceiling :: Integral b => PosInt a -> b #floor :: Integral b => PosInt a -> b # Show a => Show (PosInt a) Source # MethodsshowsPrec :: Int -> PosInt a -> ShowS #show :: PosInt a -> String #showList :: [PosInt a] -> ShowS # Source # Associated Typestype Rep (PosInt a) :: * -> * # Methodsfrom :: PosInt a -> Rep (PosInt a) x #to :: Rep (PosInt a) x -> PosInt a # Storable a => Storable (PosInt a) Source # MethodssizeOf :: PosInt a -> Int #alignment :: PosInt a -> Int #peekElemOff :: Ptr (PosInt a) -> Int -> IO (PosInt a) #pokeElemOff :: Ptr (PosInt a) -> Int -> PosInt a -> IO () #peekByteOff :: Ptr b -> Int -> IO (PosInt a) #pokeByteOff :: Ptr b -> Int -> PosInt a -> IO () #peek :: Ptr (PosInt a) -> IO (PosInt a) #poke :: Ptr (PosInt a) -> PosInt a -> IO () # NFData a => NFData (PosInt a) Source # Methodsrnf :: PosInt a -> () # Source # MethodsisZero :: PosInt a -> Bool Source # (Eq a, Semiring a, HasPositiveInfinity a) => StarSemiring (PosInt a) Source # Methodsstar :: PosInt a -> PosInt a Source #plus :: PosInt a -> PosInt a Source # Semiring a => Semiring (PosInt a) Source # Methods(<.>) :: PosInt a -> PosInt a -> PosInt a Source #(<+>) :: PosInt a -> PosInt a -> PosInt a Source #add :: [PosInt a] -> PosInt a Source #mul :: [PosInt a] -> PosInt a Source # type Rep1 PosInt Source # type Rep1 PosInt = D1 (MetaData "PosInt" "Data.Semiring.Numeric" "semiring-num-1.6.0.1-8yxfjgH769H6fJUPVjj5lJ" True) (C1 (MetaCons "PosInt" PrefixI True) (S1 (MetaSel (Just Symbol "getPosInt") NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1)) data MVector s (PosInt a) Source # data MVector s (PosInt a) = MV_PosInt (MVector s a) type Rep (PosInt a) Source # type Rep (PosInt a) = D1 (MetaData "PosInt" "Data.Semiring.Numeric" "semiring-num-1.6.0.1-8yxfjgH769H6fJUPVjj5lJ" True) (C1 (MetaCons "PosInt" PrefixI True) (S1 (MetaSel (Just Symbol "getPosInt") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a))) data Vector (PosInt a) Source # data Vector (PosInt a) = V_PosInt (Vector a)