|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
de.folt.fuzzy.PartitionedFuzzyNodeTree<K,T>
public class PartitionedFuzzyNodeTree<K,T>
This class implements a partitioned fuzzy node tree; the fuzzy node trees are partitioned into buckets where each bucket corresponds to the KEYSUm of the fuzzy node root. * The rationality behind
this tree is to split up a fuzzy node into a tree consisting of several fuzzy node roots based on the key sum of the fuzzy node. * This helps to restrict the number of fuzzy nodes searched to a
boundary around the key sum of a search fuzzy key. This may not be an appropriate strategy for all types of fuzzy searches!
For each KEYSUM a root node is generated. The search is then done on the root nodes LowerLimit < KEYSUM SearchNODE < UpperLimit, where the limits are computed based on the similarity supplied. int
iDiff (the limit difference for upper and lower) = (iNGram * (100 - similarity) / 100))
Structure: [0] [1] [2] .... [i] .... [n] (a hash table) | | references the root fuzzy node references the root fuzzy node with key sum 0 with key sum iPattern used: Composite
| Constructor Summary | |
|---|---|
PartitionedFuzzyNodeTree()
|
|
| Method Summary | |
|---|---|
int |
countNodes()
countNodes count all the nodes in the tree |
java.lang.String |
format()
format return a formated partitioned fuzzy tree based on the fuzzy nodes |
FuzzyNodeTree<K,T> |
getFuzzyNodeTree(int i)
getRoot returns a specific fuzzy Node tree |
int |
getIMaxIndex()
|
int |
getNODESMATCHED()
|
int |
getNODESPUSHED()
|
int |
getNODESSEARCHED()
|
java.util.Hashtable<java.lang.String,FuzzyNodeTree<K,T>> |
getRoots()
|
boolean |
insertFuzzyNode(FuzzyNode<K,T> fuzzyNodeToAdd)
insertFuzzyNode inserts a Fuzzy node into a partitioned fuzzy node tree; |
boolean |
removeValue(FuzzyNode<K,T> fuzzyCompareKey)
removeValue removes a value from the value list of the values of the node based on a key. |
java.util.Vector<FuzzyNodeSearchResult<K,T>> |
search(FuzzyNode<K,T> fuzzyCompareKey,
int similarity)
search returns all a FuzzyNodeSearchResult of all matching FuzzyNodes |
| Methods inherited from class java.util.Observable |
|---|
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PartitionedFuzzyNodeTree()
| Method Detail |
|---|
public int countNodes()
public java.lang.String format()
public FuzzyNodeTree<K,T> getFuzzyNodeTree(int i)
i - the index of the FuzzyTree to return
public int getIMaxIndex()
public int getNODESMATCHED()
public int getNODESPUSHED()
public int getNODESSEARCHED()
public java.util.Hashtable<java.lang.String,FuzzyNodeTree<K,T>> getRoots()
public boolean insertFuzzyNode(FuzzyNode<K,T> fuzzyNodeToAdd)
fuzzyNodeToAdd - fuzzy node to insert
public boolean removeValue(FuzzyNode<K,T> fuzzyCompareKey)
fuzzyCompareKey - the key containing the value to remove
public java.util.Vector<FuzzyNodeSearchResult<K,T>> search(FuzzyNode<K,T> fuzzyCompareKey,
int similarity)
fuzzyCompareKey - the fuzzy node to search for with similaritysimilarity - the similarity to search for
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||