Template Function librapid::arange(Start, Stop, Step)#
Defined in File pseudoConstructors.hpp
Function Documentation#
-
template<typename Scalar = double, typename Backend = backend::CPU, typename Start, typename Stop, typename Step>
Array<Scalar, Backend> librapid::arange(Start start, Stop stop, Step step)# Create a 1-dimensional Array from a range of numbers and a step size.
Provided with a start value and a stop value, create a 1-dimensional Array with \(\lfloor \frac{stop - start}{step} \rfloor \) elements, where each element is \(start + i \times step\), for \(i \in [0, \lfloor \frac{stop - start}{step} \rfloor)\).
- Template Parameters
Scalar – Scalar type of the Array
Backend – Backend for the Array
Start – Scalar type of the start value
Stop – Scalar type of the stop value
Step – Scalar type of the step size
- Parameters
start – First value in the range
stop – Second value in the range
step – Step size between values in the range
- Returns
Array