ConClusion-0.2.2: Cluster algorithms, PCA, and chemical conformere analysis
CopyrightPhillip Seeber 2023
LicenseAGPL-3
Maintainerphillip.seeber@googlemail.com
Stabilityexperimental
PortabilityPOSIX, Windows
Safe HaskellSafe-Inferred
LanguageHaskell2010

ConClusion.BinaryTree

Description

 
Synopsis

Documentation

data BinTree e Source #

A binary tree.

Constructors

Leaf e 
Node e (BinTree e) (BinTree e) 

Instances

Instances details
Functor BinTree Source # 
Instance details

Defined in ConClusion.BinaryTree

Methods

fmap :: (a -> b) -> BinTree a -> BinTree b #

(<$) :: a -> BinTree b -> BinTree a #

FromJSON e => FromJSON (BinTree e) Source # 
Instance details

Defined in ConClusion.BinaryTree

ToJSON e => ToJSON (BinTree e) Source # 
Instance details

Defined in ConClusion.BinaryTree

Generic (BinTree e) Source # 
Instance details

Defined in ConClusion.BinaryTree

Associated Types

type Rep (BinTree e) :: Type -> Type #

Methods

from :: BinTree e -> Rep (BinTree e) x #

to :: Rep (BinTree e) x -> BinTree e #

Show e => Show (BinTree e) Source # 
Instance details

Defined in ConClusion.BinaryTree

Methods

showsPrec :: Int -> BinTree e -> ShowS #

show :: BinTree e -> String #

showList :: [BinTree e] -> ShowS #

Eq e => Eq (BinTree e) Source # 
Instance details

Defined in ConClusion.BinaryTree

Methods

(==) :: BinTree e -> BinTree e -> Bool #

(/=) :: BinTree e -> BinTree e -> Bool #

type Rep (BinTree e) Source # 
Instance details

Defined in ConClusion.BinaryTree

root :: BinTree e -> e Source #

Look at the root of a binary tree.

takeBranchesWhile :: (a -> Bool) -> BinTree a -> Vector DL a Source #

Steps down each branch of a tree until some criterion is satisfied or the end of the branch is reached. Each end of the branch is added to a result.

takeLeafyBranchesWhile :: (a -> Bool) -> BinTree a -> Vector DL a Source #

Takes the first value in each branch, that does not fullfill the criterion anymore and adds it to the result. Terminal leafes of the branches are always taken.