summaryrefslogtreecommitdiff
path: root/matrix.h
diff options
context:
space:
mode:
Diffstat (limited to 'matrix.h')
-rw-r--r--matrix.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/matrix.h b/matrix.h
index 2546152..c3138e2 100644
--- a/matrix.h
+++ b/matrix.h
@@ -17,6 +17,8 @@
#define matrix_is_vec(mat) (matrix_is_colvec(mat) || matrix_is_rowvec(mat))
+#define matrix_is_square(mat) ((mat)->m == (mat)->n)
+
#define TRUE 1
#define FALSE 0
@@ -59,7 +61,6 @@ Matrix *matrix_scale(const Matrix *A, double x);
Matrix *matrix_sub(const Matrix *A, const Matrix *B);
Matrix *matrix_mult(const Matrix *A, const Matrix *B);
Matrix *matrix_rand(size_t m, size_t n, int bound_l, int bound_u, MatrixType type);
-int matrix_is_square(const Matrix *mat);
int matrix_eq(const Matrix *A, const Matrix *B, double tol);
double matrix_norm_frob(const Matrix *mat);
Matrix **matrix_LR(const Matrix *A, const Matrix *b);