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

ELynx.Tree.Parallel

Description

Creation date: Mon Sep 7 13:36:45 2020.

Parallel evaluation up to a given layer. By convention layer 0 only has one element: the root node. The layer 1 includes the daughter nodes of the root node, and so on.

The layer to which a node belongs should not be confused with the depth of a tree.

Synopsis

Documentation

parTree :: (NFData e, NFData a) => Int -> Strategy (Tree e a) Source #

Parallel evaluation strategy for a tree into normal form.

Evaluate the sub trees up to given layer in parallel.

parBranchFoldMap :: NFData f => Int -> (e -> f) -> (f -> f -> f) -> Tree e a -> f Source #

Map and fold over branches. Evaluate the sub trees up to given layer in parallel.

parBranchFoldMapWithLayer :: NFData f => Int -> (Int -> e -> f) -> (f -> f -> f) -> Tree e a -> f Source #

Map and fold over branches.

The used function has access to the layer of the node to which the handled branch is attached to.

Evaluate the sub trees up to given layer in parallel.

parNodeFoldMap :: NFData b => Int -> (a -> b) -> (b -> b -> b) -> Tree e a -> b Source #

Map and fold over nodes. Evaluate the sub trees up to given layer in parallel.