private void linearizeState ( final FSA fsa , IntStack nodes , IntArrayList linearized , BitSet visited , int node ) { linearized . add ( node ) ; visited . set ( node ) ; for ( int arc = fsa . getFirstArc ( node ) ; arc != 0 ; arc = fsa . getNextArc ( arc ) ) { if ( ! fsa . isArcTerminal ( arc ) ) { final int target = fsa . getEndNode ( arc ) ; if ( ! visited . get ( target ) ) nodes . push ( target ) ; } } }
Add a state to linearized list .