module Biobase.Types.Evalue where
import Control.DeepSeq
import Data.Aeson
import Data.Binary
import Data.Default
import Data.Hashable (Hashable)
import Data.Primitive.Types
import Data.Serialize
import Data.Vector.Unboxed.Base
import Data.Vector.Unboxed.Deriving
import GHC.Generics (Generic)
import qualified Data.Vector.Generic as VG
import qualified Data.Vector.Generic.Mutable as VGM
import qualified Data.Vector.Unboxed as VU
import Biobase.Types.NumericalExtremes
newtype Evalue = Evalue { getEvalue :: Double }
deriving (Eq,Ord,Read,Show,Num,Generic)
instance Binary Evalue
instance FromJSON Evalue
instance Hashable Evalue
instance Serialize Evalue
instance ToJSON Evalue
instance NFData Evalue
derivingUnbox "Evalue"
[t| Evalue -> Double |] [| getEvalue |] [| Evalue |]
instance Default Evalue where
def = Evalue 0
instance NumericalExtremes Evalue where
maxFinite = Evalue maxFinite
minFinite = Evalue 0
maxExtreme = Evalue maxExtreme
minExtreme = Evalue epsilon
maxLarge = Evalue maxLarge
minLarge = Evalue (2.2e-15)