LinSpace

class in Clatter.Core

Linear space generator.

Static Methods

Get

public static double[] Get(double a, double b, int steps)

Equivalent to numpy.linspace. This is an optimized version of this: Vector.Interval.Generated.cs

Name Type Description
a double The start value.
b double The end value. It's assumed that b is greater than a.
steps int The number of steps.

GetInPlace

public static void GetInPlace(double a, double b, int steps, ref double[] arr)

Equivalent to numpy.linspace. The array is generated in-place to avoid memory allocation. This is an optimized version of this: Vector.Interval.Generated.cs

Name Type Description
a double The start value.
b double The end value. It's assumed that b is greater than a.
steps int The number of steps.
arr ref double[] The array. This will be resized if needed.