id, initialNumArcs
Modifier | Constructor and Description |
---|---|
protected |
ImmutableState()
Default protected constructor.
|
protected |
ImmutableState(int numArcs)
Constructor specifying the capacity of the arcs array.
|
Modifier and Type | Method and Description |
---|---|
void |
addArc(Arc arc)
Add an outgoing arc to the state
|
void |
arcSort(java.util.Comparator<Arc> cmp)
Shorts the arc's ArrayList based on the provided Comparator
|
Arc |
deleteArc(int index)
Delete an arc based on its index
|
boolean |
equals(java.lang.Object obj) |
Arc |
getArc(int index)
Get an arc based on it's index the arcs ArrayList
|
int |
getNumArcs()
Get the number of outgoing arcs
|
int |
hashCode() |
void |
setArc(int index,
Arc arc)
Set an arc at the specified position in the arcs' array.
|
void |
setArcs(Arc[] arcs)
Set the state's arcs array
|
getFinalWeight, getId, setArcs, setFinalWeight, toString
protected ImmutableState()
ImmutableFst.loadModel(String)
protected ImmutableState(int numArcs)
numArcs
- number of arcspublic void arcSort(java.util.Comparator<Arc> cmp)
State
public void addArc(Arc arc)
State
public void setArc(int index, Arc arc)
public Arc deleteArc(int index)
State
public void setArcs(Arc[] arcs)
arcs
- the arcs array to setpublic int getNumArcs()
State
getNumArcs
in class State
public Arc getArc(int index)
State