Celeritas  0.5.0-56+6b053cd
Functions
VectorUtils.cc File Reference
#include "VectorUtils.hh"
#include "corecel/Assert.hh"
#include "corecel/Types.hh"
#include "corecel/cont/Range.hh"
#include "corecel/grid/Interpolator.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...
 

Function Documentation

◆ logspace()

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.