public Iterable < N > expandTransitionsChanged ( N begin , Iterable < Transition < A , S > > transitions ) { Collection < N > nodes = new ArrayList < N > ( ) ; for ( Transition < A , S > transition : transitions ) { S state = transition . getState ( ) ; //if v != start if ( ! state . equals ( begin . state ( ) ) ) { //if s' not visited before: v(s')=g(s')=Infinity; bp(s')=null N node = this . visited . get ( state ) ; if ( node == null ) { node = nodeFactory . makeNode ( begin , transition ) ; visited . put ( state , node ) ; } // bp(v) = arg min s'' predecessor of v such that (v(s'') + c(s'', v)) // g(v) = v(bp(v)) + c(bp(v), v) updateInconsistent ( node , predecessorsMap ( transition . getState ( ) ) ) ; nodes . add ( node ) ; } } return nodes ; }
Generates an iterable list of nodes updated as inconsistent after applying the cost changes in the list of transitions passed as parameter .