上一页 1 ··· 3 4 5 6 7 8 9 下一页
摘要: 聚类算法k-Means的实现 1 "); 25 $sum +=pow($center[$i][$j][$k]-$array_center[$i][$k-1],2); 26 } 27 //print_r($sum."")... 阅读全文
posted @ 2015-11-18 16:00 指间ゝ繁华初逝的格调 阅读(239) 评论(0) 推荐(0) 编辑
摘要: ID3分类算法的编码实现 1 "); 57 if(($train[$i][$num]==$attributename[$j])&&($train[$i][count($train[$i])-1]==$flagsyes)) 58 { 59 ... 阅读全文
posted @ 2015-11-17 17:42 指间ゝ繁华初逝的格调 阅读(517) 评论(0) 推荐(0) 编辑
摘要: 1 #include "iostream" 2 #include "queue" 3 using namespace std; 4 5 const int MaxNumVertex = 100; //最大顶点数 6 typedef int elementtype; //... 阅读全文
posted @ 2015-11-13 22:05 指间ゝ繁华初逝的格调 阅读(311) 评论(0) 推荐(0) 编辑
摘要: #include"iostream"#include"iomanip"using namespace std;int f(int i,int n){ if(i==1||i==n) return 1; else return f(i-1,n-1)+f(i,n-1); return 0... 阅读全文
posted @ 2015-11-13 21:59 指间ゝ繁华初逝的格调 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 using namespace std; 4 5 enum error{overflow,underflow,success}; 6 const int maxlen=100; 7 8 class queue{ 9 public:10 q... 阅读全文
posted @ 2015-11-13 21:56 指间ゝ繁华初逝的格调 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 using namespace std; 3 4 int shell_sort(int n,int array[100]){//希尔排序法 5 register int dh,temp,i,j; 6 dh=n/2; 7 while(dh>=1){... 阅读全文
posted @ 2015-11-13 21:33 指间ゝ繁华初逝的格调 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 using namespace std; 3 4 int direct_sort(int n,int array[100]){//直接插入排序 5 register int i,temp; 6 for(i=1;itemp){10 ... 阅读全文
posted @ 2015-11-13 21:32 指间ゝ繁华初逝的格调 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 using namespace std; 3 4 //*******直接选择排序********* 5 int select_sort(int n,int array[100]){ 6 int i,j; 7 for(i=0;iarray[j]){10 ... 阅读全文
posted @ 2015-11-13 21:28 指间ゝ繁华初逝的格调 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 using namespace std; 3 4 //************快速排序法********* 5 int partiton(int array[10],int s,int t,int &cutpoint){ 6 int x=array[s]; 7 ... 阅读全文
posted @ 2015-11-13 21:26 指间ゝ繁华初逝的格调 阅读(251) 评论(0) 推荐(0) 编辑
摘要: 1 #include "iostream" 2 using namespace std; 3 4 //************冒泡排序法********* 5 int bubble_sort(int n,int array[100]){ 6 bool exchange; 7 in... 阅读全文
posted @ 2015-11-13 17:40 指间ゝ繁华初逝的格调 阅读(204) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 下一页