-- | Define several constants used throughout all libraries depending on -- Biobase. module Biobase.Constants where -- * energy "Infinities" -- | maxBound on Int is problematic, if we try something like maxBound + -- maxBound which happens very often. 'eInf' is used for settings like lookup -- tables, etc while comparisons are against 'eMax'. -- Both values need to be small enough not to overflow in typical situations. class Constants a where eInf :: a eMax :: a instance Constants Int where eInf = 10000000 eMax = 1000000 {-# INLINE eInf #-} {-# INLINE eMax #-} instance Constants Double where eInf = 10000000 eMax = 1000000 {-# INLINE eInf #-} {-# INLINE eMax #-} -- * some constants, required for scaling and Boltzmann -- Kelvin / Celsius conversion constant kelvinC0 = 273.15 -- universal gas constant gasconst = 1.98717 -- cal/K