Blender  V2.93
BLI_math_statistics.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2015 by Blender Foundation
17  * All rights reserved.
18  */
19 
20 #pragma once
21 
26 #include "BLI_compiler_attrs.h"
27 #include "BLI_math_inline.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 #ifdef BLI_MATH_GCC_WARN_PRAGMA
34 # pragma GCC diagnostic push
35 # pragma GCC diagnostic ignored "-Wredundant-decls"
36 #endif
37 
38 /********************************** Covariance Matrices *********************************/
39 
40 void BLI_covariance_m_vn_ex(const int n,
41  const float *cos_vn,
42  const int nbr_cos_vn,
43  const float *center,
44  const bool use_sample_correction,
45  float *r_covmat);
46 void BLI_covariance_m3_v3n(const float (*cos_v3)[3],
47  const int nbr_cos_v3,
48  const bool use_sample_correction,
49  float r_covmat[3][3],
50  float r_center[3]);
51 
52 #ifdef BLI_MATH_GCC_WARN_PRAGMA
53 # pragma GCC diagnostic pop
54 #endif
55 
56 #ifdef __cplusplus
57 }
58 #endif
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)
Compute the covariance matrix of given set of nD coordinates.
void BLI_covariance_m3_v3n(const float(*cos_v3)[3], const int nbr_cos_v3, const bool use_sample_correction, float r_covmat[3][3], float r_center[3])
Compute the covariance matrix of given set of 3D coordinates.
NSNotificationCenter * center