Class FastUnweightedTree<U>

java.lang.Object
es.uam.eps.ir.relison.graph.fast.AbstractFastGraph<U>
es.uam.eps.ir.relison.graph.tree.fast.FastTree<U>
es.uam.eps.ir.relison.graph.tree.fast.FastUnweightedTree<U>
Type Parameters:
U - Type of the nodes.
All Implemented Interfaces:
DirectedGraph<U>, FastGraph<U>, Graph<U>, Tree<U>, UnweightedTree<U>, UnweightedGraph<U>, ReducedIndex<U>, java.io.Serializable

public class FastUnweightedTree<U>
extends FastTree<U>
implements UnweightedTree<U>
Fast implementation of an unweighted tree
See Also:
Serialized Form
  • Constructor Details

  • Method Details

    • getDescendants

      public Tree<U> getDescendants​(U parent)
      Description copied from interface: Tree
      Obtains the subtree formed by the user and its descendants.
      Specified by:
      getDescendants in interface Tree<U>
      Parameters:
      parent - the parent node.
      Returns:
      a tree rooted in the parent if the node exists, null if not
    • getAdjacencyMatrix

      public double[][] getAdjacencyMatrix​(EdgeOrientation direction)
      Description copied from interface: Graph
      Gets the adjacency matrix.
      Specified by:
      getAdjacencyMatrix in interface Graph<U>
      Parameters:
      direction - The direction of the edges.
      Returns:
      the adjacency matrix.