|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.olduvai.treejuxtaposer.TreePairs
public class TreePairs
TreePairs store all the pairwise data structures needed for structural comparison and visulization.
TreeJuxtaposer
,
Tree2Tree
,
Tree
,
GridCell
Field Summary | |
---|---|
private java.util.HashMap |
pairs
The hash map that stores all the Tree2Tree objects. |
private java.util.ArrayList |
trees
List of "raw" trees, these are used in the hashtable. |
Constructor Summary | |
---|---|
TreePairs()
Constructor for tree pairs. |
Method Summary | |
---|---|
void |
addTree(Tree newTree,
int edgeweightLevels,
boolean pruneNewLeaves)
Add a new tree. |
TreeNode |
getBestCorrNode(Tree source,
TreeNode n,
Tree other,
int el)
Computes the node in Tree "other" whose set of descendant leaves best matches that of TreeNode n in Tree "source" The best match is the node n' maximizing the following score | S(n) Intersection S(n') | / | S(n) Union S(n') | where S(n) is the set of leaves that are descendants of node n. |
float |
getBestCorrNodeScore(Tree source,
TreeNode n,
Tree other,
int edgeweightLevel)
Retrieves the matching score for the node in Tree "other" whose set of descendant leaves best matches that of TreeNode n in Tree "source". |
java.util.ArrayList |
getBestNodeList(Tree source,
TreeNode n,
Tree other,
int edgeweightLevel)
Get the list of nodes for the given node that will be highlighted if the node is selected. |
Tree2Tree |
getPair(Tree t1,
Tree t2)
Get the Tree2Tree table for t1 and t2 differences. |
void |
removeTree(Tree deletedTree)
Remove a tree from the list of trees. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.ArrayList trees
private java.util.HashMap pairs
Constructor Detail |
---|
public TreePairs()
Method Detail |
---|
public void addTree(Tree newTree, int edgeweightLevels, boolean pruneNewLeaves)
newTree
- New tree that has been added to the application.edgeweightLevels
- The number of edge weight levels to process.pruneNewLeaves
- Unimplemented flag for removing unique leaves from processing tree comparisons, for difference marking that does not ascend when two leaf sets do not match.public Tree2Tree getPair(Tree t1, Tree t2)
pairs
)
then gets the T2T in that hashmap for t2 (the differences of t2 based on t1).
t1
- First tree object. Index in trees
for hashmap.t2
- Second tree object. Index in the recovered hashmap for t1 for the Tree2Tree
object.
public void removeTree(Tree deletedTree)
deletedTree
- Tree to delete from the set of trees.public TreeNode getBestCorrNode(Tree source, TreeNode n, Tree other, int el)
source
- Tree that contains the node of interest.n
- The node that we are looking up the best matching node for.other
- Target tree to look up the node in.el
- Number of edge weight levels to use.
Tree
,
TreeNode
,
Tree2Tree.NodeScorePair
public java.util.ArrayList getBestNodeList(Tree source, TreeNode n, Tree other, int edgeweightLevel)
source
- Source tree that contains the given tree noden
- The node to look up the list of best nodes for, found in the source treeother
- The target tree that will be referenced for the best nodes that match the given node.edgeweightLevel
- The edge weight level to use for looking up matches.
public float getBestCorrNodeScore(Tree source, TreeNode n, Tree other, int edgeweightLevel)
source
- Source tree, in which the tree node of interest is found.n
- Node of interest, the score with respect to the second tree is returned.other
- The target tree, or the tree that the given node's score will be found.edgeweightLevel
- The edge weight level for the lookup.
Tree
,
TreeNode
,
Tree2Tree.NodeScorePair
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |