diff options
| author | Gertjan van den Burg <burg@ese.eur.nl> | 2016-10-17 15:40:33 +0200 |
|---|---|---|
| committer | Gertjan van den Burg <burg@ese.eur.nl> | 2016-10-17 15:40:33 +0200 |
| commit | 6e3b22ed8ece70539b6966107342ab8122320a24 (patch) | |
| tree | 73a91a8598ba36c2c70f9ad598cdda30129c1db2 | |
| parent | refactor gensvm_pred to gensvm_predict (diff) | |
| download | gensvm-6e3b22ed8ece70539b6966107342ab8122320a24.tar.gz gensvm-6e3b22ed8ece70539b6966107342ab8122320a24.zip | |
minor documentation fixes
| -rw-r--r-- | include/gensvm_globals.h | 6 | ||||
| -rw-r--r-- | include/gensvm_predict.h | 4 | ||||
| -rw-r--r-- | include/gensvm_sparse.h | 8 | ||||
| -rw-r--r-- | src/gensvm_predict.c | 2 | ||||
| -rw-r--r-- | src/gensvm_sparse.c | 9 | ||||
| -rw-r--r-- | tests/src/test_gensvm_predict.c | 4 |
6 files changed, 11 insertions, 22 deletions
diff --git a/include/gensvm_globals.h b/include/gensvm_globals.h index 74aafd2..d370c93 100644 --- a/include/gensvm_globals.h +++ b/include/gensvm_globals.h @@ -50,10 +50,4 @@ // Multiply a matrix element (RowMajor) #define matrix_mul(M, cols, i, j, val) M[(i)*(cols)+j] *= val -// Set a 3D matrix element (N2 = second dim, N3 = third dim, RowMajor) -#define matrix3_set(M, N2, N3, i, j, k, val) M[k+(N3)*(j+(N2)*(i))] = val - -// Get a 3D matrix element (N2 = second dim, N3 = third dim, RowMajor) -#define matrix3_get(M, N2, N3, i, j, k) M[k+(N3)*(j+(N2)*(i))] - #endif diff --git a/include/gensvm_predict.h b/include/gensvm_predict.h index a60ddd9..1787631 100644 --- a/include/gensvm_predict.h +++ b/include/gensvm_predict.h @@ -1,8 +1,8 @@ /** - * @file gensvm_pred.h + * @file gensvm_predict.h * @author Gertjan van den Burg * @date August, 2013 - * @brief Header file for gensvm_pred.c + * @brief Header file for gensvm_predict.c * * @details * Contains function declarations for prediction functions. diff --git a/include/gensvm_sparse.h b/include/gensvm_sparse.h index bac576a..80945b2 100644 --- a/include/gensvm_sparse.h +++ b/include/gensvm_sparse.h @@ -41,11 +41,7 @@ * <a href="https://en.wikipedia.org/wiki/Sparse_matrix">Wikipedia</a> for * more details. The total storage requirement for this format is * 2*nnz+n_row+1, so it only makes sense to use this format if the number of - * nonzeros is smaller than @f$(n(m - 1) - 1)/2@f$. - * - * @note - * We use @f$n@f$ for rows, and @f$m@f$ for columns, to conform to GenSVM - * notation. This is in exact contrast with the Wikipedia page. + * nonzeros is smaller than @f$(n_{row}(n_{col} - 1) - 1)/2@f$. * * @param nnz number of nonzero elements * @param n_row rows of the matrix @@ -65,7 +61,7 @@ struct GenSparse { double *values; ///< actual nonzero values, should be of length nnz int *ia; - ///< cumulative row lengths, should be of length n+1 + ///< cumulative row lengths, should be of length n_row+1 int *ja; ///< column indices, should be of length nnz }; diff --git a/src/gensvm_predict.c b/src/gensvm_predict.c index 1112e55..8acb626 100644 --- a/src/gensvm_predict.c +++ b/src/gensvm_predict.c @@ -1,5 +1,5 @@ /** - * @file gensvm_pred.c + * @file gensvm_predict.c * @author Gertjan van den Burg * @date August 9, 2013 * @brief Main functions for predicting class labels.. diff --git a/src/gensvm_sparse.c b/src/gensvm_sparse.c index ebc2c9d..24f18ed 100644 --- a/src/gensvm_sparse.c +++ b/src/gensvm_sparse.c @@ -54,7 +54,7 @@ void gensvm_free_sparse(struct GenSparse *sp) * @brief Count the number of nonzeros in a matrix * * @details - * This is a utility function to count the number of nonzeros in a dense + * This is a utility function to count the number of nonzeros in a dense * matrix. This is simply done by comparing with 0.0. * * @param[in] A a dense matrix (RowMajor order) @@ -78,9 +78,9 @@ long gensvm_count_nnz(double *A, long rows, long cols) * @details * It is only worth to convert to a sparse matrix if the amount of sparsity is * sufficient. For this to be the case, the number of nonzeros must be - * smaller than @f$(n(m - 1) - 1)/2@f$. This is tested here. If the amount of - * nonzero entries is small enough, the function returns the number of - * nonzeros. If it is too big, it returns -1. + * smaller than @f$(n_{row}(n_{col} - 1) - 1)/2@f$. This is tested here. If + * the amount of nonzero entries is small enough, the function returns the + * number of nonzeros. If it is too big, it returns -1. * * @param[in] A matrix in dense format (RowMajor order) * @param[in] rows number of rows of A @@ -178,4 +178,3 @@ double *gensvm_sparse_to_dense(struct GenSparse *A) return B; } - diff --git a/tests/src/test_gensvm_predict.c b/tests/src/test_gensvm_predict.c index bb7fef0..eb715c5 100644 --- a/tests/src/test_gensvm_predict.c +++ b/tests/src/test_gensvm_predict.c @@ -1,8 +1,8 @@ /** - * @file test_gensvm_pred.c + * @file test_gensvm_predict.c * @author Gertjan van den Burg * @date September, 2016 - * @brief Unit tests for gensvm_pred.c functions + * @brief Unit tests for gensvm_predict.c functions */ #include "minunit.h" #include "gensvm_predict.h" |
