void calcBins4Sec(double Range,double Angle,double Tolerance,double BandWidth){
  int ad=0;
  if (Range % this.LagSize == 0) {
    ad=0;
  }
  double width=0;
  if (this.Anisotropic) {
    bins=new bin[(int)Math.ceil(Range / this.LagSize) + ad][1];
    int r=0;
    for (int i=0; i < Pairs.size(); i++) {
      boolean tt=Between(Angle,Tolerance,Pairs.get(i).Direction);
      width=Pairs.get(i).Distance * Math.cos((Math.PI / 2) - Angle + Pairs.get(i).Direction);
      if (tt && Pairs.get(i).Distance < Range && Math.abs(width) <= BandWidth) {
        r=(int)Math.floor(Pairs.get(i).Distance / LagSize);
        if (bins[r][0] == null) {
          bin bb=new bin();
          bins[r][0]=bb;
        }
        bins[r][0].Distance+=Pairs.get(i).Distance;
        bins[r][0].Value+=Pairs.get(i).MomentI;
        bins[r][0].Size++;
      }
    }
    for (int i=0; i < bins.length; i++) {
      if (bins[i][0] == null) {
        bin bb=new bin();
        bins[i][0]=bb;
      }
      bins[i][0].Distance=bins[i][0].Distance / bins[i][0].Size;
      bins[i][0].Value=bins[i][0].Value / bins[i][0].Size;
    }
  }
}

void calcBins4Sec ( double Range , double Angle , double Tolerance , double BandWidth ) { int ad = 0 ; if ( Range % this . LagSize == 0 ) { ad = 0 ; } double width = 0 ; if ( this . Anisotropic ) { bins = new bin [ ( int ) Math . ceil ( Range / this . LagSize ) + ad ] [ 1 ] ; int r = 0 ; for ( int i = 0 ; i < Pairs . size ( ) ; i ++ ) { boolean tt = Between ( Angle , Tolerance , Pairs . get ( i ) . Direction ) ; width = Pairs . get ( i ) . Distance * Math . cos ( ( Math . PI / 2 ) - Angle + Pairs . get ( i ) . Direction ) ; if ( tt && Pairs . get ( i ) . Distance < Range && Math . abs ( width ) <= BandWidth ) { r = ( int ) Math . floor ( Pairs . get ( i ) . Distance / LagSize ) ; if ( bins [ r ] [ 0 ] == null ) { bin bb = new bin ( ) ; bins [ r ] [ 0 ] = bb ; } bins [ r ] [ 0 ] . Distance += Pairs . get ( i ) . Distance ; bins [ r ] [ 0 ] . Value += Pairs . get ( i ) . MomentI ; bins [ r ] [ 0 ] . Size ++ ; } } for ( int i = 0 ; i < bins . length ; i ++ ) { if ( bins [ i ] [ 0 ] == null ) { bin bb = new bin ( ) ; bins [ i ] [ 0 ] = bb ; } bins [ i ] [ 0 ] . Distance = bins [ i ] [ 0 ] . Distance / bins [ i ] [ 0 ] . Size ; bins [ i ] [ 0 ] . Value = bins [ i ] [ 0 ] . Value / bins [ i ] [ 0 ] . Size ; } } }
calculates the bin values based on sector classification and for anisotropic model
