tensor v2.0.0 Tensor.Vector

Link to this section 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

Link to this section Functions

Link to this function add_vector(vector_a, vector_b)

Elementwise addition of vectors vector_a and vector_b.

Link to this function dense_map_with_coordinates(vector, function)

See Tensor.Tensor.dense_map_with_coordinates/2.

Link to this function 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.

Link to this function dot_product(a, b)
Link to this function fetch(vector, index)

Returns the element at index from vector.

Link to this function from_list(list, identity \\ 0)
Link to this function get(vector, index, default)

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

Link to this function get_and_update(vector, index, function)

See Tensor.Tensor.get_and_update/3.

Link to this function identity(vector)

Returns the current identity of vector vector.

Link to this function map(vector, function)

See Tensor.Tensor.map/2.

Link to this function merge(vector_a, vector_b, function)

See Tensor.Tensor.merge/3.

Link to this function merge_with_index(vector_a, vector_b, function)

See Tensor.Tensor.merge_with_index/3.

Link to this function mult_vector(vector_a, vector_b)

Elementwise multiplication of vector_a with vector_b.

Link to this function new(length_or_list_or_range, identity \\ 0)
Link to this function pop(vector, index, default)

See Tensor.Tensor.pop/3.

Link to this function reverse(vector)
Link to this function sparse_map_with_coordinates(vector, function)

See Tensor.Tensor.sparse_map_with_coordinates/2.

Link to this function sub_vector(vector_a, vector_b)

Elementwise subtraction of vector_b from vector_a.

true if a is a Vector.