Tapkee
matrix.hpp
Go to the documentation of this file.
00001 #ifndef TAPKEE_MATRIX_H_
00002 #define TAPKEE_MATRIX_H_
00003 
00004 namespace tapkee 
00005 {
00006 namespace tapkee_internal
00007 {
00008 
00009 void centerMatrix(DenseMatrix& matrix)
00010 {
00011     DenseVector col_means = matrix.colwise().mean().transpose();
00012     DenseMatrix::Scalar grand_mean = matrix.mean();
00013     matrix.array() += grand_mean;
00014     matrix.rowwise() -= col_means.transpose();
00015     matrix.colwise() -= col_means;
00016 }
00017 
00018 } // End of tapkee_internal
00019 } // End of tapkee
00020 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines