Celeritas
0.5.0-56+6b053cd
|
Grid creation helpers. More...
#include <algorithm>
#include <vector>
#include "corecel/Types.hh"
#include "corecel/cont/Span.hh"
#include "corecel/math/Algorithms.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::logspace (double start, double stop, size_type n) |
Return logarithmically spaced numbers over a given interval. More... | |
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. | |
Grid creation helpers.
std::vector< double > celeritas::logspace | ( | double | start, |
double | stop, | ||
size_type | n | ||
) |
Return logarithmically spaced numbers over a given interval.
Unlike numpy's logspace which assumes the start and stop are log-10 values (unless given another argument), the start and stop are the actual first and last values of the resulting vector.