逆龙七步

导航

2014年10月17日 #

C++ explicit关键字应用方法详解

摘要: C++编程语言中有很多比较重要的关键字在实际编程中起着非常重要的作用。我们今天为大家介绍的C++ explicit关键字就是其中一个应用比较频繁的关键字。下面就让我们一起来看看这方面的知识吧。C++ explicit关键字用来修饰类的构造函数,表明该构造函数是显式的,既然有"显式"那么必然就有"隐式... 阅读全文

posted @ 2014-10-17 21:27 逆龙七步 阅读(166) 评论(0) 推荐(0) 编辑

2014年4月4日 #

排序小结(java版)

摘要: 一、归并排序package org.lxh.demo08.b;class Sort{ private int[] a; private int n; Sort(int n) { a=new int[n]; } Sort(int[] a,int n) { this.n=n; this.a=new int[n]; this.a=a; } public void print() { for(int i=0;i=2*s) { merge(... 阅读全文

posted @ 2014-04-04 12:44 逆龙七步 阅读(168) 评论(0) 推荐(0) 编辑

排序小结(C++版)

摘要: 一、快速排序#include using namespace std;int adjust(int a[],int start,int end){ int i,j; i=start; j=end; int temp=a[i]; while(i=a[i]) i++; if(iusing namespace std;//s表示根节点(仅s节点不满足堆)//n表示所有节点的个数//a[0]不参与排序void adjust(int a[],int s,int n){ int j; int temp=a[s]; for(... 阅读全文

posted @ 2014-04-04 10:18 逆龙七步 阅读(248) 评论(0) 推荐(0) 编辑

2014年4月3日 #

排序小结(C版)

摘要: 一、快速排序(C源码)#include #include int adjust(int a[],int start,int end){ int i=start; int j=end; int temp=a[start]; while(i=a[i]) i++; if(i#include //最大堆的调整函数//注意a[0]不参与排序void adjust(int a[],int s,int m){ int temp=a[s]; int j; for(j=2*s;ja[j]) break; ... 阅读全文

posted @ 2014-04-03 20:18 逆龙七步 阅读(207) 评论(0) 推荐(0) 编辑

2014年4月2日 #

二路归并排序算法

摘要: 本文转自:http://blog.csdn.net/caryaliu/article/details/7475700将两个按值有序序列合并成一个按值有序序列,则称之为二路归并排序,下面有自底向上和自顶向下的两种排序算法,自顶向下的排序在本文末讲述,使用递归实现,代码较简洁,经供参考。1. 归并子算法:把位置相邻的两个按值有序序列合并成一个按值有序序列。例如把序列 X[s..u] = {3, 12, 23, 32}和 序列 X[u+1..v] = {2, 5, 8, 99} 合并成序列Z[s..v] = {2, 3, 5, 8, 12, 23, 32, 99}, 注意合并前的元素都位于同一个有序 阅读全文

posted @ 2014-04-02 21:22 逆龙七步 阅读(933) 评论(0) 推荐(0) 编辑

堆排序2

摘要: /*堆排序(小顶堆) 2014.4.2*/ #include using namespace std;//在堆(已是小顶堆)的末位插入数据i后,通过//MinHeapFixup(节点上移)函数调整为小顶堆void MinHeapFixup(int a[], int i) { int j, temp; temp=a[i]; j=(i-1)/2; //父结点 while(j>=0 &&i!=0) { if (a[j]=temp) break; a[i] =... 阅读全文

posted @ 2014-04-02 20:43 逆龙七步 阅读(159) 评论(0) 推荐(0) 编辑

2013年6月11日 #

图像处理实用资源

摘要: 本文转自:http://www.cnblogs.com/tornadomeet/archive/2012/05/24/2515980.html跟OpenCV相关的:http://opencv.org/2012年7月4日随着opencv2.4.2版本的发布,opencv更改了其最新的官方网站地址。http://www.opencvchina.com/好像12年才有这个论坛的,比较新。里面有针对《learning opencv》这本书的视频讲解,不过视频教学还没出完,正在更新中。对刚入门学习opencv的人来说很不错。http://www.opencv.org.cn/forum/opencv中文论 阅读全文

posted @ 2013-06-11 09:39 逆龙七步 阅读(678) 评论(0) 推荐(0) 编辑