It is a pure Nim library, no external dependencies to BLAS frameworks. Supports 
constructing and manipulating only real, dense matrices. Started as a port of 
Jama - a basic linear algebra package for Java to Nim, and contains all five 
matrix decompositions as the original.

For more information read their website: 
[Jama](https://math.nist.gov/javanumerics/jama/)
    
    
    import manu
    
    # Solve a linear system A x = b and compute the residual norm, ||b - A x||.
    let vals = @[@[1.0, 2.0, 3.0], @[4.0, 5.0, 6.0], @[7.0, 8.0, 10.0]]
    let A = matrix(vals)
    let b = randMatrix(3, 1)
    let x = A.solve(b)
    let r = A * x - b
    let rnorm = r.normInf()
    
    Run

In the examples directory you will find the following:

  1. [two layer neural 
network](https://github.com/b3liever/manu/blob/master/examples/neural.nim)
  2. [stress state 
analysis](https://github.com/b3liever/manu/blob/master/examples/mohr.nim)



showcasing what can already be done.

What is supported:

  * Arithmetic operators are overloaded to support matrices.
  * Compute solutions of simultaneous linear equations, determinants, inverses 
and other matrix functions.
  * Destructors, with sink annotations, meaning copies can be avoided in some 
cases.



Compile with `--gc:destructors` switch.

In the future matrix object might be migrated to custom storage 
[https://github.com/b3liever/manu/blob/master/experiments/matrixdestr.nim](https://github.com/b3liever/manu/blob/master/experiments/matrixdestr.nim)

Reply via email to