public class EfficientTreeUtils
extends java.lang.Object
| Constructor and Description |
|---|
EfficientTreeUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Iterable<java.lang.Integer> |
getAllNodes(EfficientTree tree) |
static java.lang.Iterable<java.lang.Integer> |
getAllNodes(EfficientTree tree,
int child) |
static int |
getChildNumberWith(EfficientTree tree,
int parent,
int grandChild) |
static int |
getChildWith(EfficientTree tree,
int parent,
int grandChild) |
static int |
getLowestCommonParent(EfficientTree tree,
int nodeA,
int nodeB) |
static boolean |
isParentOf(EfficientTree tree,
int parent,
int child) |
public static boolean isParentOf(EfficientTree tree, int parent, int child)
parent - child - public static int getChildWith(EfficientTree tree, int parent, int grandChild)
parent - grandChild - public static int getChildNumberWith(EfficientTree tree, int parent, int grandChild)
parent - grandChild - public static int getLowestCommonParent(EfficientTree tree, int nodeA, int nodeB)
tree - nodeA - nodeB - public static java.lang.Iterable<java.lang.Integer> getAllNodes(EfficientTree tree)
public static java.lang.Iterable<java.lang.Integer> getAllNodes(EfficientTree tree, int child)