elynx-tree-0.6.0.0: Handle phylogenetic trees
Copyright(c) Dominik Schrempf 2021
LicenseGPL-3.0-or-later
Maintainerdominik.schrempf@gmail.com
Stabilityunstable
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

ELynx.Tree.Support

Description

Creation date: Thu Jun 13 14:06:45 2019.

Synopsis

Non-negative support value

data Support Source #

Non-negative support value.

However, non-negativity is only checked with toSupport, and negative values can be obtained using the Num and related instances.

See also the documentation of Length.

Instances

Instances details
Enum Support Source # 
Instance details

Defined in ELynx.Tree.Support

Eq Support Source # 
Instance details

Defined in ELynx.Tree.Support

Methods

(==) :: Support -> Support -> Bool #

(/=) :: Support -> Support -> Bool #

Floating Support Source # 
Instance details

Defined in ELynx.Tree.Support

Fractional Support Source # 
Instance details

Defined in ELynx.Tree.Support

Num Support Source # 
Instance details

Defined in ELynx.Tree.Support

Ord Support Source # 
Instance details

Defined in ELynx.Tree.Support

Read Support Source # 
Instance details

Defined in ELynx.Tree.Support

Real Support Source # 
Instance details

Defined in ELynx.Tree.Support

RealFloat Support Source # 
Instance details

Defined in ELynx.Tree.Support

RealFrac Support Source # 
Instance details

Defined in ELynx.Tree.Support

Methods

properFraction :: Integral b => Support -> (b, Support) #

truncate :: Integral b => Support -> b #

round :: Integral b => Support -> b #

ceiling :: Integral b => Support -> b #

floor :: Integral b => Support -> b #

Show Support Source # 
Instance details

Defined in ELynx.Tree.Support

Generic Support Source # 
Instance details

Defined in ELynx.Tree.Support

Associated Types

type Rep Support :: Type -> Type #

Methods

from :: Support -> Rep Support x #

to :: Rep Support x -> Support #

Semigroup Support Source # 
Instance details

Defined in ELynx.Tree.Support

NFData Support Source # 
Instance details

Defined in ELynx.Tree.Support

Methods

rnf :: Support -> () #

ToJSON Support Source # 
Instance details

Defined in ELynx.Tree.Support

FromJSON Support Source # 
Instance details

Defined in ELynx.Tree.Support

Splittable Support Source # 
Instance details

Defined in ELynx.Tree.Support

HasMaybeLength Support Source # 
Instance details

Defined in ELynx.Tree.Export.Newick

HasSupport Support Source # 
Instance details

Defined in ELynx.Tree.Support

HasMaybeSupport Support Source # 
Instance details

Defined in ELynx.Tree.Support

type Rep Support Source # 
Instance details

Defined in ELynx.Tree.Support

type Rep Support = D1 ('MetaData "Support" "ELynx.Tree.Support" "elynx-tree-0.6.0.0-FQkEU9t6m33732ommPyIXg" 'True) (C1 ('MetaCons "Support" 'PrefixI 'True) (S1 ('MetaSel ('Just "fromSupport") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double)))

toSupport :: Double -> Either String Support Source #

Return Left if negative.

toSupportUnsafe :: Double -> Support Source #

Do not check if value is negative.

class HasMaybeSupport e where Source #

Class of data types that may have a support value.

class HasMaybeSupport e => HasSupport e where Source #

Class of data types with measurable and modifiable support values.

Methods

getSupport :: e -> Support Source #

setSupport :: Support -> e -> e Source #

modifySupport :: (Support -> Support) -> e -> e Source #

Functions on trees

normalizeBranchSupport :: HasSupport e => Tree e a -> Tree e a Source #

Normalize branch support values. The maximum branch support value will be set to 1.0.

collapse :: (Eq e, Eq a, HasSupport e) => Support -> Tree e a -> Tree e a Source #

Collapse branches with support lower than given value.

The branch and node labels of the collapsed branches are discarded.