private double[] calculateB(){
  int length=mExtremalIndices.size();
  double[] b=new double[length];
  for (int k=0; k < length; k++) {
    b[k]=1.0;
    double xk=mGrid.getCosineFrequencyGrid()[mExtremalIndices.get(k)];
    for (int i=0; i < length; i++) {
      if (i != k) {
        double xi=mGrid.getCosineFrequencyGrid()[mExtremalIndices.get(i)];
        double denominator=xk - xi;
        if (Math.abs(denominator) < 0.00001) {
          denominator=0.00001;
        }
        b[k]*=1.0 / denominator;
      }
    }
  }
  return b;
}

private double [ ] calculateB ( ) { int length = mExtremalIndices . size ( ) ; double [ ] b = new double [ length ] ; for ( int k = 0 ; k < length ; k ++ ) { b [ k ] = 1.0 ; double xk = mGrid . getCosineFrequencyGrid ( ) [ mExtremalIndices . get ( k ) ] ; for ( int i = 0 ; i < length ; i ++ ) { if ( i != k ) { double xi = mGrid . getCosineFrequencyGrid ( ) [ mExtremalIndices . get ( i ) ] ; double denominator = xk - xi ; if ( Math . abs ( denominator ) < 0.00001 ) { denominator = 0.00001 ; } b [ k ] *= 1.0 / denominator ; } } } return b ; }
calculates the value of b across the set of extremal indices . implements oppenheim / schafer discrete time signal processing , 3e , 2016 , equation 115
