public long avgRate(){
  long sum=0L;
  for (  Sample s : samples) {
    sum+=s.rate();
  }
  return (long)(sum / (long)samples.size());
}

public long avgRate ( ) { long sum = 0L ; for ( Sample s : samples ) { sum += s . rate ( ) ; } return ( long ) ( sum / ( long ) samples . size ( ) ) ; }
returns the average of the message rates in the samplegroup .
