资源简介
DBSCAN聚类算法,可用于GPS车辆聚集计算
文章请见:
http://blog.csdn.net/winnyrain/article/details/52467617
代码片段和文件信息
#include “stdafx.h“
#include “ClusterAnalysis.h“
#include
#include
#include
const double PI = 3.1415926535897932384626433;
const double R = 6.378137*1e6;
/*
函数:聚类初始化操作
说明:将半径,领域最小数据个数信息写入聚类算法类
参数:
double radius; //半径
int minPTs; //领域最小数据个数
返回值: true; */
bool ClusterAnalysis::Init(double radius int minPTs bool isGPS)
{
this->radius = radius; //设置半径
this->minPTs = minPTs; //设置领域最小数据个数
this->dimNum = DIME_NUM; //设置数据维度
this->isGPS = isGPS; //设置是否GPS数据
dataNum = 0;
return true; //返回
}
/*
函数:聚类初始化操作
说明:将数据文件名,半径,领域最小数据个数信息写入聚类算法类,读取文件,把数据信息读入写进算法类数据集合中
参数:
char* fileName; //文件名
double radius; //半径
int minPTs; //领域最小数据个数
返回值: true;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
I.A.... 8609 2018-02-05 18:38 DBScan_Demo\DBScan_Demo\ClusterAnalysis.cpp
I.A.... 1428 2018-02-05 18:38 DBScan_Demo\DBScan_Demo\ClusterAnalysis.h
I.A.... 1669 2018-02-05 18:38 DBScan_Demo\DBScan_Demo\DataPoint.cpp
I.A.... 1670 2018-02-05 18:38 DBScan_Demo\DBScan_Demo\DataPoint.h
I.A.... 1560 2018-02-05 18:38 DBScan_Demo\DBScan_Demo\DBScan_Demo.cpp
I.A.... 4622 2018-02-05 18:38 DBScan_Demo\DBScan_Demo\DBScan_Demo.vcxproj
I.A.... 1695 2018-02-05 18:38 DBScan_Demo\DBScan_Demo\DBScan_Demo.vcxproj.filters
I.A.... 143 2018-02-05 18:38 DBScan_Demo\DBScan_Demo\DBScan_Demo.vcxproj.user
I.A.... 204 2018-02-05 18:38 DBScan_Demo\DBScan_Demo\In.txt
I.A.... 1581 2018-02-05 18:38 DBScan_Demo\DBScan_Demo\ReadMe.txt
I.A.... 216 2018-02-05 18:38 DBScan_Demo\DBScan_Demo\stdafx.cpp
I.A.... 252 2018-02-05 18:38 DBScan_Demo\DBScan_Demo\stdafx.h
I.A.... 236 2018-02-05 18:38 DBScan_Demo\DBScan_Demo\targetver.h
I.A.... 900 2018-02-05 18:38 DBScan_Demo\DBScan_Demo.sln
I.A.... 102 2018-02-05 18:38 DBScan_Demo\Readme.txt
目录 0 2018-02-05 18:57 DBScan_Demo\DBScan_Demo
目录 0 2018-02-05 18:58 DBScan_Demo
----------- --------- ---------- ----- ----
24887 17
- 上一篇:vc++ 网络编程中国象棋
- 下一篇:C++垃圾回收器
评论
共有 条评论