public abstract class GenericDaciukAlgo<E>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected E |
startState |
| Constructor and Description |
|---|
GenericDaciukAlgo() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(gnu.trove.list.TIntList seq) |
void |
addMinWord(gnu.trove.list.TIntList input) |
abstract E |
addState()
Adds a new state to the automaton
|
protected java.util.List<E> |
addSuffix(E startState,
gnu.trove.list.TIntList seq,
int start,
int end)
Add suffix to given new state
|
abstract E |
cloneState(E state)
Clones given state.
|
java.util.List<E> |
commonPrefix(gnu.trove.list.TIntList seq) |
int |
findConfluence(java.util.List<E> nodes) |
abstract E |
getNext(E state,
int input)
Find matching outbound transition for given state
|
abstract boolean |
isConfluence(E state)
Checks a state for confluence (if in has more that 1 inbound transitions)
|
abstract boolean |
isFinal(E state)
Checks if state is final for this final feature
|
abstract void |
regAdd(E state)
Add state to register
|
abstract E |
regGet(E state)
Get equivalent state from register
|
abstract void |
regRemove(E state)
Remove given state from register.
|
abstract void |
removeState(E state)
Removes given state from the automaton
|
abstract boolean |
setFinal(E state)
public set final feature for state
|
abstract boolean |
setNext(E src,
int label,
E next)
Adds a transition from src to dest on given label, if
a transition from src with given label already exists, then change it
to new destination state.
|
protected E startState
public abstract E getNext(E state, int input)
state - source stateinput - labelpublic abstract boolean isConfluence(E state)
state - state to checkpublic abstract E cloneState(E state)
state - public abstract E addState()
public abstract boolean setNext(E src, int label, E next)
src - source statelabel - transition labeldest - destination statepublic abstract void removeState(E state)
state - state indexpublic abstract boolean setFinal(E state)
state - public abstract boolean isFinal(E state)
state - public abstract void regAdd(E state)
state - public abstract E regGet(E state)
state - reference statepublic abstract void regRemove(E state)
state - state to removeprotected java.util.List<E> addSuffix(E startState, gnu.trove.list.TIntList seq, int start, int end)
startState - base nodeseq - sequence to addfin - final statepublic java.util.List<E> commonPrefix(gnu.trove.list.TIntList seq)
public int findConfluence(java.util.List<E> nodes)
public void addMinWord(gnu.trove.list.TIntList input)
public void add(gnu.trove.list.TIntList seq)