private boolean incrementalDistanceMatrixComputation(int from,int to,Bounds i) {
		logger.fine("Propagating (quad) with (#TPs,#cons) = (" + this.MAX_USED + "," + this.theNetwork.getConstraints().length + ") (call num.: " + (++quadPropCount) + ")");

		if (distance[to][from] != APSPSolver.INF && sum(i.max,distance[to][from]) < 0) return false;
		if (distance[from][to] != APSPSolver.INF && sum(-i.min,distance[from][to]) < 0) return false;
		
//		System.out.println("a)" + sum(i.max,distance[to][from]));
//		System.out.println("b)" + sum(-i.min,distance[from][to]));
		
		long sum1;
		long sum2;
		long sum3;
		long sum4;
		long temp;
		
		for (int u = 0; u < MAX_USED+1; u++) {
			if (tPoints[u].isUsed()) {
				for (int v = 0; v < MAX_USED+1;v++) {
					if (tPoints[v].isUsed()) {
						//min{distance[u][v];(distance[u][from]+i.max+distance[to][v]);(distance[u][to]-i.minl+distance[from][v])}
						sum1 = sum(distance[u][to],-i.min);
						sum2 = sum(sum1,distance[from][v]);
						sum3 = sum(distance[u][from],i.max);
						sum4 = sum(sum3,distance[to][v]);
						temp = Math.min(sum2,sum4);
												
						if (distance[u][v] > temp) {
							//long oldD = distance[u][v];
							distance[u][v] = temp;
							if (u == v && distance[u][v] != 0) {
								//logger.info("==================> Updated distance[" + u + "][" + v + "] from " + oldD + " to " + temp);
								//throw new Error("Found negative cycle in incremental propagation while adding (from,to,i) (" + from + "," + to + "," + i + ")");
								return false;
							}
						}
					}
				}
			}
		}
		return true;
	}
private boolean incrementalDistanceMatrixComputation ( int from , int to , Bounds i ) { logger . fine ( "Propagating (quad) with (#TPs,#cons) = (" + this . MAX_USED + "," + this . theNetwork . getConstraints ( ) . length + ") (call num.: " + ( ++ quadPropCount ) + ")" ) ; if ( distance [ to ] [ from ] != APSPSolver . INF && sum ( i . max , distance [ to ] [ from ] ) < 0 ) return false ; if ( distance [ from ] [ to ] != APSPSolver . INF && sum ( - i . min , distance [ from ] [ to ] ) < 0 ) return false ; long sum1 ; long sum2 ; long sum3 ; long sum4 ; long temp ; for ( int u = 0 ; u < MAX_USED + 1 ; u ++ ) { if ( tPoints [ u ] . isUsed ( ) ) { for ( int v = 0 ; v < MAX_USED + 1 ; v ++ ) { if ( tPoints [ v ] . isUsed ( ) ) { sum1 = sum ( distance [ u ] [ to ] , - i . min ) ; sum2 = sum ( sum1 , distance [ from ] [ v ] ) ; sum3 = sum ( distance [ u ] [ from ] , i . max ) ; sum4 = sum ( sum3 , distance [ to ] [ v ] ) ; temp = Math . min ( sum2 , sum4 ) ; if ( distance [ u ] [ v ] > temp ) { distance [ u ] [ v ] = temp ; if ( u == v && distance [ u ] [ v ] != 0 ) { return false ; } } } } } } return true ; }
Gd graph propagation function