### 12 releases (6 breaking)

0.7.1 | Jul 28, 2018 |
---|---|

0.6.0 | May 25, 2018 |

0.5.3 | Mar 4, 2018 |

0.5.2 | Aug 6, 2017 |

0.3.0 | Oct 30, 2016 |

#**1** in Science

**7,518** downloads per month

Used in **113** crates (27 directly)

**Apache-2.0**

107KB

2K
SLoC

# alga − abstract algebra for Rust

**alga** aims to provide solid mathematical abstractions to algebra-focused
applications. It defines and organizes through trait inheritance the basic
building blocks of general algebraic structures. Specific implementations of
algebraic structure traits are left to other crates. Higher-level traits for
specialized domains of algebra (like linear algebra) are also provided and will
prove useful for applications that include code that is generic wrt. the
algebraic entity types.

Examples of types that could derive from traits defined in **alga**:

- Integers, reals and rationals numbers
- Complex numbers
- Polynomials
- Matrices and vectors
- Quaternions and octonians
- Strings under concatenation

**alga** started as a fork of algebra.

## References

### Interesting papers

- The Scratchpad II Type System: Domains and Subdomains
- Fundamental Algebraic Concepts in Concept-Enabled C++

### Inspiring Libraries

- Numeric Prelude (Haskell)
- Edward A. Kmett's algebra package (Haskell)
- YAP: Yet Another Prelude (Haskell)
- Agda's algebra module (Agda)
- Idris' algebra module (Idris)
- Felix's algebra module (Felix)
- non/spire (Scala)

#### Dependencies

~474KB

- approx 0.3
- libm 0.1
- num-complex 0.2
- num-traits 0.2
- optional decimal 2.0

- dev alga_derive 0.7
- dev quickcheck 0.7