| 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 {
- getLog :: a
- newtype PosFrac a = PosFrac {
- getPosFrac :: a
- newtype PosInt a = PosInt {
- getPosInt :: a
Documentation
newtype Bottleneck a Source #
Constructors
| Bottleneck | |
Fields
| |
Instances
| Functor Bottleneck Source # | |
| Foldable Bottleneck Source # | |
| Traversable 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) => DetectableZero (Bottleneck a) Source # | |
| (Bounded a, Ord a) => Semiring (Bottleneck a) Source # | |
| type Rep1 Bottleneck Source # | |
| type Rep (Bottleneck a) Source # | |
Constructors
| Division | |
Fields
| |
Instances
| Functor Division Source # | |
| Foldable Division Source # | |
| Traversable 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, DetectableZero a) => DetectableZero (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
| Functor Łukasiewicz Source # | |
| Foldable Łukasiewicz Source # | |
| Traversable Ł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) => DetectableZero (Ł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
| Functor Viterbi Source # | |
| Foldable Viterbi Source # | |
| Traversable 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, DetectableZero a) => DetectableZero (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= ∞one= 0
Instances
| Functor 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 # | |
| (Floating a, HasPositiveInfinity a) => DetectableZero (Log a) Source # | |
| (Floating a, HasPositiveInfinity a) => Semiring (Log a) Source # | |
| type Rep1 Log Source # | |
| type Rep (Log a) Source # | |
Constructors
| PosFrac | |
Fields
| |
Instances
| Functor PosFrac Source # | |
| Foldable PosFrac Source # | |
| Traversable PosFrac Source # | |
| Generic1 PosFrac Source # | |
| (Bounded a, Semiring a) => Bounded (PosFrac a) Source # | |
| Enum a => Enum (PosFrac a) Source # | |
| Eq a => Eq (PosFrac a) Source # | |
| Fractional a => Fractional (PosFrac a) Source # | |
| Num a => Num (PosFrac a) Source # | |
| Ord a => Ord (PosFrac a) Source # | |
| Read a => Read (PosFrac a) Source # | |
| Real a => Real (PosFrac a) Source # | |
| RealFrac a => RealFrac (PosFrac a) Source # | |
| Show a => Show (PosFrac a) Source # | |
| Generic (PosFrac a) Source # | |
| Storable a => Storable (PosFrac a) Source # | |
| (Eq a, Semiring a) => DetectableZero (PosFrac a) Source # | |
| (Ord a, Fractional a, Semiring a, HasPositiveInfinity a) => StarSemiring (PosFrac a) Source # | |
| Semiring a => Semiring (PosFrac a) Source # | |
| type Rep1 PosFrac Source # | |
| type Rep (PosFrac a) Source # | |
Instances
| Functor PosInt Source # | |
| Foldable PosInt Source # | |
| Traversable PosInt Source # | |
| Generic1 PosInt Source # | |
| (Bounded a, Semiring a) => Bounded (PosInt a) Source # | |
| Enum a => Enum (PosInt a) Source # | |
| Eq a => Eq (PosInt a) Source # | |
| Fractional a => Fractional (PosInt a) Source # | |
| Num a => Num (PosInt a) Source # | |
| Ord a => Ord (PosInt a) Source # | |
| Read a => Read (PosInt a) Source # | |
| Real a => Real (PosInt a) Source # | |
| RealFrac a => RealFrac (PosInt a) Source # | |
| Show a => Show (PosInt a) Source # | |
| Generic (PosInt a) Source # | |
| Storable a => Storable (PosInt a) Source # | |
| (Eq a, Semiring a) => DetectableZero (PosInt a) Source # | |
| (Eq a, Semiring a, HasPositiveInfinity a) => StarSemiring (PosInt a) Source # | |
| Semiring a => Semiring (PosInt a) Source # | |
| type Rep1 PosInt Source # | |
| type Rep (PosInt a) Source # | |