阳光VIP

少壮不努力,老大徒伤悲。平日弗用功,自到临期悔。
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
上一页 1 ··· 65 66 67 68 69 70 71 72 73 ··· 139 下一页

2012年2月5日

摘要: 1)下载www.riverace.com 网站的ACE最新版本,并解压2)按照ACE-INSTALL.html中所说的在ACE_wrappersace目录下添加一个config.h文件,添加#include "ace/config-win32.h"这一行,ACE_ROOT代表ACE_wrappers目录的绝对路径3)在config.h文件中的最开头添加宏#define ACE_HAS_STANDARD_CPP_LIBRARY 1,这样就可以使用C++标准库4)然后用VC2005打开ACE_vc8.sln,编译Debug版本,编译完成后,会在ACE_wrapperslib目录 阅读全文

posted @ 2012-02-05 11:57 阳光VIP 阅读(126) 评论(0) 推荐(0)

摘要: 类别:排序-交换排序参看 维基百科的定义冒泡排序(Bubble Sort) 是一种简单的排序算法。它重复地走访过要排序的数列,一次比较两个元素,如果他们的顺序错误就把他们交换过来。走访数列的工作是重复地进行直到没有再需要交换,也就是说该数列已经排序完成。这个算法的名字由来是因为越小的元素会经由交换慢慢“浮”到数列的顶端。using System;using System.Collections.Generic;namespace Com.Colobu.Algorithm.Exchange{ /// <summary> /// 冒泡排序是这样实现的: /// /// 1.... 阅读全文

posted @ 2012-02-05 11:56 阳光VIP 阅读(185) 评论(0) 推荐(0)

摘要: 运用ACE_Thread_Manager类创建线程 创建线程需要要解决两个问题,一是调用线程函数,二是提供一个途径让线程能够访问到外部传递过来的参数。下面的代码演示了基本的用法:#include <stdexcept>#include "ace/ACE.h"#include "ace/Log_Msg.h"#include "ace/Thread_Manager.h"#include <map>#include <string>#include <iostream>using namesp 阅读全文

posted @ 2012-02-05 11:56 阳光VIP 阅读(431) 评论(0) 推荐(0)

摘要: 类别:排序-交换排序参看 维基百科的定义using System;using System.Collections.Generic;namespace Com.Colobu.Algorithm.Exchange{ /// <summary> /// <b>快速排序</b>是所有排序算法中最高效的一种. /// 它采用了分治的思想:先保证列表的前半部分都小于后半部分, /// 然后分别对前半部分和后半部分排序,这样整个列表就有序了。 /// 这是一种先进的思想,也是它高效的原因。 /// 因为在排序算法中,算法的高效与否与列表中数字间的比较次数有直接的关系, 阅读全文

posted @ 2012-02-05 11:55 阳光VIP 阅读(134) 评论(0) 推荐(0)

摘要: 类别:排序-交换排序参看 维基百科的定义using System;using System.Collections.Generic;namespace Com.Colobu.Algorithm.Exchange{ /// <summary> /// <b>奇偶排序</b>的思路是在数组中重复两趟扫描。 /// 第一趟扫描选择所有的数据项对,a[j]和a[j+1],j是奇数(j=1, 3, 5……)。 /// 如果它们的关键字的值次序颠倒,就交换它们。 /// 第二趟扫描对所有的偶数数据项进行同样的操作(j=2, 4,6……)。 /// 重复进行这样两趟的排序 阅读全文

posted @ 2012-02-05 11:54 阳光VIP 阅读(138) 评论(0) 推荐(0)

摘要: 类别:排序-交换排序参看 维基百科的定义using System;using System.Collections.Generic;namespace Com.Colobu.Algorithm.Exchange{ /// <summary> /// <b>Comb sort</b> improves on bubble sort, and rivals algorithms like Quicksort. /// The basic idea is to eliminate turtles, or small values near the end of t 阅读全文

posted @ 2012-02-05 11:53 阳光VIP 阅读(177) 评论(0) 推荐(0)

摘要: 类别:排序-交换排序参看 维基百科的定义Gnome sort is a sorting algorithm which is similar to insertion sort, except that moving an element to its proper place is accomplished by a series of swaps, as in bubble sort. The name comes from the supposed behavior of the Dutch garden gnome in sorting a line of flowerpots and 阅读全文

posted @ 2012-02-05 11:53 阳光VIP 阅读(142) 评论(0) 推荐(0)

摘要: 类别:排序-交换排序参看 维基百科的定义鸡尾酒排序 ,也就是定向冒泡排序 , 鸡尾酒搅拌排序 , 搅拌排序 (也可以视作选择排序 的一种变形), 涟漪排序 , 来回排序 or 快乐小时排序 , 是冒泡排序的一种变形。此算法与冒泡排序的不同处在于排序时是以双向在序列中进行排序。using System;using System.Collections.Generic;namespace Com.Colobu.Algorithm.Exchange{ /// <summary> /// <b>鸡尾酒排序</b>,也就是双向冒泡排序(bidirectional bu 阅读全文

posted @ 2012-02-05 11:53 阳光VIP 阅读(191) 评论(0) 推荐(0)

摘要: 转载请保持文章原出处http://www.colobu.com1. AnkhSVN - Subversion SCC Providerhttp://ankhsvn.open.collab.net/AnkhSVN 是一个 VS 的 Subversion 源代码管理提供者。通过这个插件 , 你可以方便的在 Visual Studio 中使用 Subversion 管理你的项目和代码。这个项目保持着相当的活跃性。在本文发表时最新的版本是 2.1.7444 。强烈推荐开发者使用,尤其是你将你的项目托管到 google code 或者 sourceforge 上,你可以使用这个插件连接你的项目。 2. 阅读全文

posted @ 2012-02-05 11:52 阳光VIP 阅读(237) 评论(0) 推荐(1)

摘要: 前几篇文章介绍了几种交换排序的算法。冒泡排序 快速排序 奇偶排序 鸡尾酒排序Gnome sortComb sort 下面是对一个随机序列的排序效率结果:test1: quicksort time: 0.10864 ms bubblesort time: 5.83652 mscocktail time: 6.13016 mscomb sort time: 1.38076 msgnome sort time: 4.38388 msodd-even sort time: 6.846 ms test2: quicksort time: 0.1225 ms bubblesort time: 5.3568 阅读全文

posted @ 2012-02-05 11:52 阳光VIP 阅读(171) 评论(0) 推荐(0)

上一页 1 ··· 65 66 67 68 69 70 71 72 73 ··· 139 下一页