tensor v0.8.0 Vector

Summary

Functions

Elementwise addition of vectors vector_a and vector_b

Elementwise division of vector_a and vector_b. Make sure that the identity of vector_b isn’t 0 before doing this

Returns the element at index from vector

Returns the element at index from vector. If index is out of bounds, returns default

Returns the current identity of vector vector

Elementwise multiplication of vector_a with vector_b

Elementwise subtraction of vector_b from vector_a

true if a is a Vector

Functions

add(a, b)

See Tensor.add/2.

add_number(a, b)

See Tensor.add_number/2.

add_vector(vector_a, vector_b)

Elementwise addition of vectors vector_a and vector_b.

dense_map_with_coordinates(vector, function)

See Tensor.dense_map_with_coordinates/2.

div(a, b)

See Tensor.div/2.

div_number(a, b)

See Tensor.div_number/2.

div_vector(vector_a, vector_b)

Elementwise division of vector_a and vector_b. Make sure that the identity of vector_b isn’t 0 before doing this.

dot_product(arg1, arg2)
fetch(vector, index)

Returns the element at index from vector.

from_list(list, identity \\ 0)
get(vector, index, default)

Returns the element at index from vector. If index is out of bounds, returns default.

get_and_update(vector, index, function)

See Tensor.get_and_update/3.

identity(vector)

Returns the current identity of vector vector.

length(vector)
lift(vector)

See Tensor.lift/1.

map(vector, function)

See Tensor.map/2.

merge(vector_a, vector_b, function)

See Tensor.merge/3.

merge_with_index(vector_a, vector_b, function)

See Tensor.merge_with_index/3.

mul(a, b)

See Tensor.mul/2.

mul_number(a, b)

See Tensor.mul_number/2.

mul_vector(vector_a, vector_b)

Elementwise multiplication of vector_a with vector_b.

new()
new(length_or_list_or_range, identity \\ 0)
pop(vector, index, default)

See Tensor.pop/3.

reverse(tensor)
sparse_map_with_coordinates(vector, function)

See Tensor.sparse_map_with_coordinates/2.

sub(a, b)

See Tensor.sub/2.

sub_number(a, b)

See Tensor.sub_number/2.

sub_vector(vector_a, vector_b)

Elementwise subtraction of vector_b from vector_a.

to_list(vector)

See Tensor.to_list/1.

vector?(a)

true if a is a Vector.

with_coordinates(vector)

See Tensor.with_coordinates/1.