|
template<typename REAL > |
void | rowsums (const cpumat< REAL > &x, cpuvec< REAL > &s) |
| Compute the row sums. More...
|
|
template<typename REAL > |
void | rowmeans (const cpumat< REAL > &x, cpuvec< REAL > &s) |
| Compute the row means. More...
|
|
template<typename REAL > |
void | colsums (const cpumat< REAL > &x, cpuvec< REAL > &s) |
| Compute the column sums. More...
|
|
template<typename REAL > |
void | colmeans (const cpumat< REAL > &x, cpuvec< REAL > &s) |
| Compute the column means. More...
|
|
template<typename REAL > |
void | scale (const bool rm_mean, const bool rm_sd, cpumat< REAL > &x) |
| Remove the mean and/or the sd from a matrix. More...
|
|
template<typename REAL > |
void | rowsums (const gpumat< REAL > &x, gpuvec< REAL > &s) |
| Compute the row sums. More...
|
|
template<typename REAL > |
void | rowmeans (const gpumat< REAL > &x, gpuvec< REAL > &s) |
| Compute the row means. More...
|
|
template<typename REAL > |
void | colsums (const gpumat< REAL > &x, gpuvec< REAL > &s) |
| Compute the column sums. More...
|
|
template<typename REAL > |
void | colmeans (const gpumat< REAL > &x, gpuvec< REAL > &s) |
| Compute the column means. More...
|
|
template<typename REAL > |
void | scale (const bool rm_mean, const bool rm_sd, gpumat< REAL > &x) |
| Remove the mean and/or the sd from a matrix. More...
|
|
template<typename REAL > |
void | rowsums (const mpimat< REAL > &x, cpuvec< REAL > &s) |
| Compute the row sums. More...
|
|
template<typename REAL > |
void | rowmeans (const mpimat< REAL > &x, cpuvec< REAL > &s) |
| Compute the row means. More...
|
|
template<typename REAL > |
void | colsums (const mpimat< REAL > &x, cpuvec< REAL > &s) |
| Compute the column sums. More...
|
|
template<typename REAL > |
void | colmeans (const mpimat< REAL > &x, cpuvec< REAL > &s) |
| Compute the column means. More...
|
|
template<typename REAL > |
void | scale (const bool rm_mean, const bool rm_sd, mpimat< REAL > &x) |
| Remove the mean and/or the sd from a matrix. More...
|
|
template<typename REAL >
void fml::dimops::colmeans |
( |
const gpumat< REAL > & |
x, |
|
|
gpuvec< REAL > & |
s |
|
) |
| |
Compute the column means.
- Parameters
-
[in] | x | Input data. |
[out] | s | Column means. |
Implementation Details
Uses linalg::matmult()
on a vector of ones.
Memory Allocations
If the output is inappropriately sized, it will automatically be re-allocated. Additionally, some temporary work storage is needed.
Exceptions
If a (re-)allocation is triggered and fails, a bad_alloc
exception will be thrown.
- Template Parameters
-
REAL | should be 'float' or 'double'. |
template<typename REAL >
void fml::dimops::colsums |
( |
const gpumat< REAL > & |
x, |
|
|
gpuvec< REAL > & |
s |
|
) |
| |
Compute the column sums.
- Parameters
-
[in] | x | Input data. |
[out] | s | Column sums. |
Implementation Details
Uses linalg::matmult()
on a vector of ones.
Memory Allocations
If the output is inappropriately sized, it will automatically be re-allocated. Additionally, some temporary work storage is needed.
Exceptions
If a (re-)allocation is triggered and fails, a bad_alloc
exception will be thrown.
- Template Parameters
-
REAL | should be 'float' or 'double'. |
template<typename REAL >
void fml::dimops::rowmeans |
( |
const gpumat< REAL > & |
x, |
|
|
gpuvec< REAL > & |
s |
|
) |
| |
Compute the row means.
- Parameters
-
[in] | x | Input data. |
[out] | s | Row means. |
Implementation Details
Uses linalg::matmult()
on a vector of ones.
Memory Allocations
If the output is inappropriately sized, it will automatically be re-allocated. Additionally, some temporary work storage is needed.
Exceptions
If a (re-)allocation is triggered and fails, a bad_alloc
exception will be thrown.
- Template Parameters
-
REAL | should be 'float' or 'double'. |
template<typename REAL >
void fml::dimops::rowsums |
( |
const gpumat< REAL > & |
x, |
|
|
gpuvec< REAL > & |
s |
|
) |
| |
Compute the row sums.
- Parameters
-
[in] | x | Input data. |
[out] | s | Row sums. |
Implementation Details
Uses linalg::matmult()
on a vector of ones.
Memory Allocations
If the output is inappropriately sized, it will automatically be re-allocated. Additionally, some temporary work storage is needed.
Exceptions
If a (re-)allocation is triggered and fails, a bad_alloc
exception will be thrown.
- Template Parameters
-
REAL | should be 'float' or 'double'. |
template<typename REAL >
void fml::dimops::scale |
( |
const bool |
rm_mean, |
|
|
const bool |
rm_sd, |
|
|
gpumat< REAL > & |
x |
|
) |
| |
Remove the mean and/or the sd from a matrix.
- Parameters
-
[in] | rm_mean | Remove the column means? |
[in] | rm_sd | Remove the column sds? |
[in,out] | x | Data to center/scale. |
Memory Allocations
Some temporary work storage is needed to store vectors of means and/or standard deviations, depending on what is requested.
Exceptions
If an allocation fails, a bad_alloc
exception will be thrown.
- Template Parameters
-
REAL | should be 'float' or 'double'. |