https://github.com/preciz/max
A matrix library in pure Elixir based on Erlang arrays.
https://github.com/preciz/max
elixir matrix
Last synced: 4 months ago
JSON representation
A matrix library in pure Elixir based on Erlang arrays.
- Host: GitHub
- URL: https://github.com/preciz/max
- Owner: preciz
- License: mit
- Archived: true
- Created: 2019-10-31T19:33:48.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-09-06T11:47:22.000Z (over 3 years ago)
- Last Synced: 2025-01-22T09:37:51.306Z (4 months ago)
- Topics: elixir, matrix
- Language: Elixir
- Homepage: https://hex.pm/packages/max
- Size: 44.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Archived. Use the [Nx](https://github.com/elixir-nx/nx) library instead.
# Max
[](https://travis-ci.org/preciz/max)
A matrix library in pure Elixir based on Erlang `:array`.
```elixir
iex> matrix = Max.new(5, 5, default: 2) # 5x5 matrix with default value 2
iex> matrix = Max.set(matrix, {0, 0}, 8) # set position {0, 0} to 8
iex> Max.get(matrix, {0, 0})
8
iex> Max.to_list_of_lists(matrix)
[
[8, 2, 2, 2, 2],
[2, 2, 2, 2, 2],
[2, 2, 2, 2, 2],
[2, 2, 2, 2, 2],
[2, 2, 2, 2, 2]
]
```Documentation can be found at [https://hexdocs.pm/max](https://hexdocs.pm/max).
## Installation
Add `max` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:max, "~> 0.1.0"}
]
end
```## License
Max is [MIT licensed](LICENSE).