Class uniform_grid_width (o2scl)

O2scl : Class List

template<class data_t = double>
class uniform_grid_width : public o2scl::uniform_grid<double>

Linear grid with fixed number of bins and fixed bin size.

Note

If the width does not precisely divide the interval between the start and end, then the last bin will be larger than all of the other bins. If finite-precision is causing the last bin to be too large, then this can sometimes be fixed by decreasing the bin width by a small amount.

Public Functions

inline uniform_grid_width(data_t start, data_t width, size_t n_bins)

Create a grid with n_bins bins starting at start with size width.

The value of n_bins must be larger than zero and width must not be zero.

inline uniform_grid_width()

Default constructor.