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

📄 dimension.hpp

📁 矩阵运算源码最新版本
💻 HPP
字号:
// Software License for MTL// // Copyright (c) 2007 The Trustees of Indiana University. All rights reserved.// Authors: Peter Gottschling and Andrew Lumsdaine// // This file is part of the Matrix Template Library// // See also license.mtl.txt in the distribution.#ifndef MTL_DIMENSION_INCLUDE#define MTL_DIMENSION_INCLUDEnamespace mtl { namespace vector {// Compile time versionnamespace fixed {    template <std::size_t Size>    struct dimension    {	typedef std::size_t  size_type;		static size_type const value= Size;	size_type size() const	{	    return value;	}	// to check whether it is static	static bool const is_static= true;    };}namespace non_fixed {    struct dimension    {	typedef std::size_t  size_type;		static size_type const value= 0; // for compatibility	dimension() : my_size(0) {}	dimension(size_type v) : my_size(v) {}	size_type size() const	{	    return my_size;	}	// to check whether it is static	static bool const is_static= false;    protected:	size_type my_size;    };}}} // namespace mtl::vector#endif // MTL_DIMENSION_INCLUDE

⌨️ 快捷键说明

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