monus-weighted-search-0.1.0.0: Efficient search weighted by an ordered monoid with monus.
Copyright(c) Donnacha Oisín Kidney 2021
Maintainermail@doisinkidney.com
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Data.Monus.Prob

Description

A Monus for probability.

Synopsis

Documentation

newtype Prob Source #

A Monus for probabilities, where the underlying Monoid is the product monoid.

NB: The order on this type is reversed from the "usual" order on probability. i.e.

>>> 0.8 < (0.4 :: Prob)
True

Constructors

Prob 

Fields

Instances

Instances details
Bounded Prob Source # 
Instance details

Defined in Data.Monus.Prob

Eq Prob Source # 
Instance details

Defined in Data.Monus.Prob

Methods

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

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

Fractional Prob Source # 
Instance details

Defined in Data.Monus.Prob

Methods

(/) :: Prob -> Prob -> Prob #

recip :: Prob -> Prob #

fromRational :: Rational -> Prob #

Data Prob Source # 
Instance details

Defined in Data.Monus.Prob

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Prob -> c Prob #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Prob #

toConstr :: Prob -> Constr #

dataTypeOf :: Prob -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Prob) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Prob) #

gmapT :: (forall b. Data b => b -> b) -> Prob -> Prob #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Prob -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Prob -> r #

gmapQ :: (forall d. Data d => d -> u) -> Prob -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Prob -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Prob -> m Prob #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Prob -> m Prob #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Prob -> m Prob #

Num Prob Source # 
Instance details

Defined in Data.Monus.Prob

Methods

(+) :: Prob -> Prob -> Prob #

(-) :: Prob -> Prob -> Prob #

(*) :: Prob -> Prob -> Prob #

negate :: Prob -> Prob #

abs :: Prob -> Prob #

signum :: Prob -> Prob #

fromInteger :: Integer -> Prob #

Ord Prob Source # 
Instance details

Defined in Data.Monus.Prob

Methods

compare :: Prob -> Prob -> Ordering #

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

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

(>) :: Prob -> Prob -> Bool #

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

max :: Prob -> Prob -> Prob #

min :: Prob -> Prob -> Prob #

Read Prob Source # 
Instance details

Defined in Data.Monus.Prob

Real Prob Source # 
Instance details

Defined in Data.Monus.Prob

Methods

toRational :: Prob -> Rational #

RealFrac Prob Source # 
Instance details

Defined in Data.Monus.Prob

Methods

properFraction :: Integral b => Prob -> (b, Prob) #

truncate :: Integral b => Prob -> b #

round :: Integral b => Prob -> b #

ceiling :: Integral b => Prob -> b #

floor :: Integral b => Prob -> b #

Show Prob Source # 
Instance details

Defined in Data.Monus.Prob

Methods

showsPrec :: Int -> Prob -> ShowS #

show :: Prob -> String #

showList :: [Prob] -> ShowS #

Generic Prob Source # 
Instance details

Defined in Data.Monus.Prob

Associated Types

type Rep Prob :: Type -> Type #

Methods

from :: Prob -> Rep Prob x #

to :: Rep Prob x -> Prob #

Semigroup Prob Source # 
Instance details

Defined in Data.Monus.Prob

Methods

(<>) :: Prob -> Prob -> Prob #

sconcat :: NonEmpty Prob -> Prob #

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

Monoid Prob Source # 
Instance details

Defined in Data.Monus.Prob

Methods

mempty :: Prob #

mappend :: Prob -> Prob -> Prob #

mconcat :: [Prob] -> Prob #

Arbitrary Prob Source # 
Instance details

Defined in Data.Monus.Prob

Methods

arbitrary :: Gen Prob #

shrink :: Prob -> [Prob] #

NFData Prob Source # 
Instance details

Defined in Data.Monus.Prob

Methods

rnf :: Prob -> () #

Monus Prob Source # 
Instance details

Defined in Data.Monus.Prob

Methods

(|-|) :: Prob -> Prob -> Prob Source #

type Rep Prob Source # 
Instance details

Defined in Data.Monus.Prob

type Rep Prob = D1 ('MetaData "Prob" "Data.Monus.Prob" "monus-weighted-search-0.1.0.0-inplace" 'True) (C1 ('MetaCons "Prob" 'PrefixI 'True) (S1 ('MetaSel ('Just "runProb") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Ratio Natural))))