public class HierarchicalNode extends Object implements Comparable<Object>, Dotify
Define the nodes of the Hierarchical Transition Graph.
A node has a unique id uid, a type defining the kind of Strongly Connected Component it contains and statesSet, the set of all the states it contains.
Modifier and Type | Field and Description |
---|---|
StatesSet |
statesSet
The set of states
|
static Color |
TYPE_EDEN_TRANSIENT_COMPONENT_COLOR |
static byte |
TYPE_STABLE_STATE |
static Color |
TYPE_STABLE_STATE_COLOR |
static String |
TYPE_STABLE_STATE_STRING |
static byte |
TYPE_TERMINAL_CYCLE |
static Color |
TYPE_TERMINAL_CYCLE_COLOR |
static String |
TYPE_TERMINAL_CYCLE_STRING |
static byte |
TYPE_TRANSIENT_COMPONENT |
static Color |
TYPE_TRANSIENT_COMPONENT_ALONE_COLOR |
static Color |
TYPE_TRANSIENT_COMPONENT_COLOR |
static String |
TYPE_TRANSIENT_COMPONENT_STRING |
static byte |
TYPE_TRANSIENT_CYCLE |
static Color |
TYPE_TRANSIENT_CYCLE_COLOR |
static String |
TYPE_TRANSIENT_CYCLE_STRING |
Constructor and Description |
---|
HierarchicalNode(HierarchicalTransitionGraph htg)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addAllTheStatesInQueue()
Perform a mergeMultiple on all the omdd in the pile and the root.
|
boolean |
addEdgeTo(HierarchicalNode to)
Add an edge between to a node
|
void |
addState(byte[] state,
int status)
Add the state directly to the stateSet.
|
void |
addStateToThePile(byte[] state)
Add a new state to the pile.
|
int |
compareTo(Object arg0) |
boolean |
contains(byte[] state)
Indicates if the HierarchicalNode contains a state by searching both the pile and the omdd
|
StringBuffer |
firstStatesToString()
Return a string representation of the first state in the node.
|
Set<HierarchicalNode> |
getIn() |
String |
getLongId() |
Set<HierarchicalNode> |
getOut() |
String |
getShortId() |
HierarchicalSigmaSet |
getSigma()
return the set sigma
|
int |
getSize() |
byte |
getType() |
long |
getUniqueId()
Return the long identifying this node "uniquely" (if in the range of long)
|
int |
hashcode() |
boolean |
isCycle() |
boolean |
isStable() |
boolean |
isTerminal() |
boolean |
isTransient() |
void |
merge(HierarchicalNode slaveNode,
Collection<HierarchicalNode> nodeSet,
HierarchicalSigmaSetFactory sigmaSetFactory,
HierarchicalTransitionGraph htg)
Merge the slave (or its master) node into this (or its master).
|
void |
parse(String parse) |
void |
releaseEdges() |
void |
setIn(Set<HierarchicalNode> in) |
void |
setLabelCount(short intValue) |
void |
setOut(Set<HierarchicalNode> out) |
void |
setSigma(HierarchicalSigmaSet sigma)
return the set sigma
|
void |
setType(byte type) |
void |
setTypeFromString(String type)
Set the type from a string
|
List<byte[]> |
statesToList()
Initialize and fill a list with all the states in the omdd
Each item of the returned list is a string representation using wildcard * (-1).
|
String |
statesToString() |
String |
statesToString(boolean addValue) |
String |
toDot()
Return a dot representation of the object as a String
|
String |
toDot(Object to)
Return a dot representation of the edge as a String
The object is the source of the edge, the first parameter is the target.
|
String |
toLongString() |
String |
toString() |
static byte |
typeFromString(String type)
Return an int representation for a given string
|
String |
typeToString()
Return a string representation for the type of this node.
|
static String |
typeToString(int type)
Return a string representation for a given type.
|
void |
updateSize()
Compute the size.
|
String |
write() |
public static final byte TYPE_TRANSIENT_COMPONENT
public static final byte TYPE_TRANSIENT_CYCLE
public static final byte TYPE_TERMINAL_CYCLE
public static final byte TYPE_STABLE_STATE
public static final String TYPE_TRANSIENT_COMPONENT_STRING
public static final String TYPE_TERMINAL_CYCLE_STRING
public static final String TYPE_TRANSIENT_CYCLE_STRING
public static final String TYPE_STABLE_STATE_STRING
public static final Color TYPE_TRANSIENT_COMPONENT_ALONE_COLOR
public static final Color TYPE_TRANSIENT_COMPONENT_COLOR
public static final Color TYPE_TRANSIENT_CYCLE_COLOR
public static final Color TYPE_EDEN_TRANSIENT_COMPONENT_COLOR
public static final Color TYPE_TERMINAL_CYCLE_COLOR
public static final Color TYPE_STABLE_STATE_COLOR
public StatesSet statesSet
public HierarchicalNode(HierarchicalTransitionGraph htg)
public void addAllTheStatesInQueue()
public void addStateToThePile(byte[] state)
state
- the state to addpublic void addState(byte[] state, int status)
state
- status
- public boolean contains(byte[] state)
state
- public void merge(HierarchicalNode slaveNode, Collection<HierarchicalNode> nodeSet, HierarchicalSigmaSetFactory sigmaSetFactory, HierarchicalTransitionGraph htg)
slaveNode
- nodeSet
- htg
- public int getSize()
public void updateSize()
public boolean addEdgeTo(HierarchicalNode to)
to
- public void setOut(Set<HierarchicalNode> out)
out
- the out to setpublic Set<HierarchicalNode> getOut()
public void setIn(Set<HierarchicalNode> in)
in
- the in to setpublic Set<HierarchicalNode> getIn()
public void releaseEdges()
public HierarchicalSigmaSet getSigma()
public void setSigma(HierarchicalSigmaSet sigma)
public long getUniqueId()
public int hashcode()
public void parse(String parse) throws SAXException
SAXException
public void setLabelCount(short intValue)
public String toLongString()
public String getShortId()
public String getLongId()
public String write()
public String statesToString()
public String statesToString(boolean addValue)
public List<byte[]> statesToList()
public StringBuffer firstStatesToString()
public boolean isStable()
public boolean isTransient()
public boolean isCycle()
public boolean isTerminal()
public void setType(byte type)
public byte getType()
public String typeToString()
public static String typeToString(int type)
type
- is either TYPE_STABLE_STATEG or TYPE_TERMINAL_CYCLE or TYPE_TRANSIENT_COMPONENTpublic void setTypeFromString(String type)
type
- a string from the constants TYPE_STABLE_STATE_STRING, TYPE_TERMINAL_CYCLE_STRING...public static byte typeFromString(String type)
type
- is either TYPE_STABLE_STATE_STRING or TYPE_TERMINAL_CYCLE_STRING or TYPE_TRANSIENT_COMPONENT_STRING OR TYPE_CYCLE_STRINGpublic String toDot()
Dotify
public String toDot(Object to)
Dotify
public int compareTo(Object arg0)
compareTo
in interface Comparable<Object>
Copyright © 2005–2020. All rights reserved.