private void createFilterStages(float[] coefficients,int decimationRatio){
  int tapSize=(int)Math.ceil((double)coefficients.length / (double)decimationRatio);
  float[][] coefficientSets=new float[decimationRatio][tapSize];
  int stagePointer=0;
  int coefficientPointer=0;
  for (int x=0; x < coefficients.length; x++) {
    coefficientSets[stagePointer++][coefficientPointer]=coefficients[x];
    if (stagePointer >= decimationRatio) {
      stagePointer=0;
      coefficientPointer++;
    }
  }
  for (int x=0; x < decimationRatio; x++) {
    mFilterStages.add(new FilterStage(coefficientSets[x]));
  }
}

private void createFilterStages ( float [ ] coefficients , int decimationRatio ) { int tapSize = ( int ) Math . ceil ( ( double ) coefficients . length / ( double ) decimationRatio ) ; float [ ] [ ] coefficientSets = new float [ decimationRatio ] [ tapSize ] ; int stagePointer = 0 ; int coefficientPointer = 0 ; for ( int x = 0 ; x < coefficients . length ; x ++ ) { coefficientSets [ stagePointer ++ ] [ coefficientPointer ] = coefficients [ x ] ; if ( stagePointer >= decimationRatio ) { stagePointer = 0 ; coefficientPointer ++ ; } } for ( int x = 0 ; x < decimationRatio ; x ++ ) { mFilterStages . add ( new FilterStage ( coefficientSets [ x ] ) ) ; } }
creates polyphase filter stages ( arms ) from the set of coefficients .
