From 8aeb36bac894f75fdcc5ca1b5dac631dc503498b Mon Sep 17 00:00:00 2001 From: Krishna Vedala Date: Fri, 5 Jun 2020 14:26:30 -0400 Subject: [PATCH 1/3] bug fix - first dimension of matrices points to pointers, hence get pointer size Signed-off-by: Krishna Vedala --- numerical_methods/qr_eigen_values.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/numerical_methods/qr_eigen_values.c b/numerical_methods/qr_eigen_values.c index 442264d5..1e61a6c2 100644 --- a/numerical_methods/qr_eigen_values.c +++ b/numerical_methods/qr_eigen_values.c @@ -82,9 +82,9 @@ int main(int argc, char **argv) int i, rows = mat_size, columns = mat_size; - double **A = (double **)malloc(sizeof(double) * mat_size); - double **R = (double **)malloc(sizeof(double) * mat_size); - double **Q = (double **)malloc(sizeof(double) * mat_size); + double **A = (double **)malloc(sizeof(double *) * mat_size); + double **R = (double **)malloc(sizeof(double *) * mat_size); + double **Q = (double **)malloc(sizeof(double *) * mat_size); /* number of eigen values = matrix size */ double *eigen_vals = (double *)malloc(sizeof(double) * mat_size); From d162f62dce4e29fc76675441e51fdd01f8e492ad Mon Sep 17 00:00:00 2001 From: Krishna Vedala <7001608+kvedala@users.noreply.github.com> Date: Fri, 5 Jun 2020 15:11:36 -0400 Subject: [PATCH 2/3] added doc to missing define --- numerical_methods/qr_eigen_values.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/numerical_methods/qr_eigen_values.c b/numerical_methods/qr_eigen_values.c index 1e61a6c2..cfbb961c 100644 --- a/numerical_methods/qr_eigen_values.c +++ b/numerical_methods/qr_eigen_values.c @@ -10,7 +10,7 @@ #include #include -#define LIMS 9 /**< */ +#define LIMS 9 /**< limit of range of matrix values */ /** * create a square matrix of given size with random elements From 98b969e1d01ad6ab7274dbe45482fce884465cfb Mon Sep 17 00:00:00 2001 From: Krishna Vedala <7001608+kvedala@users.noreply.github.com> Date: Fri, 5 Jun 2020 15:59:49 -0400 Subject: [PATCH 3/3] add file brief --- misc/factorial_large_number.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/factorial_large_number.c b/misc/factorial_large_number.c index 68acfb37..2a77ddc2 100644 --- a/misc/factorial_large_number.c +++ b/misc/factorial_large_number.c @@ -1,6 +1,6 @@ /** * @file - * Compute factorial of arbitrarily large numbers by + * \brief Compute factorial of arbitrarily large numbers by * storing individual digits in a byte. */ #include