22 template<
typename AReal>
24 : fBuffer(nRows * nCols), fNCols(nCols), fNRows(nRows)
27 for (
size_t j = 0; j <
fNCols; j++) {
28 for (
size_t i = 0; i <
fNRows; i++) {
35 template<
typename AReal>
40 for (
size_t j = 0; j <
fNCols; j++) {
41 for (
size_t i = 0; i <
fNRows; i++) {
42 (*this)(i,j) =
B(i,j);
48 template<
typename AReal>
58 template<
typename AReal>
63 for (
size_t j = 0; j <
fNCols; j++) {
64 for (
size_t i = 0; i <
fNRows; i++) {
65 B(i,j) = (*this)(i, j);
73 template<
typename AReal>
78 size_t ifirst =
fOnes.size();
79 for (
size_t i = ifirst; i <
fNRows; i++) {
86 template<
typename AReal>
89 if (n >
fOnes.size()) {
91 size_t ifirst =
fOnes.size();
92 for (
size_t i = ifirst; i <
n; i++) {
TCpuBuffer< AFloat > fBuffer
The buffer holding the matrix elements in column-major format.
static void InitializeOneVector(size_t n)
static std::vector< AFloat > fOnes
Vector filled with ones used for BLAS calls.
TCpuMatrix(size_t nRows, size_t nCols)
Construct matrix and allocate space for its elements.
Abstract ClassifierFactory template that handles arbitrary types.