tropical-0.0.0.1: A library for tropical mathematics.

Copyright2014, Peter Harpending.
LicenseBSD3
MaintainerPeter Harpending <pharpend2@gmail.com>
Stabilityexperimental
PortabilityLinux
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Semiring.Tropical

Description

This file just contains the minimal definition of "tropical," meaning any tropical object has to be an ordered semiring.

Synopsis

Documentation

data Real t => Tropical t Source

Tropical numbers are like real numbers, except zero is the same thing as Infinity, and you can't subtract.

Constructors

Tropical

Any tropical number

Fields

realValue :: t
 
Infinity

Infinity

Instances

Real t => Eq (Tropical t) 
Real t => Ord (Tropical t) 
(Real t, Show t) => Show (Tropical t) 
Real a => Semiring (Tropical a) 

type Operator a = a -> a -> a Source

(./.) :: Real a => Operator (Tropical a) Source

Tropical division. Remember, if Infinity is tropical zero, then you can't divide by it!