Uses of Class
fj.data.Tree
Packages that use Tree
Package
Description
Types that set the premise for the existence of Functional Java.
Parallelization strategies.
Common algebraic data types.
-
Uses of Tree in fj
Modifier and TypeMethodDescriptionClass.classParameters()
Provides this class's type parameter information as a Tree of the type expression.Class.superclassParameters()
Provides this class's superclass type parameter information as a Tree of the type expression.Class.typeParameterTree
(Type t) Provides type parameter information as a Tree of the type expression.Modifier and TypeMethodDescriptionF.foldMapTree
(Monoid<B> m) Returns a function that maps this function over a tree and folds it with the given monoid.Class.interfaceParameters()
Provides this class's interface type parameter information as a list of trees.F.mapTree()
Promotes this function to map over a Tree.F.mapTree()
Promotes this function to map over a Tree.An equal instance for theTree
type.A hash instance for theTree
type.F.treeK()
Promotes this function to return its value in a Tree.F2.treeM()
Promotes this function to a function on Trees.F2.treeM()
Promotes this function to a function on Trees.F2.treeM()
Promotes this function to a function on Trees.A show instance for theTree
type.F2.zipTreeM()
Promotes this function to zip two trees, applying the function lock-step over both trees.F2.zipTreeM()
Promotes this function to zip two trees, applying the function lock-step over both trees.F2.zipTreeM()
Promotes this function to zip two trees, applying the function lock-step over both trees. -
Uses of Tree in fj.control.parallel
Methods in fj.control.parallel that return types with arguments of type TreeModifier and TypeMethodDescriptionMaps the given function across all subtrees of the given Tree in parallel.Maps a function across a Tree in parallel.ParModule.parMapTree()
A first-class function that maps across a Tree in parallel.ParModule.parMapTree()
A first-class function that maps across a Tree in parallel.Methods in fj.control.parallel with parameters of type TreeModifier and TypeMethodDescriptionMaps the given function across all subtrees of the given Tree in parallel.Maps a function across a Tree in parallel.Method parameters in fj.control.parallel with type arguments of type Tree -
Uses of Tree in fj.data
Modifier and TypeFieldDescriptionTreeZipper.lefts
TreeZipper.parents
TreeZipper.parents
TreeZipper.rights
Tree.subForest
Modifier and TypeMethodDescriptionstatic <A,
B> Tree <B> <B> Tree
<B> Applies the given function to all subtrees of this tree, returning a tree of the results (comonad pattern).Tree.cojoin()
Expands this tree into a tree of trees, with this tree as the root label, and subtrees as the labels of child nodes (comonad pattern).<B> Tree
<B> Maps the given function over this tree.TreeZipper.focus()
Returns the tree at the currently focused node.static <A> Tree
<A> Tree.leaf
(A root) Creates a nullary tree.static <A> Tree
<A> Creates a new n-ary given a root and a subforest of length n.static <A> Tree
<A> Creates a new tree given a root and a (potentially infinite) subforest.static <A> Tree
<A> Creates a new tree given a root and a (potentially infinite) subforest.TreeZipper.toTree()
Returns the tree containing this location.<B,
C> Tree <C> Zips this tree with another, using the given function.<B,
C> Tree <C> Zips this tree with another, using the given function.Modifier and TypeMethodDescriptionTree.cojoin()
Expands this tree into a tree of trees, with this tree as the root label, and subtrees as the labels of child nodes (comonad pattern).TreeZipper.downParents()
TreeZipper.downParents()
static <A> F2
<F<Tree<A>, Boolean>, TreeZipper<A>, Option<TreeZipper<A>>> TreeZipper.findChild()
A first-class version of the findChild function.Tree.flatten_()
flatten :: Tree a -> [a] flatten t = squish t []
Tree.fmap_()
Provides a transformation to lift any function so that it maps over Trees.Tree.fmap_()
Provides a transformation to lift any function so that it maps over Trees.Provides a function that folds a tree with the given monoid.static <A> F
<Tree<A>, TreeZipper<A>> TreeZipper.fromTree()
First-class conversion of a Tree to the corresponding tree zipper.Tree.getRoot()
TreeZipper.lefts()
Returns the left siblings of the currently focused node.TreeZipper.lp3nil()
TreeZipper.lp3nil()
Tree.node()
First-class constructor of trees.Tree.node()
First-class constructor of trees.TreeZipper.p()
Returns the product-4 representation of this zipper.TreeZipper.p()
Returns the product-4 representation of this zipper.TreeZipper.p()
Returns the product-4 representation of this zipper.TreeZipper.p()
Returns the product-4 representation of this zipper.TreeZipper.p()
Returns the product-4 representation of this zipper.static <A> F
<TreeZipper<A>, P4<Tree<A>, Stream<Tree<A>>, Stream<Tree<A>>, Stream<P3<Stream<Tree<A>>, A, Stream<Tree<A>>>>>> TreeZipper.p_()
A first-class function that returns the product-4 representation of a given zipper.static <A> F
<TreeZipper<A>, P4<Tree<A>, Stream<Tree<A>>, Stream<Tree<A>>, Stream<P3<Stream<Tree<A>>, A, Stream<Tree<A>>>>>> TreeZipper.p_()
A first-class function that returns the product-4 representation of a given zipper.static <A> F
<TreeZipper<A>, P4<Tree<A>, Stream<Tree<A>>, Stream<Tree<A>>, Stream<P3<Stream<Tree<A>>, A, Stream<Tree<A>>>>>> TreeZipper.p_()
A first-class function that returns the product-4 representation of a given zipper.static <A> F
<TreeZipper<A>, P4<Tree<A>, Stream<Tree<A>>, Stream<Tree<A>>, Stream<P3<Stream<Tree<A>>, A, Stream<Tree<A>>>>>> TreeZipper.p_()
A first-class function that returns the product-4 representation of a given zipper.static <A> F
<TreeZipper<A>, P4<Tree<A>, Stream<Tree<A>>, Stream<Tree<A>>, Stream<P3<Stream<Tree<A>>, A, Stream<Tree<A>>>>>> TreeZipper.p_()
A first-class function that returns the product-4 representation of a given zipper.TreeZipper.parents()
Returns the parents of the currently focused node.TreeZipper.parents()
Returns the parents of the currently focused node.TreeZipper.rights()
Returns the right siblings of the currently focused node.Tree.root_()
Provides a transformation from a tree to its root.Provides a show instance that draws a 2-dimensional representation of a tree.Tree.subForest()
Returns a stream of the tree's subtrees.Tree.subForest_()
Provides a transformation from a tree to its subforest.Tree.subForest_()
Provides a transformation from a tree to its subforest.TreeZipper.toForest()
Returns the forest containing this location.static <A> F
<Tree<A>, F<Stream<Tree<A>>, F<Stream<Tree<A>>, F<Stream<P3<Stream<Tree<A>>, A, Stream<Tree<A>>>>, TreeZipper<A>>>>> TreeZipper.treeZipper()
First-class constructor for tree zippers.static <A> F
<Tree<A>, F<Stream<Tree<A>>, F<Stream<Tree<A>>, F<Stream<P3<Stream<Tree<A>>, A, Stream<Tree<A>>>>, TreeZipper<A>>>>> TreeZipper.treeZipper()
First-class constructor for tree zippers.static <A> F
<Tree<A>, F<Stream<Tree<A>>, F<Stream<Tree<A>>, F<Stream<P3<Stream<Tree<A>>, A, Stream<Tree<A>>>>, TreeZipper<A>>>>> TreeZipper.treeZipper()
First-class constructor for tree zippers.static <A> F
<Tree<A>, F<Stream<Tree<A>>, F<Stream<Tree<A>>, F<Stream<P3<Stream<Tree<A>>, A, Stream<Tree<A>>>>, TreeZipper<A>>>>> TreeZipper.treeZipper()
First-class constructor for tree zippers.static <A> F
<Tree<A>, F<Stream<Tree<A>>, F<Stream<Tree<A>>, F<Stream<P3<Stream<Tree<A>>, A, Stream<Tree<A>>>>, TreeZipper<A>>>>> TreeZipper.treeZipper()
First-class constructor for tree zippers.private Stream
<Tree<TreeZipper<A>>> TreeZipper.uf
(F<TreeZipper<A>, Option<TreeZipper<A>>> f) Tree.unfoldTree
(F<B, P2<A, P1<Stream<B>>>> f) Builds a tree from a seed value.Modifier and TypeMethodDescriptionstatic <A,
B> Tree <B> static <A> TreeZipper
<A> Creates a new tree zipper focused on the root of the given tree.TreeZipper.insertDownAt
(int n, Tree<A> t) Inserts a tree at the specified location in the current node's stream of children.TreeZipper.insertDownFirst
(Tree<A> t) Inserts a tree as the first child of the current node.TreeZipper.insertDownLast
(Tree<A> t) Inserts a tree as the last child of the current node.TreeZipper.insertLeft
(Tree<A> t) Inserts a tree to the left of the current position.TreeZipper.insertRight
(Tree<A> t) Inserts a tree to the right of the current position.Replaces the current node with the given tree.static <A> TreeZipper
<A> TreeZipper.treeZipper
(Tree<A> tree, Stream<Tree<A>> lefts, Stream<Tree<A>> rights, Stream<P3<Stream<Tree<A>>, A, Stream<Tree<A>>>> parents) Creates a new tree zipper given a currently selected tree, a forest on the left, a forest on the right, and a stream of parent contexts.<B,
C> Tree <C> Zips this tree with another, using the given function.<B,
C> Tree <C> Zips this tree with another, using the given function.Modifier and TypeMethodDescription<B> Tree
<B> Applies the given function to all subtrees of this tree, returning a tree of the results (comonad pattern).Tree.drawSubTrees
(Show<A> s, Stream<Tree<A>> ts) Navigates to the first child of the current location, that satisfies the given predicate.static <A> Option
<TreeZipper<A>> TreeZipper.fromForest
(Stream<Tree<A>> ts) Creates a new tree zipper focused on the first element of the given forest.Modifies the current node with the given function.Modifies the current node with the given function.static <A> Tree
<A> Creates a new n-ary given a root and a subforest of length n.static <A> Tree
<A> Creates a new tree given a root and a (potentially infinite) subforest.static <A> Tree
<A> Creates a new tree given a root and a (potentially infinite) subforest.static <A> TreeZipper
<A> TreeZipper.treeZipper
(Tree<A> tree, Stream<Tree<A>> lefts, Stream<Tree<A>> rights, Stream<P3<Stream<Tree<A>>, A, Stream<Tree<A>>>> parents) Creates a new tree zipper given a currently selected tree, a forest on the left, a forest on the right, and a stream of parent contexts.