diff options
Diffstat (limited to 'include/libmath.h')
-rw-r--r-- | include/libmath.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/include/libmath.h b/include/libmath.h index 40ae4ee..c605d24 100644 --- a/include/libmath.h +++ b/include/libmath.h @@ -134,17 +134,26 @@ float math·truncf(float); typedef struct math·Vector { - double *data; + double *d; int len; + int inc; } math·Vector; -#define math·slicev(vec, lo, hi) (struct math·Vector){.len=((hi)-(lo)), .data=((vec).data + (lo))} +#define iota(x) 1 << (x) +enum +{ + mat·trans = iota(1), + mat·symm = iota(2), + mat·posdef = iota(3), + mat·negdef = iota(4), +}; typedef struct math·Matrix { - double *data; - uint32 kind; + double *d; + uint state; int dim[2]; + int inc; } math·Matrix; // TODO: tensor ala numpy |