|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjbil.sequence.TrieForest
public class TrieForest
Class representing a trie forest. Each trie in the forest can either be active or inactive. If it is inactive, it is not counted as participating in the forest, although it is physically present.
Constructor Summary | |
---|---|
TrieForest()
Creates an empty forest of tries. |
Method Summary | |
---|---|
void |
addTrie(Trie trie)
Add a trie to the forest. |
Pair<java.lang.Integer,java.lang.Integer> |
countOccurrences(Sequence pattern,
int beginIndex,
int endIndex,
int offset)
Counts the number of occurrences of the patterns pattern[beginIndex..endIndex-2] and pattern[beginIndex..endIndex-1] respectively, as prefixes of words represented by the subtries of the active tries in the forest rooted at nodes at a given height. |
boolean |
isActiveTrie(int index)
Checks whether the trie at a given position is active or not. |
Trie |
removeTrie(Trie trie)
Removes a trie from the forest. |
int |
sequenceCount()
Returns the total number of words represented by the active tries in the forest, taking into account word multiplicity and high order symbols. |
void |
setActiveTrie(int index,
boolean active)
Sets the status of the trie at a given position in the forest active/inactive. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TrieForest()
Method Detail |
---|
public void addTrie(Trie trie)
trie
- The trie to be added.public Trie removeTrie(Trie trie)
trie
- The trie to be removed.
public boolean isActiveTrie(int index)
index
- The position of the trie in the forest.public void setActiveTrie(int index, boolean active)
index
- The position of the trie in the forest.active
- The status: false=inactive, true=active.public Pair<java.lang.Integer,java.lang.Integer> countOccurrences(Sequence pattern, int beginIndex, int endIndex, int offset)
countOccurrences
in interface KMerCounter
pattern
- The base pattern.beginIndex
- The start position of the subpattern to be counted.endIndex
- The end position (not inclusive) of the subpattern to be counted.offset
- The height of the nodes at which the search must begin.Trie.countOccurrences(Sequence, int, int, int)
public int sequenceCount()
sequenceCount
in interface KMerCounter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |