Uses of Class
com.hankcs.algorithm.State
-
-
Uses of State in com.hankcs.algorithm
Fields in com.hankcs.algorithm declared as State Modifier and Type Field Description private State
State. failure
fail 函数,如果没有匹配到,则跳转到此状态。private State
AhoCorasickDoubleArrayTrie.Builder. rootState
the root state of trieFields in com.hankcs.algorithm with type parameters of type State Modifier and Type Field Description private java.util.Map<java.lang.Character,State>
State. success
goto 表,也称转移函数。根据字符串的下一个字符转移到下一个状态Methods in com.hankcs.algorithm that return State Modifier and Type Method Description State
State. addState(java.lang.Character character)
State
State. failure()
获取failure状态State
State. nextState(java.lang.Character character)
按照character转移,根节点转移失败会返回自己(永远不会返回null)private State
State. nextState(java.lang.Character character, boolean ignoreRootState)
转移到下一个状态State
State. nextStateIgnoreRootState(java.lang.Character character)
按照character转移,任何节点转移失败会返回nullMethods in com.hankcs.algorithm that return types with arguments of type State Modifier and Type Method Description java.util.Collection<State>
State. getStates()
java.util.Map<java.lang.Character,State>
State. getSuccess()
获取goto表Methods in com.hankcs.algorithm with parameters of type State Modifier and Type Method Description private void
AhoCorasickDoubleArrayTrie.Builder. constructOutput(State targetState)
construct output tableprivate int
AhoCorasickDoubleArrayTrie.Builder. fetch(State parent, java.util.List<java.util.Map.Entry<java.lang.Integer,State>> siblings)
fetch siblings of a parent nodevoid
State. setFailure(State failState, int[] fail)
设置failure状态Method parameters in com.hankcs.algorithm with type arguments of type State Modifier and Type Method Description private int
AhoCorasickDoubleArrayTrie.Builder. fetch(State parent, java.util.List<java.util.Map.Entry<java.lang.Integer,State>> siblings)
fetch siblings of a parent nodeprivate int
AhoCorasickDoubleArrayTrie.Builder. insert(java.util.List<java.util.Map.Entry<java.lang.Integer,State>> siblings)
insert the siblings to double array trie
-