point.h

来自「经网络提出了一种基于蚁群聚类算法的径向基神经网络. 利用蚁群算法的并行寻优特征和」· C头文件 代码 · 共 47 行

H
47
字号
/* $Id: point.h,v 1.4 2006-08-21 15:02:00 jonathan Exp $* Jonathan Ledlie, Harvard University.* Copyright 2006.  All rights reserved.*/#ifndef POINT_H#define POINT_Hextern int DIMENSIONS;extern bool USE_HEIGHT;class Point {	friend ostream& operator << (ostream& os, Point *p);public:	double *v;	double height;	int stamp;	Point ();	Point (int stamp);	Point (const Point *v);	Point (const double *vec, double h);	~Point ();	void clear ();	void scale (double s);	double length ();	void bump ();	void add (const Point *adjustment);	bool isInInitialState ();	void checkHeight ();	double getAbsoluteDistance (const Point *b);	double getEuclideanDistance (const Point *b);	double getPlanarDistance (const Point *b);	void assign (const Point *vec);	Point* getDirection (const Point *p);	bool operator<(const Point *rhs) const;	bool operator<(int rhs);	static Point* getRandomPoint (double sideLength);	static Point* getRandomUnitVector ();	void print (FILE *fp);};#endif

⌨️ 快捷键说明

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