Skip to content

Guigui220D/matriz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Matriz

Matrix template class for linear algebra in zig.

What is done

This is a work in progress, only simple operations are ready as of today.

  • Comparison
  • Adding/substracting
  • Multiplying/scaling
  • Transpose
  • Power (only for integer powers)
  • Exponential of a matrix
  • Determinant
  • Rank
  • Submatrices
  • The rest...

Example

var a = Mat2.init(.{
    .{1, -1},
    .{1, 0},
});

a = a.pow(4);

a = a.add(Mat2.identity);

const b = Matrix(2, 3).init(.{
    .{1, 10, 0},
    .{0, -1, 2},
});

const result = a.mul(b).scale(3);

About

Matrix math lib for Zig

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages