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

📄 distributions.h

📁 经网络提出了一种基于蚁群聚类算法的径向基神经网络. 利用蚁群算法的并行寻优特征和挥发系数方法的自适应更改信息量的能力,并以球面聚类的方式确定了径向基神经网络中基函数的位置, 同时通过比较隐层神经元的相
💻 H
字号:
/* $Id: distributions.h,v 1.2 2006-08-09 15:20:54 jonathan Exp $* Jonathan Ledlie, Harvard University.* Copyright 2005.  All rights reserved.*/#ifndef DISTRIBUTIONS_H_#define DISTRIBUTIONS_H_#include <map>#include <vector>//#include "randlib.h"#include "math_util.h"using namespace::std;class Distribution {public:	Distribution () {}	~Distribution () {}	virtual double next () { return 0.;}	virtual double getMean () { return 0.;}	virtual char getName () {return ' ';}};class IntegerDistribution {public:	IntegerDistribution () {}	~IntegerDistribution () {}	virtual int next () { return 0;}	virtual double getMean () { return 0.;}	virtual char getName () {return ' ';}};class ParetoDistribution : public Distribution{private:	double scale;	double shape;public:	ParetoDistribution (double sc, double sh) {this->scale = sc; this->shape = sh;}	~ParetoDistribution () {}	double next ();	double getMean ();	char getName () { return 'p';};};class NormalDistribution : public Distribution {private:	double mean;	double stddev;public:	NormalDistribution (double m, double s) {this->mean = m; this->stddev = s;}	~NormalDistribution () {}	double next ();	double getMean ();	char getName () { return 'n';};};class ZipfDistribution : public Distribution{private:	const double alpha;	const int elements;	double c;          // Normalization constantpublic:	ZipfDistribution (double a, int n);	~ZipfDistribution () {}	double next ();	double getMean ();	char getName () { return 'z';};	map<double,double> zipfKeys;};class ZipfIntegerDistribution : public IntegerDistribution {private:	double alpha;	int elements;	double c;          // Normalization constantpublic:	ZipfIntegerDistribution (double a, int n);	~ZipfIntegerDistribution () {}	int next ();	double getMean ();	char getName () { return 'z';};	map<double,int> zipfKeys;};class UniformDistribution : public Distribution {private:public:	UniformDistribution () {}	~UniformDistribution () {}	double next ();	double getMean ();	char getName () { return 'u';};};class UniformIntegerDistribution : public IntegerDistribution{private:	const int maxElement;public:	UniformIntegerDistribution (int _maxElement) : maxElement(_maxElement) {}	~UniformIntegerDistribution () {}	int next ();	double getMean ();	char getName () { return 'u';};};class GnutellaBWDistribution : public Distribution {private:public:	GnutellaBWDistribution () {}	~GnutellaBWDistribution () {}	double next ();	double getMean ();	char getName () { return 'g';};};class PoissonDistribution : public Distribution {private:	double mean;public:	PoissonDistribution (double m) {this->mean = m;}	~PoissonDistribution () {}	double next ();	double getMean ();	char getName () { return 'f';};};class ConstantDistribution : public Distribution {private:	double value;public:	ConstantDistribution (double c) {this->value = c;}	~ConstantDistribution () {}	double next ();	double getMean ();	char getName () { return 'c';};};class DistributionFactory{public:	DistributionFactory () {}	~DistributionFactory () {}	Distribution* newDistribution (char *str);	IntegerDistribution* newIntegerDistribution (char *str);};// str[in]  distType[out] para1[out]  para[out]void getParameters (char *str, char &distType, float &para1, float &para2);double snorm();#endif

⌨️ 快捷键说明

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