|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.msu.cme.rdp.classifier.train.RawHierarchyTree
public class RawHierarchyTree
A RawHierarchyTree holds the raw taxon and sequences information. A RawHierarchyTree can only have one type of children: child treenodes or child sequences.
Field Summary | |
---|---|
private int |
genusIndex
|
private int |
leaveCount
|
private java.lang.String |
name
|
private RawHierarchyTree |
parent
|
private java.util.Map |
subclasses
|
private Taxonomy |
taxon
|
private int[] |
wordOccurrence
|
Constructor Summary | |
---|---|
RawHierarchyTree(java.lang.String n,
RawHierarchyTree p,
Taxonomy tax)
Creates new RawHierarchyTree given the name and its parent. |
Method Summary | |
---|---|
private void |
addParent(RawHierarchyTree p)
Adds the parent HierarchyTree, also adds this node to the parent tree as a child. |
private void |
addSubclass(RawHierarchyTree c)
Adds a child treenode. |
int |
getGenusIndex()
Returns the genus index of this treenode. |
int |
getLeaveCount()
Counts the number of sequence leaves below this tree. |
java.lang.String |
getName()
Gets the name of the treenode. |
int |
getNonSingletonLeaveCount()
Counts the number of non-singleton sequence leaves below this tree. |
RawHierarchyTree |
getParent()
Gets the parent treenode. |
int |
getSizeofChildren()
Gets the size of the children, either taxon children or sequence leaves. |
int |
getSizeofSubclasses()
Gets the size of the child treenodes. |
RawHierarchyTree |
getSubclassbyName(java.lang.String n)
Gets the child treenode with the given name. |
java.util.Collection |
getSubclasses()
Gets the array of the subclasses if any. |
Taxonomy |
getTaxonomy()
Returns the taxon object of this treenode. |
int |
getWordOccurrence(int wordIndex)
Gets the word occurrence for the given word index. |
int |
getWordOccurrenceSize()
Returns the size of the array wordOccurrence. |
void |
initWordOccurrence(ParsedRawSequence pSeq,
float[] wordPriorArr)
This method initiates the word occurrences from a sequence for the lowest level of the hierarchy tree. |
boolean |
isSingleton()
|
private boolean |
isWordExist(int[] wordList,
int wordIndex)
Checks if this word already been added to the wordOccurrence. |
void |
releaseWordOccurrence()
Resets the array wordOccurrence to null. |
void |
setGenusIndex(int i)
Sets the genus index of this treenode. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.String name
private int leaveCount
private RawHierarchyTree parent
private java.util.Map subclasses
private int[] wordOccurrence
private Taxonomy taxon
private int genusIndex
Constructor Detail |
---|
public RawHierarchyTree(java.lang.String n, RawHierarchyTree p, Taxonomy tax)
Method Detail |
---|
private void addParent(RawHierarchyTree p)
private void addSubclass(RawHierarchyTree c)
public java.lang.String getName()
public RawHierarchyTree getParent()
public java.util.Collection getSubclasses()
public RawHierarchyTree getSubclassbyName(java.lang.String n)
public int getSizeofChildren()
public int getSizeofSubclasses()
public void initWordOccurrence(ParsedRawSequence pSeq, float[] wordPriorArr) throws java.io.IOException
java.io.IOException
private boolean isWordExist(int[] wordList, int wordIndex)
public int getWordOccurrenceSize()
public int getWordOccurrence(int wordIndex)
public void releaseWordOccurrence()
public int getLeaveCount()
public boolean isSingleton()
public int getNonSingletonLeaveCount()
public Taxonomy getTaxonomy()
public void setGenusIndex(int i)
public int getGenusIndex()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |