⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 printmatrix.hpp

📁 This collection of C++ templates wraps the FORTRAN or C interfaces for LAPACK so that they integrate
💻 HPP
字号:
/* Pretty printing of a uBLAS matrix.
 *
 * Tim Bailey 2005.
 */

#include <cstdio>

namespace ulapack {
	namespace ublas = boost::numeric::ublas;
	template<class F, class A>
	void print_matrix(const ublas::matrix<double,F,A> &m)
	{
		using namespace std;

		for (size_t i = 0; i < m.size1(); ++i) {
			for (size_t j = 0; j < m.size2(); ++j)
				printf("%9.3g\t", m(i,j));
			printf("\n");
		}
		printf("\n");
	}

} // namespace ulapack

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -