@Override public Double analyse(double[] frame){
  if (frame.length != getFrameLengthSamples())   throw new IllegalArgumentException("Expected frame of length " + getFrameLengthSamples() + ", got "+ frame.length);
  double totalEnergy=0;
  for (int i=0; i < frame.length; i++) {
    totalEnergy+=frame[i] * frame[i];
  }
  rememberFrameEnergy(totalEnergy);
  return new Double(totalEnergy);
}

@ Override public Double analyse ( double [ ] frame ) { if ( frame . length != getFrameLengthSamples ( ) ) throw new IllegalArgumentException ( "Expected frame of length " + getFrameLengthSamples ( ) + ", got " + frame . length ) ; double totalEnergy = 0 ; for ( int i = 0 ; i < frame . length ; i ++ ) { totalEnergy += frame [ i ] * frame [ i ] ; } rememberFrameEnergy ( totalEnergy ) ; return new Double ( totalEnergy ) ; }
apply this framebasedanalyser to the given data .
