java.lang.Object
dk.jonaslindstrom.ruffini.polynomials.algorithms.BinaryTree<L>
Direct Known Subclasses:
BinaryTree.SubproductTree

public class BinaryTree<L> extends Object
This represents a labeled binary tree where the label of an internal node is the result of an operation on the labels of its children.
  • Constructor Details

    • BinaryTree

      public BinaryTree(List<L> leafs, java.util.function.BinaryOperator<L> operator)
  • Method Details

    • evaluate

      public List<L> evaluate(L value, java.util.function.BinaryOperator<L> operator)
    • evaluateFromLeafs

      public L evaluateFromLeafs(List<L> values, java.util.function.BiFunction<Pair<L,L>,Pair<L,L>,L> operator)