Functions | |
ml_matrix & | ml_matrix::transpose () |
Transposes the matrix. | |
ml_matrix & | ml_matrix::inv () |
Finds the inverse of the matrix. Principally used for matrix division. | |
ml_matrix | ml_matrix::invp (const ml_matrix &n, int k) const |
Returns the product form of the matrix inverse. | |
ml_matrix & | ml_matrix::mpow (int n) |
Returns a matrix raised to a power. | |
ml_matrix | ml_matrix::diag () const |
Creates a diagonal matrix from a row or column matrix, or creates a row matrix from a diagonal matrix. | |
double | ml_matrix::trace () const |
Returns the trace of the matrix. | |
ml_matrix | ml_matrix::mag () const |
Returns a row matrix containing the magnitudes of each column of the matrix. | |
double | ml_matrix::vmag () const |
Returns the magnitude of a column or row matrix. | |
ml_matrix & | ml_matrix::cross (const ml_matrix &n) |
Crosses the matrix with the given matrix. | |
double | ml_matrix::dot (const ml_matrix &n) const |
Takes the dot product of two column vectors. | |
ml_matrix | ml_matrix::skew_symm () const |
Creates a skew symmetric matrix from a vector of three numbers. | |
ml_matrix & | ml_matrix::unit () |
Makes each column into a row vector. | |
ml_matrix & | ml_matrix::sign () |
Changes all positive elements into 1, all negative elements into -1. | |
ml_matrix & | ml_matrix::vunit () |
Unitize a vector matrix by dividing by its vector magnitude. | |
double | ml_matrix::norm () const |
Returns the normal of the matrix (largest singular value). | |
ml_matrix & | ml_matrix::solve_ax_eq_b (const ml_matrix &a) |
Solve the general system of linear equations AX=B. | |
ml_matrix & | ml_matrix::row_mult (int row, double fac) |
ml_matrix | transpose (const ml_matrix &m) |
Transposes the matrix. | |
ml_matrix | inv (const ml_matrix &m) |
Finds the inverse of the matrix. Principally used for matrix division. | |
ml_matrix | mpow (const ml_matrix &m, int n) |
Raises the matrix m to the power n. | |
ml_matrix | cross (const ml_matrix &m, const ml_matrix &y) |
Crosses the two matrices. | |
ml_matrix | unit (const ml_matrix &m) |
Makes each column into a row vector. | |
ml_matrix | sign (const ml_matrix &m) |
Changes all positive elements into 1, all negative elements into -1. | |
ml_matrix | svd (ml_matrix &u, ml_matrix &v, const ml_matrix &a) |
Returns the singular value decomposition of the third matrix. | |
ml_matrix | vunit (const ml_matrix &m) |
Converts the matrix into a unit vector. | |
ml_matrix | solve_ax_eq_b (const ml_matrix &a, const ml_matrix &b) |
Solve AX=B. | |
bool | simplex (ml_matrix &x, ml_matrix c, ml_matrix a, ml_matrix b, double max_val) |
Uses the simplex method to minimize the cost when solving the problem au = b and the cost is cu. | |
void | simplex2 (ml_matrix a, ml_matrix c, ml_matrix &x, ml_int_array &s, ml_int_array &g, ml_int_array &gu, ml_matrix &b_inv, double max_val) |
Computes the solution to the simplex problem with an optional maximum constraint. |
|
Transposes the matrix.
|
|
Finds the inverse of the matrix. Principally used for matrix division. This function can return an error matrix of ml_non_invertible_matrix if the matrix is empty, non-square, or otherwise non-invertible.
|
|
Returns the product form of the matrix inverse. This function can return an error matrix of type ml_bad_index if the specified column is out of range.
|
|
Returns a matrix raised to a power.
|
|
Creates a diagonal matrix from a row or column matrix, or creates a row matrix from a 2-dimensional matrix's diagonal.
|
|
Calculates the trace of the matrix. A trace of a matrix is the summation of the diagonal.
|
|
Calculates the magnitudes of each column of the matrix.
|
|
Calculates the scalar magnitude of a column or row matrix.
|
|
Crosses the matrix with matrix m.
|
|
Takes the dot product of this matrix and the given matrix. |
|
Creates a skew symmetric matrix, the matrix form of the cross product, from a vector of three numbers.
|
|
Makes each column into a row vector. |
|
Changes all positive elements into 1, all negative elements into -1. |
|
Unitize a vector matrix by dividing by its vector magnitude.
|
|
Returns the normal of the matrix (largest singular value). |
|
Attempt to solve the generalize system of linear equations AX = B. This matrix is used as B, and on return will be X if a solution was found. This function can return an error matrix of type ml_size_mismatch if a is not a square matrix, or if the number of rows in a does not match the number of columns in this matrix.
|
|
Multiplies an entire row by the given factor
|
|
Creates a new matrix equal to the transpose of the specified matrix.
|
|
Creates a new matrix equal to the inverse of the specified matrix.
|
|
Creates a new matrix equal to the specified matrix raised to the power n.
|
|
Crosses the matrix m with matrix n.
|
|
Makes each column into a row vector. |
|
Changes all positive elements into 1, all negative elements into -1.
|
|
Singular value decomposition, of the form A = U*S*V'. From "Computer Methods for Mathematical Computations," G. E. Forsythe, C. B. Moler, M. A. Malcolm, Prentice-Hall 1977, pp.201-235. The algorithms first reduces the input matrix to bidiagonal form. Then it iteratively reduces the superdiagonal elements to a negligible size, based on machine accuracy.
|
|
Unitize a vector matrix by dividing by its vector magnitude.
|
|
Attempt to solve the generalize system of linear equations AX = B.
|
|
Uses the simplex method to minimize the cost when solving the problem au = b and the cost is cu.
|
|
Computes the solution to the simplex problem with an optional maximum constraint.
|