public boolean removeNode ( int x , ICause cause ) throws ContradictionException { assert cause != null ; assert ( x >= 0 && x < n ) ; if ( LB . getNodes ( ) . contains ( x ) ) { this . contradiction ( cause , "remove mandatory node" ) ; return true ; } else if ( ! UB . getNodes ( ) . contains ( x ) ) { return false ; } ISet nei = UB . getSuccOrNeighOf ( x ) ; for ( int i : nei ) { removeArc ( x , i , cause ) ; } nei = UB . getPredOrNeighOf ( x ) ; for ( int i : nei ) { removeArc ( i , x , cause ) ; } if ( UB . removeNode ( x ) ) { if ( reactOnModification ) { delta . add ( x , GraphDelta . NR , cause ) ; } GraphEventType e = GraphEventType . REMOVE_NODE ; notifyPropagators ( e , cause ) ; return true ; } return false ; }
Remove node x from the domain Removes x from the upper bound graph