 |
fml
0.1-0
Fused Matrix Library
|
5 #ifndef FML_MPI_STATS_COR_H
6 #define FML_MPI_STATS_COR_H
12 #include "../../_internals/omp.hh"
14 #include "../mpimat.hh"
15 #include "../dimops.hh"
17 #include "../linalg/crossprod.hh"
18 #include "../linalg/matmult.hh"
40 template <
typename REAL>
45 const REAL alpha = 1. / ((REAL) (x.
nrows()-1));
52 template <
typename REAL>
56 throw std::runtime_error(
"non-conformable arguments");
61 const REAL alpha = 1. / ((REAL) (x.
nrows()-1));
void crossprod(const REAL alpha, const cpumat< REAL > &x, cpumat< REAL > &ret)
Computes lower triangle of alpha*x^T*x.
Definition: crossprod.hh:37
Matrix class for data distributed over MPI in the 2-d block cyclic format.
Definition: mpimat.hh:40
len_t nrows() const
Number of rows.
Definition: unimat.hh:36
void scale(const bool rm_mean, const bool rm_sd, cpumat< REAL > &x)
Remove the mean and/or the sd from a matrix.
Definition: dimops.hh:376
void cor(cpumat< REAL > &x, cpumat< REAL > &cov)
Covariance.
Definition: cor.hh:43
Core namespace.
Definition: dimops.hh:10
void cov(cpumat< REAL > &x, cpumat< REAL > &cov)
Covariance.
Definition: cov.hh:43
void matmult(const bool transx, const bool transy, const REAL alpha, const cpumat< REAL > &x, const cpumat< REAL > &y, cpumat< REAL > &ret)
Computes ret = alpha*op(x)*op(y) where op(A) is A or A^T.
Definition: matmult.hh:43