Exun.Matrix (exun v0.5.0)
Manage symbolic matrices, simple operations as add, rest, mult and divi; and calculate eigenvalues; could be interesting for solve n-polynomies.
Matrix is a List of vectors; each vector is a row. But for better process and memory usage whe will use a tuple {{:mtype,row,cols},list, mr, mc} so the first tuple in tuple describes the nature of the matrix:
{{:unity,4,4},nil,mr,mc} is a 4x4 matrix all zeros except de main diagonal that holds 1's.
{{:polynom,5,5},[c4,c3,c2,c1,c0], mr, mc} is a matrix 5x5 that reflects polinomial coefficients
{{:raw,m,n},[vectors], mr, mc} Normal matrix, all elements in vectors.
mr and mc are list of Masked Rows and Masked Columns. It's a way to not rebuild a new matrix for determinant calculus. If a row j is int he list mr then the matrix has all rows except j, and the functions in this module takes it into account.
Of course, we will support symbolic matrices, each element of the matrix is an ast
Link to this section Summary
Functions
Calculates determinant from matrix
Get column from matrix, in a list
Get an element from a matrix.
Return row number row from matrix
Multiplies two matrices a and b
Return the polinomic matrix
Return quadratic (nxn) identity matrix
Link to this section Functions
det(a)
Calculates determinant from matrix
get_col(a, col)
Get column from matrix, in a list
get_elem(arg, row, col)
Get an element from a matrix.
get_row(a, row)
Return row number row from matrix
mask(arg, row, col)
mult_matrix(a, b)
Multiplies two matrices a and b
pol_m(coefs)
Return the polinomic matrix
uni_m(n)
Return quadratic (nxn) identity matrix