private void split ( Suffix < T , S > suffix , ActivePoint < T , S > activePoint ) { Node < T , S > breakNode = new Node <> ( this , sequence , tree ) ; Edge < T , S > newEdge = new Edge <> ( suffix . getEndPosition ( ) - 1 , breakNode , sequence , tree ) ; breakNode . insert ( newEdge ) ; Edge < T , S > oldEdge = new Edge <> ( start + activePoint . getLength ( ) , breakNode , sequence , tree ) ; oldEdge . end = end ; oldEdge . terminal = this . terminal ; breakNode . insert ( oldEdge ) ; this . terminal = breakNode ; end = start + activePoint . getLength ( ) ; tree . setSuffixLink ( breakNode ) ; tree . incrementInsertCount ( ) ; }
Splits the edge to enable the insertion of supplied suffix at the supplied active point .