From 1e340d509f229120eb3aaa98c91028dc3c0d3305 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Mon, 25 Aug 2014 14:38:03 +0200 Subject: rename msvmmaj to gensvm --- src/gensvm_matrix.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/gensvm_matrix.c (limited to 'src/gensvm_matrix.c') diff --git a/src/gensvm_matrix.c b/src/gensvm_matrix.c new file mode 100644 index 0000000..43f284f --- /dev/null +++ b/src/gensvm_matrix.c @@ -0,0 +1,38 @@ +/** + * @file gensvm_matrix.c + * @author Gertjan van den Burg + * @date August, 2013 + * @brief Functions facilitating matrix access + * + * @details + * The functions contained in this file are used when + * accessing or writing to matrices. Seperate functions + * exist of adding and multiplying existing matrix + * elements, to ensure this is done in place. + * + */ + +#include "gensvm_matrix.h" +#include "util.h" + +/** + * @brief print a matrix + * + * @details + * Debug function to print a matrix + * + * @param[in] M matrix + * @param[in] rows number of rows of M + * @param[in] cols number of columns of M + */ +void print_matrix(double *M, long rows, long cols) +{ + long i, j; + + for (i=0; i