#include <CBinning.h>


Public Member Functions | |
| CBinLinear (double radmin, double radmax, int nbin) | |
| int | get_bin_number (int) |
| int | get_bin_number (double) |
| double | get_upbnd_bin (int) |
| double | get_lowbnd_bin (int) |
| double | get_center_bin (int) |
Private Attributes | |
| double | radmin |
| double | radmax |
| int | nbin |
| int CBinLinear::get_bin_number | ( | double | radius | ) | [virtual] |
return the bin number for an xvalue between radmin and radmax, with nbin bins. the scale is linear. A value of radmin returns 0, a value of radmax returns nbin - 1. (radmax would normally return nbin but is modified by hand to avoid segfaults)
throws exceptions like get_bin_number(int ipart)
Implements Cbinner.
| int CBinLinear::get_bin_number | ( | int | ipart | ) | [virtual] |
see the version with double radius as argument, this version: assume the argument is a particle number, calculate its radius.
throws a -1 exception if radius < radmin, 1 >
Implements Cbinner.
| double CBinLinear::get_center_bin | ( | int | bin | ) | [virtual] |
returns the center value of a bin. bins: between 0 and nbin-1
Implements Cbinner.
1.5.8