diff --git a/README.md b/README.md new file mode 100644 index 0000000..83276f3 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# Matrix library in C diff --git a/src/matrix.c b/src/matrix.c index eadbbd0..021225c 100644 --- a/src/matrix.c +++ b/src/matrix.c @@ -302,6 +302,15 @@ void mtxPrint (MTXMatrix self) { } } +unsigned int mtxGetRowNum(MTXMatrix self) +{ + return self->rows; +} + +unsigned int mtxGetColNum(MTXMatrix self) +{ + return self->columns; +} /* ========================================================================== */ #endif diff --git a/src/matrix.h b/src/matrix.h index 92b0ac4..4330e29 100644 --- a/src/matrix.h +++ b/src/matrix.h @@ -39,6 +39,8 @@ MTXMatrix mtxGetRotationMatrix(MTXMatrix self, unsigned i, unsigned j); MTXMatrix mtxGetEigenvalues (MTXMatrix self, double tolerance); void mtxPrint (const MTXMatrix self); +unsigned int mtxGetRowNum(MTXMatrix self); +unsigned int mtxGetColNum(MTXMatrix self); /* ========================================================================== */