47 namespace implementation
50 #ifndef SWIG // SWIG should skip this part
55 template <
typename inputType>
86 template <enum Backend,
class Matrix>
90 typedef typename Matrix::Scalar
T;
101 static ReturnType
compute(Matrix a);
110 static ReturnType
compute(Matrix a,
bool no_diag=
false);
116 template <enum Backend,
class Matrix>
120 typedef typename Matrix::Scalar
T;
148 template <
class Matrix>
149 struct mean<Backend::EIGEN3, Matrix>
152 typedef typename Matrix::Scalar
T;
165 REQUIRE(vec.
vlen > 0,
"Vector cannot be empty!\n");
206 template <
class Matrix>
210 typedef typename Matrix::Scalar
T;
248 for (
index_t i = 0; i < m.rows(); ++i)
250 else if (m.rows() <= m.cols())
251 for (
index_t i = 0; i < m.rows(); ++i)
255 for (
index_t i = 0; i < m.cols(); ++i)
257 for (
index_t i = m.cols(); i < m.rows(); ++i)
static ReturnType compute(Matrix a)
int2float< T >::floatType ReturnType
Generic class rowwise_sum which provides a static compute method. This class is specialized for diffe...
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > MatrixXt
Generic class mean which provides a static compute method.
Generic class sum which provides a static compute method. This class is specialized for different typ...
int2float< T >::floatType ReturnDataType
int2float< T >::floatType ReturnType
static SGVector< ReturnDataType > compute(SGMatrix< T > m, bool no_diag)
Generic class rowwise_mean which provides a static compute method.
all of classes and functions are contained in the shogun namespace
static ReturnType compute(SGVector< T > vec)
Generic class vector_sum which provides a static compute method. This class is specialized for differ...
static void compute(SGMatrix< T > mat, SGVector< ReturnDataType > result, bool no_diag)
static ReturnType compute(SGMatrix< T > mat, bool no_diag=false)
int2float< T >::floatType ReturnDataType
Generic class int2float which converts different types of integer into float64 type.
static SGVector< ReturnDataType > compute(SGMatrix< T > m, bool no_diag)