Class BinaryTree.SubproductTree<E>

java.lang.Object
dk.jonaslindstrom.ruffini.polynomials.algorithms.BinaryTree<Polynomial<E>>
dk.jonaslindstrom.ruffini.polynomials.algorithms.BinaryTree.SubproductTree<E>
Enclosing class:
BinaryTree<L>

public static class BinaryTree.SubproductTree<E> extends BinaryTree<Polynomial<E>>
A binary tree where the leafs are x-l_i for a set of constants (l_0, ..., l_{n-1}) and internal nodes are the product of their children.
  • Constructor Details

  • Method Details

    • evaluate

      public List<E> evaluate(Polynomial<E> polynomial)
      Evaluate from the root. For each node set the value to be the value from the parent modulo the label on the node. Return the values from the leafs.