private boolean cDelete ( Bounds [ ] in , int [ ] from , int [ ] to , boolean canRestore ) throws ConstraintNotFound , MalformedSimpleDistanceConstraint { for ( int i = 0 ; i < in . length ; i ++ ) { //Conversion long min = in [ i ] . min ; long max = in [ i ] . max ; if ( in [ i ] . max == Long . MAX_VALUE - 1 ) max = H - O ; if ( in [ i ] . min == Long . MIN_VALUE + 1 ) min = - 1 * ( H - O ) ; in [ i ] = new Bounds ( min , max ) ; SimpleDistanceConstraint con = tPoints [ from [ i ] ] . getOut ( to [ i ] ) ; if ( con == null ) { throw new ConstraintNotFound ( String . format ( "Interval %s, from %d, to %d" , in [ i ] . toString ( ) , from [ i ] , to [ i ] ) ) ; } if ( con . getCounter ( ) == 1 ) { if ( con . removeInterval ( in [ i ] ) ) tPoints [ from [ i ] ] . setOut ( to [ i ] , null ) ; else throw new MalformedSimpleDistanceConstraint ( con , 1 ) ; } else if ( ! con . removeInterval ( in [ i ] ) ) throw new MalformedSimpleDistanceConstraint ( con , 2 ) ; } if ( ! canRestore ) fromScratchDistanceMatrixComputation ( ) ; else { logger . finest ( "QuickRestoring distance matrix, no propagation" ) ; if ( backupDMatrixSimple ) restoreDMatrix ( ) ; } for ( int j = 0 ; j < MAX_USED + 1 ; j ++ ) if ( tPoints [ j ] . isUsed ( ) == true ) { tPoints [ j ] . setLowerBound ( sum ( - distance [ j ] [ 0 ] , O ) ) ; tPoints [ j ] . setUpperBound ( sum ( distance [ 0 ] [ j ] , O ) ) ; } return true ; }
throw error in case of parameter inconsistency