Celeritas 0.6.0-47+develop.b3cbb238
|
Grid creation helpers. More...
#include <algorithm>
#include <cmath>
#include <vector>
#include "corecel/Types.hh"
#include "corecel/cont/Range.hh"
#include "corecel/cont/Span.hh"
#include "corecel/math/Algorithms.hh"
#include "corecel/math/SoftEqual.hh"
Functions | |
std::vector< double > | celeritas::linspace (double start, double stop, size_type n) |
Return evenly spaced numbers over a given interval. | |
std::vector< double > | celeritas::geomspace (double start, double stop, size_type n) |
Return logarithmically spaced numbers over a given interval. | |
std::vector< double > | celeritas::logspace (double start, double stop, size_type n) |
Return logarithmically spaced numbers over a specific interval. | |
template<class T > | |
bool | celeritas::is_monotonic_nondecreasing (Span< T > grid) |
True if the grid values are monotonically nondecreasing. | |
template<class T > | |
bool | celeritas::is_monotonic_increasing (Span< T > grid) |
True if the grid values are monotonically increasing. | |
template<class T > | |
T | celeritas::calc_log_delta (Span< T const > grid) |
Calculate (geometric) ratio of successive grid points in a uniform log grid. | |
template<class T > | |
bool | celeritas::has_log_spacing (Span< T const > grid) |
True if the grid has logarithmic spacing. | |
Grid creation helpers.
Return logarithmically spaced numbers over a given interval.
This is a geometric progression of values, where the ratio between each neighbor is constant.
Return logarithmically spaced numbers over a specific interval.