T
- object typepublic class PQTreeList<T> extends java.util.ArrayList<PQTree<T>>
Constructor and Description |
---|
PQTreeList() |
Modifier and Type | Method and Description |
---|---|
void |
addRule(java.util.Collection<T> ruleObjectSet)
This method adds new rule to one of trees in this list.
|
void |
addTree(PQTree<T> tree)
This method adds new PQTree to this list.
|
void |
addTree(T o,
int LLValue)
This method adds new PQTree to this list.
|
int |
calculateMLValue(java.util.Set s)
This method calculates ML value for given set of original graph nodes.
|
void |
calculateMLValues(PQTree<T> tree)
This method calculates correct ML values of given PQ-tree.
|
boolean |
checkValidity()
This method checks consistency of information.
|
void |
clearUserObjects()
This method clears user objects from each tree in this tree list.
|
void |
copy(PQTreeList<T> originallist)
This method that copies all trees from another PQTreeList.
|
LayeredGraph |
getLayeredGraph()
This method gets layered graph.
|
java.util.LinkedList<T> |
getList(java.util.List<? extends java.util.Set<T>> sequenceRulesList)
This method gets correct node list of all objects.
|
PQTree<T> |
getTree(int index)
This method returns tree that is in given place in this list.
|
void |
merge(java.util.List<T> list)
This method merges all trees that contains objects in list.
|
void |
print()
This method prints all PQ-trees in this list.
|
void |
removeEmptyTrees()
This method removes all trees that doesn't contain any CNode.
|
void |
removeNodes(java.util.Collection<T> c)
This method removes unnecessary nodes from all graphs.
|
void |
removeUnnecessary()
This method removes all unnecessary nodes from each tree in the list.
|
void |
replace(T existingObject,
T newObject)
This method replaces one object with another in correct PQTree.
|
void |
replaceList(java.util.List<T> list,
T o)
This method replaces list of nodes with single node.
|
void |
setHangingNodeSet(java.util.Set<T> s)
This method sets hanging node sets for each tree.
|
void |
setInvisibleNodeSet(java.util.Set<T> s)
This method sets invisible node sets for each tree.
|
void |
setLayeredGraph(LayeredGraph graph)
This method sets layered graph.
|
void |
updateLevelInfo()
This method updates levl information for each tree in the list.
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
public PQTree<T> getTree(int index)
index
- index of necessary tree.public void addTree(T o, int LLValue)
o
- new object that will be the only one in new PQTree.LLValue
- LL value on new PQTree.public void addTree(PQTree<T> tree)
tree
- PQTree object that will be added.public void replace(T existingObject, T newObject)
existingObject
- existing object that will be replaced.newObject
- new object that will be added in place of existing one.public void replaceList(java.util.List<T> list, T o)
list
- list of objects that will be replaced.o
- object to be inserted.public void merge(java.util.List<T> list)
list
- list of objects that have to belong to the same tree after
merge operation.public void clearUserObjects()
public void addRule(java.util.Collection<T> ruleObjectSet)
ruleObjectSet
- set of objects that should be sequentially.public void removeUnnecessary()
PQTree
public void copy(PQTreeList<T> originallist)
originallist
- tree list from which everything is copied.public void updateLevelInfo()
public void setInvisibleNodeSet(java.util.Set<T> s)
s
- set of objects that are invisible nodes in original graph.public void setHangingNodeSet(java.util.Set<T> s)
s
- set of objects that are hanging nodes in original graph.public void print()
public java.util.LinkedList<T> getList(java.util.List<? extends java.util.Set<T>> sequenceRulesList)
sequenceRulesList
- - list of node sets that means that objects in
i-th set have to be no further than objects from (i+1)-th set.public void calculateMLValues(PQTree<T> tree)
tree
- PQ-tree which ML values will be calculated.public int calculateMLValue(java.util.Set s)
s
- set of nodes for whom ML (meet level) is calculated.public void setLayeredGraph(LayeredGraph graph)
graph
- reference to new layered graph.public LayeredGraph getLayeredGraph()
public void removeNodes(java.util.Collection<T> c)
c
- collection of unnecessary nodes.public void removeEmptyTrees()
public boolean checkValidity()