public class InfoTree extends Object
| Modifier and Type | Field and Description |
|---|---|
int[][] |
info |
static byte |
KR |
boolean[][] |
nodeType |
static byte |
POST2_DESC_SUM |
static byte |
POST2_KR_SUM |
static byte |
POST2_LABEL |
static byte |
POST2_LLD |
static byte |
POST2_MIN_KR |
static byte |
POST2_PARENT |
static byte |
POST2_PRE |
static byte |
POST2_REV_KR_SUM |
static byte |
POST2_SIZE |
static byte |
POST2_STRATEGY |
static byte |
PRE2_POST |
static byte |
RKR |
static byte |
RPOST2_MIN_RKR |
static byte |
RPOST2_POST |
static byte |
RPOST2_RLD |
| Constructor and Description |
|---|
InfoTree(LblTree aInputTree,
LabelDictionary aLd)
Creates an InfoTree object, gathers all information about aInputTree and stores in indexes.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getCurrentNode()
Returns the postorder of current root node.
|
int |
getInfo(int infoCode,
int nodesPostorder)
For given infoCode and postorder of a node returns requested information of that node.
|
int[] |
getInfoArray(int infoCode)
For given infoCode returns an info array (index array)
|
int[] |
getNodeRelSubtrees(int pathType,
int nodePostorder)
Returns relevant subtrees for given node.
|
boolean[] |
getNodeTypeArray(int type) |
int[] |
getPath(int pathType)
Returns an array representation of a given path's type.
|
int |
getSize()
Returns the size of the tree.
|
boolean |
ifNodeOfType(int postorder,
int type) |
boolean |
isSwitched() |
void |
setCurrentNode(int postorder)
Sets postorder of the current node in the recursion.
|
void |
setSwitched(boolean value) |
public static final byte POST2_SIZE
public static final byte POST2_KR_SUM
public static final byte POST2_REV_KR_SUM
public static final byte POST2_DESC_SUM
public static final byte POST2_PRE
public static final byte POST2_PARENT
public static final byte POST2_LABEL
public static final byte KR
public static final byte POST2_LLD
public static final byte POST2_MIN_KR
public static final byte RKR
public static final byte RPOST2_RLD
public static final byte RPOST2_MIN_RKR
public static final byte RPOST2_POST
public static final byte POST2_STRATEGY
public static final byte PRE2_POST
public int[][] info
public boolean[][] nodeType
public InfoTree(LblTree aInputTree, LabelDictionary aLd)
aInputTree - an LblTree objectaLd - a LabelDictionary objectpublic int getSize()
public boolean ifNodeOfType(int postorder,
int type)
public boolean[] getNodeTypeArray(int type)
public int getInfo(int infoCode,
int nodesPostorder)
infoCode - nodesPostorder - postorder of a nodepublic int[] getInfoArray(int infoCode)
infoCode - public int[] getNodeRelSubtrees(int pathType,
int nodePostorder)
pathType - nodePostorder - postorder of a nodepublic int[] getPath(int pathType)
pathType - public int getCurrentNode()
public void setCurrentNode(int postorder)
postorder - public void setSwitched(boolean value)
public boolean isSwitched()
Copyright © 2007–2019. All rights reserved.