h-ikeda / tensorex

Tensor calculations and matrix analysis.

Home Page:https://hex.pm/packages/tensorex

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hex.pm Hex.pm

Tensorex

Tensor operations and matrix analysis.

Installation

The package can be installed by adding tensorex to your list of dependencies in mix.exs:

def deps do
  [
    {:tensorex, "~> 0.6.0"}
  ]
end

Basic usage

# Creates a 2-rank tensors
iex> tensor1 = Tensorex.from_list([[2, 3, 4], [ 3, -4,  5], [4, 5, 6]])
iex> tensor2 = Tensorex.from_list([[5, 6, 7], [-6,  7, -8], [7, 8, 9]])

# Adds two tensors
iex> Tensorex.Operator.add(tensor1, tensor2)

# Makes a dot product
iex> Tensorex.Operator.multiply(tensor1, tensor2, [{1, 0}])

# Finds a solution of linear algebra
iex> Tensorex.Analyzer.solve(tensor1, tensor2)

For more functions and explainations, see the documentation.

About

Tensor calculations and matrix analysis.

https://hex.pm/packages/tensorex

License:MIT License


Languages

Language:Elixir 99.6%Language:Dockerfile 0.4%