private double [ ] computeResidualVector ( double [ ] vector , int centroidIndex ) { double [ ] residualVector = new double [ vectorLength ] ; for ( int i = 0 ; i < vectorLength ; i ++ ) { residualVector [ i ] = coarseQuantizer [ centroidIndex ] [ i ] - vector [ i ] ; } return residualVector ; }
Computes the residual vector .