vSMC
vSMC: Scalable Monte Carlo
|
#include <vsmc/utility/covariance.hpp>
Public Types | |
using | result_type = RealType |
Public Member Functions | |
void | operator() (MatrixLayout layout, std::size_t n, std::size_t dim, const result_type *x, const result_type *w, result_type *mean, result_type *cov, MatrixLayout cov_layout=RowMajor, bool cov_upper=false, bool cov_packed=false) |
Compute the sample covariance matrix. More... | |
Definition at line 142 of file covariance.hpp.
using vsmc::Covariance< RealType >::result_type = RealType |
Definition at line 148 of file covariance.hpp.
|
inline |
Compute the sample covariance matrix.
layout | The storage layout of the data x . The data is considere to be N by dim matrix. In RowMajor storage. |
n | Sample size. If N == 0 then no computation is carried out. |
dim | Dimension of the random variable. If dim == 0 then no computation carried out. |
x | The samples. If it is a null pointer, then no computation is carried out. |
w | The weights. If it is a null pointer, then all samples are assigned weight 1. |
mean | Output storage of the mean. If it is a null pointer, then it is ignored. |
cov | Output storage of the covarianc matrix. If it is a null pointer, then it is ignored. |
cov_layout | The storage layout of the covariance matrix. |
cov_upper | If true, the upper triangular of the covariance matrix is packed, otherwise the lower triangular is packed. Ignored if cov_pack is false . |
cov_packed | If true, the matrix is packed. |
Definition at line 170 of file covariance.hpp.