Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-12-09 12:01:44 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-12-09 12:01:44 +0300
commit9e365069afe156f33fadfad9705e1325f894cd54 (patch)
tree78373044d029feb51f987b45208e0c1a36958625 /source/blender/blenlib/BLI_math_statistics.h
parentd8b42751625c915113b64f5a2d9c72f19f009fee (diff)
Cleanup: move public doc-strings into headers for 'blenlib'
- Added space below non doc-string comments to make it clear these aren't comments for the symbols directly below them. - Use doxy sections for some headers. - Minor improvements to doc-strings. Ref T92709
Diffstat (limited to 'source/blender/blenlib/BLI_math_statistics.h')
-rw-r--r--source/blender/blenlib/BLI_math_statistics.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/source/blender/blenlib/BLI_math_statistics.h b/source/blender/blenlib/BLI_math_statistics.h
index 6e818f5c8df..e4524b49f3f 100644
--- a/source/blender/blenlib/BLI_math_statistics.h
+++ b/source/blender/blenlib/BLI_math_statistics.h
@@ -35,14 +35,36 @@ extern "C" {
# pragma GCC diagnostic ignored "-Wredundant-decls"
#endif
-/********************************** Covariance Matrices *********************************/
+/* -------------------------------------------------------------------- */
+/** \name Covariance Matrices
+ * \{ */
+/**
+ * \brief Compute the covariance matrix of given set of nD coordinates.
+ *
+ * \param n: the dimension of the vectors (and hence, of the covariance matrix to compute).
+ * \param cos_vn: the nD points to compute covariance from.
+ * \param nbr_cos_vn: the number of nD coordinates in cos_vn.
+ * \param center: the center (or mean point) of cos_vn. If NULL,
+ * it is assumed cos_vn is already centered.
+ * \param use_sample_correction: whether to apply sample correction
+ * (i.e. get 'sample variance' instead of 'population variance').
+ * \return r_covmat the computed covariance matrix.
+ */
void BLI_covariance_m_vn_ex(const int n,
const float *cos_vn,
const int nbr_cos_vn,
const float *center,
const bool use_sample_correction,
float *r_covmat);
+/**
+ * \brief Compute the covariance matrix of given set of 3D coordinates.
+ *
+ * \param cos_v3: the 3D points to compute covariance from.
+ * \param nbr_cos_v3: the number of 3D coordinates in cos_v3.
+ * \return r_covmat the computed covariance matrix.
+ * \return r_center the computed center (mean) of 3D points (may be NULL).
+ */
void BLI_covariance_m3_v3n(const float (*cos_v3)[3],
const int nbr_cos_v3,
const bool use_sample_correction,
@@ -53,6 +75,8 @@ void BLI_covariance_m3_v3n(const float (*cos_v3)[3],
# pragma GCC diagnostic pop
#endif
+/** \} */
+
#ifdef __cplusplus
}
#endif