Function linspace

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 from start and ending at end. 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 from start to end.