public class TreeUtilsAlignmentRepair
extends java.lang.Object
Constructor and Description |
---|
TreeUtilsAlignmentRepair() |
Modifier and Type | Method and Description |
---|---|
static NAryTree |
emptyTree() |
static int[] |
getPointsOfChange(NAryTree candidate,
NAryTreeHistory parentHistory,
NAryTreeHistory grandparentHistory)
Function that returns the fixed points of change of a candidate after the
crossover and the mutation.
|
static int |
LCA(NAryTree tree,
int a,
int b)
Returns the Lowest Common Ancestor (LCA) of two nodes a and b.
|
static int |
LCAImpr(NAryTree tree,
int a,
int b)
UNTESTED
|
static int |
replaceWithParentType(int node,
int TYPE,
NAryTree tree)
Returns the lowest parent that is equal to the input parent.
|
static java.util.List<TreeRecord> |
splitChunk(java.util.List<TreeRecord> history,
int start,
java.lang.Integer numLogMoves,
int subtreeSize)
performance issue? recursive VS iteration
|
public static int LCA(NAryTree tree, int a, int b)
tree
- a
- b
- public static int LCAImpr(NAryTree tree, int a, int b)
public static NAryTree emptyTree()
public static int[] getPointsOfChange(NAryTree candidate, NAryTreeHistory parentHistory, NAryTreeHistory grandparentHistory)
candidate
- parentHistory
- of the candidategrandparentHistory
- of the candidatepublic static java.util.List<TreeRecord> splitChunk(java.util.List<TreeRecord> history, int start, java.lang.Integer numLogMoves, int subtreeSize)
public static int replaceWithParentType(int node, int TYPE, NAryTree tree)