elixir_linear_algebra v1.0.0 ELA.Vector
Contains operations for working with vectors.
Summary
Functions
Performs elementwise addition
Calculates the cross product. Is only defined for vectors with size three
Calculates the dot product. Multiplying empty vectors return 0
Performs elementwise multiplication between two vectors. This is the Hadmard product, but for vectors
Returns a vector with zeroes with provided dimension
Calculates the euclidian norm of a vector
Elementwise multiplication with a scalar
Performs elementwise subtraction
Transponates the vector. Column vectors are two-dimensional
Functions
Calculates the cross product. Is only defined for vectors with size three.
Examples
iex> Vector.cross([1, 2, 1], [2, 2, 2])
[2, 0, -2]
Calculates the dot product. Multiplying empty vectors return 0.
Examples
iex> Vector.dot([1, 2, 1], [2, 2, 2])
8
Performs elementwise multiplication between two vectors. This is the Hadmard product, but for vectors.
Examples
iax> Vector.hadmard([1, 2], [2, 2])
[2, 4]