public class HierarchicalNodeSet extends HashSet<HierarchicalNode>
Define a set of nodes for the Hierarchical Transition Graph.
It is used to have an HashSet of HierarchicalNode.
A common question is to know if a certain state has already been encountered, this question is answered using the function :
public DynamicalHierarchicalNode getHNodeForState(byte[] state)
The java 1.5 definition should be HierarchicalNodeSet<HierarchicalNode>
Constructor and Description |
---|
HierarchicalNodeSet() |
Modifier and Type | Method and Description |
---|---|
boolean |
add(HierarchicalNode e) |
void |
buildHashCode()
Initialize the value of the hashCode from the content of the set.
|
HierarchicalNode |
getHNodeForState(byte[] state)
Iterate over all the DynamicalHierarchicalNode in the HashSet and test if it
contains state using the function contains(state) of HierarchicalNode
|
int |
hashCode() |
String |
toString() |
clear, clone, contains, isEmpty, iterator, remove, size, spliterator
equals, removeAll
addAll, containsAll, retainAll, toArray, toArray
finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, containsAll, equals, removeAll, retainAll, toArray, toArray
parallelStream, removeIf, stream
public HierarchicalNode getHNodeForState(byte[] state)
Iterate over all the DynamicalHierarchicalNode in the HashSet and test if it contains state using the function contains(state) of HierarchicalNode
The complexity is equal to the count of HierarchicalNode times the function contains. That is O(|States|x|Genes|).
state
- The state to testpublic boolean add(HierarchicalNode e)
add
in interface Collection<HierarchicalNode>
add
in interface Set<HierarchicalNode>
add
in class HashSet<HierarchicalNode>
public int hashCode()
hashCode
in interface Collection<HierarchicalNode>
hashCode
in interface Set<HierarchicalNode>
hashCode
in class AbstractSet<HierarchicalNode>
public void buildHashCode()
public String toString()
toString
in class AbstractCollection<HierarchicalNode>
Copyright © 2005–2020. All rights reserved.