SciEx.Float32.Array1 (sci_ex v0.2.0)

1D Array of 32-bit floating point numbers

Summary

Functions

Tests whether every element in a is less than every element in b with the same index.

Tests whether every element in a is greater than or equal to every element in b with the same index.

Tests whether every element in a is less than every element in b with the same index.

Tests whether every element in a is less than or equal to every element in b with the same index.

Tests whether every element in a is different from the element in b with the same index.

Tests whether two arrays are equal. The arrays are considered equal if every element from a is equal to the element of b with the same index.

Create a 1D array from an Elixir list of floating point numbers.

Return an array of n numbers spaced evenly on a log scale (a geometric progression) on the interval [start, stop].

Returns an array of values that partition the [start, stop] interval into n equal parts.

Returns an array of values of n numbers spaced evenly on a log scale Return numbers spaced evenly on a log scale.

Tests whether two arrays are different.

Creates an array of ones (1.0) with the given dimensions.

Creates an array of zeros (0.0) with the given dimensions.

Types

t()

@type t() :: %SciEx.Float32.Array1{n_dims: term(), resource: term()}

Functions

all_greater_than?(a, b)

@spec all_greater_than?(t(), t()) :: boolean()

Tests whether every element in a is less than every element in b with the same index.

all_greater_than_or_equal?(a, b)

@spec all_greater_than_or_equal?(t(), t()) :: boolean()

Tests whether every element in a is greater than or equal to every element in b with the same index.

all_less_than?(a, b)

@spec all_less_than?(t(), t()) :: boolean()

Tests whether every element in a is less than every element in b with the same index.

all_less_than_or_equal?(a, b)

@spec all_less_than_or_equal?(t(), t()) :: boolean()

Tests whether every element in a is less than or equal to every element in b with the same index.

all_not_equal?(a, b)

@spec all_not_equal?(t(), t()) :: boolean()

Tests whether every element in a is different from the element in b with the same index.

This function is different from not_equal?/2 as not_equal?/2 considers the arrays to be different as long as a single element difers.

equal?(a, b)

@spec equal?(t(), t()) :: boolean()

Tests whether two arrays are equal. The arrays are considered equal if every element from a is equal to the element of b with the same index.

from_list(list)

Create a 1D array from an Elixir list of floating point numbers.

geomspace(start, stop, n)

@spec geomspace(number(), number(), integer()) :: t()

Return an array of n numbers spaced evenly on a log scale (a geometric progression) on the interval [start, stop].

linspace(start, stop, n)

@spec linspace(number(), number(), integer()) :: t()

Returns an array of values that partition the [start, stop] interval into n equal parts.

logspace(base, start, stop, n)

@spec logspace(number(), number(), number(), integer()) :: t()

Returns an array of values of n numbers spaced evenly on a log scale Return numbers spaced evenly on a log scale.

TODO: explain this one better

not_equal?(a, b)

@spec not_equal?(t(), t()) :: boolean()

Tests whether two arrays are different.

ones(n1)

@spec ones(pos_integer()) :: t()

Creates an array of ones (1.0) with the given dimensions.

zeros(n1)

@spec zeros(pos_integer()) :: t()

Creates an array of zeros (0.0) with the given dimensions.