会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
指间ゝ繁华初逝的格调
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
3
4
5
6
7
8
9
下一页
2015年11月18日
K-means算法[聚类算法]
摘要: 聚类算法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 指间ゝ繁华初逝的格调
阅读(243)
评论(0)
推荐(0)
2015年11月17日
决策树ID3算法[分类算法]
摘要: ID3分类算法的编码实现 1 "); 57 if(($train[$i][$num]==$attributename[$j])&&($train[$i][count($train[$i])-1]==$flagsyes)) 58 { 59 ...
阅读全文
posted @ 2015-11-17 17:42 指间ゝ繁华初逝的格调
阅读(539)
评论(0)
推荐(0)
2015年11月13日
6)图[1]之邻接矩阵存储[深度遍历和广度遍历]
摘要: 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 指间ゝ繁华初逝的格调
阅读(317)
评论(0)
推荐(0)
2)杨辉三角[2]递归实现
摘要: #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 指间ゝ繁华初逝的格调
阅读(213)
评论(0)
推荐(0)
2)杨辉三角[1]队列实现
摘要: 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 指间ゝ繁华初逝的格调
阅读(192)
评论(0)
推荐(0)
8)排序③排序算法之插入排序[2]希尔排序
摘要: 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 指间ゝ繁华初逝的格调
阅读(174)
评论(0)
推荐(0)
8)排序③排序算法之插入排序[1]直接插入排序
摘要: 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 指间ゝ繁华初逝的格调
阅读(157)
评论(0)
推荐(0)
8)排序②排序算法之选择排序[1]直接选择排序
摘要: 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 指间ゝ繁华初逝的格调
阅读(217)
评论(0)
推荐(0)
8)排序①排序算法之交换排序[2]快速排序
摘要: 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 指间ゝ繁华初逝的格调
阅读(259)
评论(0)
推荐(0)
8)排序①排序算法之交换排序[1]冒泡排序法
摘要: 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 指间ゝ繁华初逝的格调
阅读(211)
评论(0)
推荐(0)
上一页
1
···
3
4
5
6
7
8
9
下一页
公告