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 StateState. failurefail 函数,如果没有匹配到,则跳转到此状态。private StateAhoCorasickDoubleArrayTrie.Builder. rootStatethe 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. successgoto 表,也称转移函数。根据字符串的下一个字符转移到下一个状态Methods in com.hankcs.algorithm that return State Modifier and Type Method Description StateState. addState(java.lang.Character character)StateState. failure()获取failure状态StateState. nextState(java.lang.Character character)按照character转移,根节点转移失败会返回自己(永远不会返回null)private StateState. nextState(java.lang.Character character, boolean ignoreRootState)转移到下一个状态StateState. 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 voidAhoCorasickDoubleArrayTrie.Builder. constructOutput(State targetState)construct output tableprivate intAhoCorasickDoubleArrayTrie.Builder. fetch(State parent, java.util.List<java.util.Map.Entry<java.lang.Integer,State>> siblings)fetch siblings of a parent nodevoidState. setFailure(State failState, int[] fail)设置failure状态Method parameters in com.hankcs.algorithm with type arguments of type State Modifier and Type Method Description private intAhoCorasickDoubleArrayTrie.Builder. fetch(State parent, java.util.List<java.util.Map.Entry<java.lang.Integer,State>> siblings)fetch siblings of a parent nodeprivate intAhoCorasickDoubleArrayTrie.Builder. insert(java.util.List<java.util.Map.Entry<java.lang.Integer,State>> siblings)insert the siblings to double array trie
-