Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_task.h"
#include "BLI_utildefines.h"
#include "BLI_strict_flags.h"
Go to the source code of this file.
Classes | |
struct | CovarianceData |
Typedefs | |
typedef struct CovarianceData | CovarianceData |
Functions | |
static void | covariance_m_vn_ex_task_cb (void *__restrict userdata, const int a, const TaskParallelTLS *__restrict UNUSED(tls)) |
void | BLI_covariance_m_vn_ex (const int n, const float *cos_vn, const int cos_vn_num, const float *center, const bool use_sample_correction, float *r_covmat) |
Compute the covariance matrix of given set of nD coordinates. More... | |
void | BLI_covariance_m3_v3n (const float(*cos_v3)[3], const int cos_v3_num, const bool use_sample_correction, float r_covmat[3][3], float r_center[3]) |
Compute the covariance matrix of given set of 3D coordinates. More... | |
typedef struct CovarianceData CovarianceData |
void BLI_covariance_m3_v3n | ( | const float(*) | cos_v3[3], |
int | cos_v3_num, | ||
bool | use_sample_correction, | ||
float | r_covmat[3][3], | ||
float | r_center[3] | ||
) |
Compute the covariance matrix of given set of 3D coordinates.
cos_v3 | the 3D points to compute covariance from. |
cos_v3_num | the number of 3D coordinates in cos_v3. |
Definition at line 103 of file math_statistics.c.
References BLI_covariance_m_vn_ex(), center, copy_v3_v3(), float(), madd_v3_v3fl(), and zero_v3().
Referenced by mesh_calc_eigen_matrix().
void BLI_covariance_m_vn_ex | ( | int | n, |
const float * | cos_vn, | ||
int | cos_vn_num, | ||
const float * | center, | ||
bool | use_sample_correction, | ||
float * | r_covmat | ||
) |
Compute the covariance matrix of given set of nD coordinates.
n | the dimension of the vectors (and hence, of the covariance matrix to compute). |
cos_vn | the nD points to compute covariance from. |
cos_vn_num | the number of nD coordinates in cos_vn. |
center | the center (or mean point) of cos_vn. If NULL, it is assumed cos_vn is already centered. |
use_sample_correction | whether to apply sample correction (i.e. get 'sample variance' instead of 'population variance'). |
Definition at line 74 of file math_statistics.c.
References BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), center, covariance_m_vn_ex_task_cb(), data, float(), and TaskParallelSettings::use_threading.
Referenced by BLI_covariance_m3_v3n().
|
static |
Definition at line 27 of file math_statistics.c.
References Freestyle::a, center, and data.
Referenced by BLI_covariance_m_vn_ex().