public void updateAfterInsert ( Suffix < T , S > suffix ) { if ( activeNode == root && suffix . isEmpty ( ) ) { activeNode = root ; activeEdge = null ; activeLength = 0 ; } else if ( activeNode == root ) { Object item = suffix . getStart ( ) ; activeEdge = root . getEdgeStarting ( item ) ; decrementLength ( ) ; fixActiveEdgeAfterSuffixLink ( suffix ) ; if ( activeLength == 0 ) activeEdge = null ; } else if ( activeNode . hasSuffixLink ( ) ) { activeNode = activeNode . getSuffixLink ( ) ; findTrueActiveEdge ( ) ; fixActiveEdgeAfterSuffixLink ( suffix ) ; if ( activeLength == 0 ) activeEdge = null ; } else { activeNode = root ; findTrueActiveEdge ( ) ; fixActiveEdgeAfterSuffixLink ( suffix ) ; if ( activeLength == 0 ) activeEdge = null ; } }
Resets the active point after an insert .