tensor v2.1.2 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
add(a, b)
See Tensor.Tensor.add/2.
add_number(a, b)
add_vector(vector_a, vector_b)
Elementwise addition of vectors vector_a and vector_b.
dense_map_with_coordinates(vector, function)
div(a, b)
See Tensor.Tensor.div/2.
div_number(a, b)
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(a, b)
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)
identity(vector)
Returns the current identity of vector vector.
length(vector)
lift(vector)
See Tensor.Tensor.lift/1.
map(vector, function)
See Tensor.Tensor.map/2.
merge(vector_a, vector_b, function)
merge_with_index(vector_a, vector_b, function)
mult(a, b)
See Tensor.Tensor.mult/2.
mult_number(a, b)
mult_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.Tensor.pop/3.
reverse(vector)
sparse_map_with_coordinates(vector, function)
sub(a, b)
See Tensor.Tensor.sub/2.
sub_number(a, b)
sub_vector(vector_a, vector_b)
Elementwise subtraction of vector_b from vector_a.
to_list(vector)
vector?(a)
true if a is a Vector.