| License | MIT |
|---|---|
| Maintainer | mail@doisinkidney.com |
| Stability | experimental |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Semiring.Numeric
Description
- newtype Bottleneck a = Bottleneck {
- getBottleneck :: a
- newtype Division a = Division {
- getDivision :: a
- newtype Łukasiewicz a = Łukasiewicz {
- getŁukasiewicz :: a
- newtype Viterbi a = Viterbi {
- getViterbi :: a
- newtype Log a = Log {}
Documentation
newtype Bottleneck a Source #
Constructors
| Bottleneck | |
Fields
| |
Instances
| Monad Bottleneck Source # | |
| Functor Bottleneck Source # | |
| Applicative Bottleneck Source # | |
| Foldable Bottleneck Source # | |
| Generic1 Bottleneck Source # | |
| Bounded a => Bounded (Bottleneck a) Source # | |
| Enum a => Enum (Bottleneck a) Source # | |
| Eq a => Eq (Bottleneck a) Source # | |
| Fractional a => Fractional (Bottleneck a) Source # | |
| Num a => Num (Bottleneck a) Source # | |
| Ord a => Ord (Bottleneck a) Source # | |
| Read a => Read (Bottleneck a) Source # | |
| Real a => Real (Bottleneck a) Source # | |
| RealFrac a => RealFrac (Bottleneck a) Source # | |
| Show a => Show (Bottleneck a) Source # | |
| Generic (Bottleneck a) Source # | |
| Storable a => Storable (Bottleneck a) Source # | |
| (Bounded a, Ord a) => Semiring (Bottleneck a) Source # | |
| type Rep1 Bottleneck Source # | |
| type Rep (Bottleneck a) Source # | |
Constructors
| Division | |
Fields
| |
Instances
| Monad Division Source # | |
| Functor Division Source # | |
| Applicative Division Source # | |
| Foldable Division Source # | |
| Generic1 Division Source # | |
| Bounded a => Bounded (Division a) Source # | |
| Enum a => Enum (Division a) Source # | |
| Eq a => Eq (Division a) Source # | |
| Fractional a => Fractional (Division a) Source # | |
| Num a => Num (Division a) Source # | |
| Ord a => Ord (Division a) Source # | |
| Read a => Read (Division a) Source # | |
| Real a => Real (Division a) Source # | |
| RealFrac a => RealFrac (Division a) Source # | |
| Show a => Show (Division a) Source # | |
| Generic (Division a) Source # | |
| Storable a => Storable (Division a) Source # | |
| (Integral a, Semiring a) => Semiring (Division a) Source # | Only expects positive numbers |
| type Rep1 Division Source # | |
| type Rep (Division a) Source # | |
newtype Łukasiewicz a Source #
Wikipedia has some information on this. Also this paper.
(<+>) =maxx<.>y =max0 (x+y-1)zero=zeroone=one
Constructors
| Łukasiewicz | |
Fields
| |
Instances
| Monad Łukasiewicz Source # | |
| Functor Łukasiewicz Source # | |
| Applicative Łukasiewicz Source # | |
| Foldable Łukasiewicz Source # | |
| Generic1 Łukasiewicz Source # | |
| Bounded a => Bounded (Łukasiewicz a) Source # | |
| Enum a => Enum (Łukasiewicz a) Source # | |
| Eq a => Eq (Łukasiewicz a) Source # | |
| Fractional a => Fractional (Łukasiewicz a) Source # | |
| Num a => Num (Łukasiewicz a) Source # | |
| Ord a => Ord (Łukasiewicz a) Source # | |
| Read a => Read (Łukasiewicz a) Source # | |
| Real a => Real (Łukasiewicz a) Source # | |
| RealFrac a => RealFrac (Łukasiewicz a) Source # | |
| Show a => Show (Łukasiewicz a) Source # | |
| Generic (Łukasiewicz a) Source # | |
| Storable a => Storable (Łukasiewicz a) Source # | |
| (Ord a, Num a) => Semiring (Łukasiewicz a) Source # | |
| type Rep1 Łukasiewicz Source # | |
| type Rep (Łukasiewicz a) Source # | |
Wikipedia has some information on this. Also this paper. Apparently used for probabilistic parsing.
(<+>) =max(<.>) = (<.>)zero=zeroone=one
Constructors
| Viterbi | |
Fields
| |
Instances
| Monad Viterbi Source # | |
| Functor Viterbi Source # | |
| Applicative Viterbi Source # | |
| Foldable Viterbi Source # | |
| Generic1 Viterbi Source # | |
| Bounded a => Bounded (Viterbi a) Source # | |
| Enum a => Enum (Viterbi a) Source # | |
| Eq a => Eq (Viterbi a) Source # | |
| Fractional a => Fractional (Viterbi a) Source # | |
| Num a => Num (Viterbi a) Source # | |
| Ord a => Ord (Viterbi a) Source # | |
| Read a => Read (Viterbi a) Source # | |
| Real a => Real (Viterbi a) Source # | |
| RealFrac a => RealFrac (Viterbi a) Source # | |
| Show a => Show (Viterbi a) Source # | |
| Generic (Viterbi a) Source # | |
| Storable a => Storable (Viterbi a) Source # | |
| (Ord a, Semiring a) => Semiring (Viterbi a) Source # | |
| type Rep1 Viterbi Source # | |
| type Rep (Viterbi a) Source # | |
Useful for optimizing multiplication, or working with large numbers.
(<.>) = (+) x<+>y = -(log(exp(-x) +exp(-y)))zero= ∞ -- represented byNothingone= 0
Instances
| Monad Log Source # | |
| Functor Log Source # | |
| Applicative Log Source # | |
| Foldable Log Source # | |
| Generic1 Log Source # | |
| Eq a => Eq (Log a) Source # | |
| Ord a => Ord (Log a) Source # | |
| Read a => Read (Log a) Source # | |
| Show a => Show (Log a) Source # | |
| Generic (Log a) Source # | |
| (Semiring a, Floating a) => Semiring (Log a) Source # | |
| type Rep1 Log Source # | |
| type Rep (Log a) Source # | |