Public Member Functions | List of all members
o2scl::uniform_grid_width< data_t > Class Template Reference

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

#include <uniform_grid.h>

Inheritance diagram for o2scl::uniform_grid_width< data_t >:
o2scl::uniform_grid< data_t >

Public Member Functions

 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. More...
 
- Public Member Functions inherited from o2scl::uniform_grid< data_t >
 uniform_grid ()
 Default constructor.
 
size_t get_nbins () const
 Get the number of bins (regions in between grid points) More...
 
size_t get_npoints () const
 Get the number of points in the grid (always get_nbins()+1) More...
 
bool is_log () const
 Return true if the grid is logarithmic. More...
 
template<class resize_vec_t >
void vector (resize_vec_t &v) const
 Fill a vector with the specified grid. More...
 
const data_t operator[] (size_t i) const
 Get the grid point with index i ( $ i \in [0,\mathrm{n_{bins}}] $)
 
 uniform_grid (const uniform_grid &ug)
 Copy constructor.
 
uniform_gridoperator= (const uniform_grid &ug)
 Copy from = operator.
 

Additional Inherited Members

- Protected Member Functions inherited from o2scl::uniform_grid< data_t >
 uniform_grid (data_t start, data_t end, data_t width, size_t n_bins, bool log=false)
 Construct a grid with specified values. More...
 
- Protected Attributes inherited from o2scl::uniform_grid< data_t >
data_t g_start
 The low-side of the first bin.
 
data_t g_end
 The high-side of the last bin.
 
data_t g_width
 The width of each bin. More...
 
size_t g_n_bins
 The number of bins.
 
bool g_log
 If true, use a logarithmic scale.
 

Detailed Description

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

Definition at line 333 of file uniform_grid.h.

Constructor & Destructor Documentation

◆ uniform_grid_width()

template<class data_t = double>
o2scl::uniform_grid_width< data_t >::uniform_grid_width ( data_t  start,
data_t  width,
size_t  n_bins 
)
inline

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

Definition at line 343 of file uniform_grid.h.


The documentation for this class was generated from the following file:

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).