From 7388327129871b28961e63df49dd470b5b40d303 Mon Sep 17 00:00:00 2001 From: F33RNI Date: Mon, 26 Feb 2024 03:51:59 -0500 Subject: [PATCH] docs: add weights_destroy and flower_destroy docs references --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index a9be05d..4b3797e 100644 --- a/README.md +++ b/README.md @@ -448,6 +448,34 @@ Below is an example of an extremely simple classifier capable of just comparing ``` 11. Free memory + > + > ```c + > void weights_destroy(weights_s *weights, + > bool destroy_struct, + > bool destroy_internal_array) + > ``` + > + > Frees memory allocated by weights struct. + > + > **Parameters** + > - `weights`: pointer to `weights_s` struct or NULL + > - `destroy_struct`: true to destroy struct itself (set to false if struct was defined manually) + > - `destroy_internal_array`: true to also destroy `weights->weights` array + + > ```c + > void flower_destroy(flower_s *flower, + > bool destroy_petals, + > bool destroy_weights_array, + > bool destroy_bias_weights_array) + > ``` + > + > Frees memory allocated by flower struct. + > + > **Parameters** + > - `flower`: pointer to `flower_s` struct + > - `destroy_petals`: true to also destroy each petal + > - `destroy_weights_array`: true to also destroy `weights->weights` array for each petal, false to not + > - `destroy_bias_weights_array`: true to also destroy `bias_weights->weights` array for each petal, false to not ```c // Destroy internal array of weights