question: public void deleteSelection ( ArrayList < Integer > nodes ) { for ( int i = 0 ; i < nodes . size ( ) ; i ++ ) { for ( int j = i + 1 ; j < nodes . size ( ) ; j ++ ) { if ( nodes . get ( i ) > nodes . get ( j ) ) { int h = nodes . get ( i ) ; nodes . set ( i , nodes . get ( j ) ) ; nodes . set ( j , h ) ; } } } if ( m_bNeedsUndoAction ) { addUndoAction ( new DeleteSelectionAction ( nodes ) ) ; } boolean bNeedsUndoAction = m_bNeedsUndoAction ; m_bNeedsUndoAction = false ; try { for ( int iNode = nodes . size ( ) - 1 ; iNode >= 0 ; iNode -- ) { deleteNode ( nodes . get ( iNode ) ) ; } } catch ( Exception e ) { e . printStackTrace ( ) ; } m_bNeedsUndoAction = bNeedsUndoAction ; }
target:  Delete nodes with indexes in selection from the network, updating instances, parentsets, distributions Conditional distributions are condensed by taking the values for the target node to be its first value. Used for manual manipulation of the Bayesian network.