![]() |
Object-oriented Scientific Computing Library: Version 0.909
|
A class representing a uniform linear or logarithmic grid. More...
#include <grid.h>
Public Member Functions | |
size_t | get_nbins () |
Get the number of bins (regions in between grid points) | |
size_t | get_npoints () |
Get the number of points in the grid (always get_nbins()+1) | |
bool | is_log () |
Return true if the grid is logarithmic. | |
template<class vec_t > | |
void | vector (vec_t &v) |
Fill a vector with the specified grid. | |
const data_t | operator[] (size_t i) const |
Get the grid point with index i ( ![]() | |
Protected Member Functions | |
grid (data_t start, data_t end, data_t width, size_t n_bins, bool log=false) | |
Construct a grid with specified values. | |
Protected Attributes | |
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. | |
size_t | g_n_bins |
The number of bins. | |
bool | g_log |
If true, use a logarithmic scale. |
Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).