aboutsummaryrefslogtreecommitdiff
path: root/nerv/lib/matrix/matrix.h
diff options
context:
space:
mode:
authorcloudygoose <cloudygooseg@gmail.com>2015-06-25 23:50:50 +0800
committercloudygoose <cloudygooseg@gmail.com>2015-06-25 23:50:50 +0800
commitd7e14b19816732d8efe6b586aaa493c2d924124c (patch)
tree98838784f721414b4e0d0dc0d6438de257a6c518 /nerv/lib/matrix/matrix.h
parentd1c6d254e19ec31b501bd70f0a3adcc824ad8e56 (diff)
[a little big]matrix dim added, now use m:dim() to determine whether vector or matrix
Diffstat (limited to 'nerv/lib/matrix/matrix.h')
-rw-r--r--nerv/lib/matrix/matrix.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/nerv/lib/matrix/matrix.h b/nerv/lib/matrix/matrix.h
index cbf32c2..67a6e30 100644
--- a/nerv/lib/matrix/matrix.h
+++ b/nerv/lib/matrix/matrix.h
@@ -6,6 +6,7 @@
typedef struct Matrix {
size_t stride; /* size of a row */
long ncol, nrow, nmax; /* dimension of the matrix */
+ int dim; /* dim == 2 for a matrix, dim == 1 for row vector */
union {
float *f;
double *d;