2022-05-10 17:35:12 -04:00
|
|
|
# NumIdr
|
|
|
|
|
2022-05-21 16:38:21 -04:00
|
|
|
NumIdr is a linear algebra and data manipulation library for Idris 2. It features
|
|
|
|
an efficient, type-safe array data structure, as well as utilities for working with
|
2023-03-16 09:17:14 -04:00
|
|
|
vector spaces and matrices.
|
2022-05-21 16:38:21 -04:00
|
|
|
|
|
|
|
The name is pronounced like "num-idge".
|
2022-10-21 18:48:02 -04:00
|
|
|
|
|
|
|
## Features
|
|
|
|
|
|
|
|
- A type-safe and efficient array type, based on NumPy's arrays.
|
|
|
|
|
|
|
|
- Compile-time checked indexing operations to avoid run-time overhead.
|
|
|
|
|
|
|
|
- Utility functions and operations for working with vectors, matrices,
|
|
|
|
homogeneous coordinates, and other linear algebra computations.
|
|
|
|
|
|
|
|
- Transform types for working with rotations, reflections, isometries, and other
|
|
|
|
types of affine maps.
|
|
|
|
|
2023-03-16 09:17:14 -04:00
|
|
|
## Inspiration
|
2022-10-21 18:48:02 -04:00
|
|
|
|
2023-03-16 09:17:14 -04:00
|
|
|
NumIdr is inspired by many different data science and linear algebra libraries,
|
|
|
|
including Python's [NumPy](https://numpy.org/), Rust's [nalgebra](https://www.nalgebra.org/),
|
|
|
|
and Haskell's [massiv](https://hackage.haskell.org/package/massiv). It aims to
|
|
|
|
combine the most useful features of each library.
|
2022-10-21 18:48:02 -04:00
|
|
|
|
|
|
|
## Documentation
|
|
|
|
|
2024-04-24 18:59:47 -04:00
|
|
|
Most of the exported utility functions have docstrings. There is also
|
2024-05-06 04:55:50 -04:00
|
|
|
a (currently unfinished) guide on how to use NumIdr [here](docs/Contents.md).
|
2022-10-21 18:48:02 -04:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2023-09-26 00:43:22 -04:00
|
|
|
To install using idris2 directly:
|
2022-10-21 18:48:02 -04:00
|
|
|
|
2023-09-26 00:43:22 -04:00
|
|
|
``` sh
|
|
|
|
git clone https://github.com/kiana-S/numidr
|
|
|
|
cd numidr
|
2022-10-21 18:48:02 -04:00
|
|
|
idris2 --install numidr.ipkg
|
2023-09-26 00:43:22 -04:00
|
|
|
|
2022-10-21 18:48:02 -04:00
|
|
|
```
|
|
|
|
|
2023-09-26 00:43:22 -04:00
|
|
|
Or you can install using pack:
|
|
|
|
|
|
|
|
``` sh
|
|
|
|
pack install numidr
|
|
|
|
```
|