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

📄 math_generic.hpp

📁 fflib的AI开发框架
💻 HPP
字号:
/*  Copy Left/Right : OTHER ,Amfproject                                     * *                                                                          * *     This program is free software; you can redistribute it and/or modify * *  it under the terms of the GNU General Public License as published by    * *  the Free Software Foundation; version 2 of the License.                 * *                                                                          * *  This program is distributed in the hope that it will be useful,         * *  but WITHOUT ANY WARRANTY; without even the implied warranty of          * *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           * *  GNU General Public License for more details.                            * *                                                                          * *  You should have received a copy of the GNU General Public License       * *  along with this program; if not, write to the Free Software             * *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA* **************************************************************************** * Project:    FFLib * Programmer: lucy * Created On: Dec 7, 2008 ****************************************************************************/#ifndef MATH_GENERIC_HPP_#define MATH_GENERIC_HPP_/*-- Compiler Controls -----------------------------------------------------*//*-- Includes --------------------------------------------------------------*/#include <cmath>#include <boost/noncopyable.hpp>/*-- Namespace Controller --------------------------------------------------*/namespace fate	///generic namespace for fate{namespace math	///fate math library,used for DSP,Logical,and Matrix{/*-- Extern Types ----------------------------------------------------------*//*--------------------------------------------------------------------------*////generic object for arthlogic calculatestatic class __generic__Math:private boost::noncopyable{public:	//////////////////////////////////////////////	///the object for processing basic signals	//////////////////////////////////////////////	class __math__signals	{	public:		///the object class for source of the signals		class ___signal___source		{		}src;		///the object class for distrubution of the signals		class ___signal__dist		{		public:			///generate even dist series with expectation=(upper+lower)/2 and RMS=(upper-lower)^2/12 from seed\n			///(seed can be generated through random functions)			///@param lower			///			this defines the lower boundary of the dist			///@param upper			///			this defines the upper boundary of the dist			///@param seed			///			this is a ptr that point to random seed that you generate from other methods.\n			///			this random process will also changed the value of the seed.\n			///			warning: do not use a global seed			///@return the random number from the even dist			double evenDist(double lower,double upper,long& seed);			///generate normal dist series with expectation=mean and RMS=sigma from seed\n			///(seed can be generated through random functions)			///@param mean			///			this defines the mathematical expectation of the dist			///@param sigma			///			this defines the root-mean-square error(RMS) of the dist,reflects the deviation			///@param seed			///			this is a ptr that point to random seed that you generate from other methods.\n			///			this random process will also changed the value of the seed.\n			///			warning: do not use a global seed			///@return the random number from the gauss dist			double gaussDist(double mean,double sigma,long& seed);			///generate exponent dist series with expectation=beta,RMS=beta^2 from seed\n			///(seed can be generated through random functions)			///@param beta			///			this defines the distribute factor of the dist			///@param seed			///			this is a ptr that point to random seed that you generate from other methods.\n			///			this random process will also changed the value of the seed.\n			///			warning: do not use a global seed			double expDist(double beta,long& seed);			///generate laplace dist series with expectation=0,RMS=2*beta^2 from seed\n			///(seed can be generated through random functions)			///@param beta			///			this defines the distribute factor of the dist			///@param seed			///			this is a ptr that point to random seed that you generate from other methods.\n			///			this random process will also changed the value of the seed.\n			///			warning: do not use a global seed			double laplaceDist(double beta,long& seed);		}dist;	}signal;	///////////////////////////////////////////////////	///the object that performs basic matrix operations	///////////////////////////////////////////////////	class ___math___Matrix	{	public:	}matrix;	//////////////////////////////////////////////////	///the object that performs arthlogic operations	//////////////////////////////////////////////////	class ___math___Logic	{	}logic;}Math;/*-- Namespace Ender -------------------------------------------------------*/}}/*--------------------------------------------------------------------------*/#endif /* MATH_GENERIC_HPP_ */

⌨️ 快捷键说明

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