Function linspace
Defined in File utils.hpp
Function Documentation
-
std::vector<float> linspace(float start, float end, int num)
Generates a vector of linearly spaced values.
This function returns a vector of
num
evenly spaced values starting fromstart
and ending atend
. The spacing between values is calculated such that the values are evenly distributed over the specified range.- Parameters:
start – The starting value of the sequence.
end – The ending value of the sequence.
num – The number of values to generate.
- Returns:
std::vector<float> A vector containing
num
linearly spaced values fromstart
toend
.