From a1d164e6371eaf81a8aaf0be1e1a9b16a1af43fc Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Tue, 6 Dec 2016 16:26:01 +0100 Subject: document undocumented elements --- src/gensvm_grid.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/gensvm_grid.c') diff --git a/src/gensvm_grid.c b/src/gensvm_grid.c index 5aa1a3f..984eb96 100644 --- a/src/gensvm_grid.c +++ b/src/gensvm_grid.c @@ -31,6 +31,16 @@ #include "gensvm_grid.h" +/** + * @brief Initialize a GenGrid structure + * + * @brief + * This function is used to initialize a GenGrid struct, and set its default + * parameters. A pointer to the generated struct is returned. + * + * @return initialized GenGrid struct + * + */ struct GenGrid *gensvm_init_grid() { struct GenGrid *grid = Malloc(struct GenGrid, 1); @@ -65,6 +75,16 @@ struct GenGrid *gensvm_init_grid() return grid; } +/** + * @brief Free a GenGrid structure + * + * @details + * This function frees all elements of a GenGrid structure, including the + * GenGrid structure itself. The provided argument is set to NULL on exit. + * + * @param[in] grid a GenGrid struct to free + * + */ void gensvm_free_grid(struct GenGrid *grid) { free(grid->weight_idxs); -- cgit v1.2.3