??xml version="1.0" encoding="utf-8" standalone="yes"?>国产一区亚洲一区,欧美成人精品福利,久久精品国产91精品亚洲http://m.shnenglu.com/feng/category/6764.htmlzh-cnSat, 07 Aug 2010 12:50:22 GMTSat, 07 Aug 2010 12:50:22 GMT60位图索引排序http://m.shnenglu.com/feng/archive/2009/12/05/102593.htmlWang FengWang FengSat, 05 Dec 2009 04:56:00 GMThttp://m.shnenglu.com/feng/archive/2009/12/05/102593.htmlhttp://m.shnenglu.com/feng/comments/102593.htmlhttp://m.shnenglu.com/feng/archive/2009/12/05/102593.html#Feedback1http://m.shnenglu.com/feng/comments/commentRss/102593.htmlhttp://m.shnenglu.com/feng/services/trackbacks/102593.html无心在这里copy/paste位图排序的具体解释,如果有知道得不详l的Q请讉KWikipedia?br />
  1 #ifndef _BITMAP_HPP_INCLUDED
  2 #define _BITMAP_HPP_INCLUDED
  3 
  4 #include <cstring> //for memset
  5 
  6 
  7 namespace feng
  8 {
  9 
 10 template<typename Type>
 11 class Bitmap_Sort
 12 {
 13         typedef Type template_type;
 14     private:
 15         struct _Bitmap_Impl;
 16         _Bitmap_Impl* bi_;
 17     public:
 18         Bitmap_Sort( const template_type& lower = 1const template_type& upper = 100 )
 19         {
 20         bi_ = lower < upper ?
 21             new _Bitmap_Impl(lower,upper) : 
 22             new _Bitmap_Impl(upper,lower);
 23 
 24         }
 25         ~Bitmap_Sort()
 26         {
 27         delete bi_;
 28         }
 29 
 30         void process( const template_type& v ) const
 31         {
 32             (*bi_).register_number( v );
 33         }
 34 
 35         template<typename Input_Itor>
 36         void process( Input_Itor begin, Input_Itor end ) const
 37         {
 38         while ( begin != end )
 39             (*bi_).register_number( *begin++ );
 40         //including <algorithm> is not of necessity
 41         //for_each( begin, end, &((*bi_).register_number) ); 
 42         }
 43 
 44         template<typename Output_Itor>
 45         Output_Itor produce( Output_Itor begin ) const
 46         {
 47         for ( Type i = (*bi_).lower_; i <= (*bi_).upper_; ++i )
 48             if ( (*bi_).query_number(i) )
 49             *begin++ = i;
 50         return begin;
 51         }
 52 };
 53 
 54 
 55 template<typename Type>
 56 struct Bitmap_Sort<Type> :: _Bitmap_Impl 
 57 {
 58         typedef unsigned long word_type;
 59     typedef Type template_type;
 60 
 61     _Bitmap_Impl( const template_type& lower=1const template_type& upper=100 )
 62         : lower_(lower),upper_(upper)
 63     {
 64             const template_type length = upper - lower + 1;
 65         const word_type size = (length >> bit_shift()) + 1
 66         
 67         buffer_ =  new word_type[size];
 68         
 69         memset(buffer_,size,0);
 70     }
 71     ~_Bitmap_Impl()
 72     { 
 73         delete [] buffer_; 
 74     }
 75 
 76     bool register_number( const template_type& v ) const
 77     {
 78         bool ans = false;
 79         if ( v <= upper_ && v >= lower_ )
 80         {
 81             const template_type shift = v - lower_;
 82             const word_type arr_position = shift >> bit_shift();
 83             const word_type relative_position = shift & ( (1 << bit_shift()) - 1 );
 84             const word_type patch = 1 << ( relative_position + 1 );
 85             buffer_[arr_position] |= patch;
 86             ans = true;
 87         }
 88         return ans;
 89     }
 90     bool query_number( const template_type& v ) const
 91     {
 92         bool ans = false;
 93         //not necessory, commented
 94         //if ( v <= upper_ && v >= lower_ )
 95         //{
 96         const template_type shift = v - lower_;
 97         const word_type arr_position = shift >> bit_shift();
 98         const word_type relative_position = shift & ( (1 << bit_shift()) - 1 );
 99         const word_type patch = 1 << ( relative_position + 1 );
100         if( buffer_[arr_position] & patch )
101             ans = true;
102         //}
103         return ans;
104     }
105 
106     const word_type bit_shift() const
107     {
108         return  8 == sizeof(unsiged long) ? 6 : 5;
110     }
111     
112     template_type lower_;
113     template_type upper_;
114     mutable word_type* buffer_;
115 };
116 
117 
118 }//namespace feng
119 
120 #endif //_BITMAP_HPP_INCLUDED
121 
122 
123 


一个测试用例:
#include <bitmap.hpp>

#include 
<iostream>
#include 
<iterator>

using namespace std;

int main()
{
    feng::Bitmap_Sort
<unsigned long> bs(110000000);
    
//feng::Bitmap_Sort<unsigned long> bs(10000000, 1);

    bs.process((istream_iterator
<unsigned long>(cin)), (istream_iterator<unsigned long>()));


    bs.produce(ostream_iterator
<unsigned long>(cout, "\n"));


    
return 0;
}







Wang Feng 2009-12-05 12:56 发表评论
]]>
非均匀取样数据的功率谱估计Ҏ(gu)http://m.shnenglu.com/feng/archive/2009/01/02/71028.htmlWang FengWang FengFri, 02 Jan 2009 13:20:00 GMThttp://m.shnenglu.com/feng/archive/2009/01/02/71028.html阅读全文

Wang Feng 2009-01-02 21:20 发表评论
]]>
nth_element ---- 比较优美的代?/title><link>http://m.shnenglu.com/feng/archive/2008/11/06/66141.html</link><dc:creator>Wang Feng</dc:creator><author>Wang Feng</author><pubDate>Thu, 06 Nov 2008 08:47:00 GMT</pubDate><guid>http://m.shnenglu.com/feng/archive/2008/11/06/66141.html</guid><wfw:comment>http://m.shnenglu.com/feng/comments/66141.html</wfw:comment><comments>http://m.shnenglu.com/feng/archive/2008/11/06/66141.html#Feedback</comments><slash:comments>29</slash:comments><wfw:commentRss>http://m.shnenglu.com/feng/comments/commentRss/66141.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/feng/services/trackbacks/66141.html</trackback:ping><description><![CDATA[     摘要: 一D觉得比较漂亮的代码 nth_element  <a href='http://m.shnenglu.com/feng/archive/2008/11/06/66141.html'>阅读全文</a><img src ="http://m.shnenglu.com/feng/aggbug/66141.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/feng/" target="_blank">Wang Feng</a> 2008-11-06 16:47 <a href="http://m.shnenglu.com/feng/archive/2008/11/06/66141.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>遗传算法的库放到sfMhttp://m.shnenglu.com/feng/archive/2008/10/28/65280.htmlWang FengWang FengTue, 28 Oct 2008 02:20:00 GMThttp://m.shnenglu.com/feng/archive/2008/10/28/65280.htmlhttp://m.shnenglu.com/feng/comments/65280.htmlhttp://m.shnenglu.com/feng/archive/2008/10/28/65280.html#Feedback1http://m.shnenglu.com/feng/comments/commentRss/65280.htmlhttp://m.shnenglu.com/feng/services/trackbacks/65280.htmlq里(http://sourceforge.net/projects/gaplusplus/)下蝲源代码。cppblog不支持tar.bz2格式的文上传?br>
Ҏ(gu)在csdn灌水Ӟ发现有hl出q个blog上文章的链接Q实在汗颜?br>q边的blog荒废了好久,一直没有动手写下去Q?br>前不久把代码重构了一下,攑ֈsfMQ?br>
如有或者疑问,Ƣ迎来信(wanng.fenng[at]gmail.com)讨论?br>


Wang Feng 2008-10-28 10:20 发表评论
]]>
遗传法pd Q?Q?变异法http://m.shnenglu.com/feng/archive/2008/06/22/54291.htmlWang FengWang FengSun, 22 Jun 2008 08:20:00 GMThttp://m.shnenglu.com/feng/archive/2008/06/22/54291.htmlhttp://m.shnenglu.com/feng/comments/54291.htmlhttp://m.shnenglu.com/feng/archive/2008/06/22/54291.html#Feedback0http://m.shnenglu.com/feng/comments/commentRss/54291.htmlhttp://m.shnenglu.com/feng/services/trackbacks/54291.html阅读全文

Wang Feng 2008-06-22 16:20 发表评论
]]>
遗传法pd Q?Q?交叉法http://m.shnenglu.com/feng/archive/2008/06/18/53870.htmlWang FengWang FengWed, 18 Jun 2008 07:56:00 GMThttp://m.shnenglu.com/feng/archive/2008/06/18/53870.htmlhttp://m.shnenglu.com/feng/comments/53870.htmlhttp://m.shnenglu.com/feng/archive/2008/06/18/53870.html#Feedback1http://m.shnenglu.com/feng/comments/commentRss/53870.htmlhttp://m.shnenglu.com/feng/services/trackbacks/53870.html阅读全文

Wang Feng 2008-06-18 15:56 发表评论
]]>
遗传法pd Q?Q? 遗传法中的数据l构和与之相关的一些数值算?/title><link>http://m.shnenglu.com/feng/archive/2008/06/16/53372.html</link><dc:creator>Wang Feng</dc:creator><author>Wang Feng</author><pubDate>Mon, 16 Jun 2008 08:53:00 GMT</pubDate><guid>http://m.shnenglu.com/feng/archive/2008/06/16/53372.html</guid><wfw:comment>http://m.shnenglu.com/feng/comments/53372.html</wfw:comment><comments>http://m.shnenglu.com/feng/archive/2008/06/16/53372.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/feng/comments/commentRss/53372.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/feng/services/trackbacks/53372.html</trackback:ping><description><![CDATA[     摘要: 遗传法的数据结构定义,以及相关的几个基本算法,c++实现代码?nbsp; <a href='http://m.shnenglu.com/feng/archive/2008/06/16/53372.html'>阅读全文</a><img src ="http://m.shnenglu.com/feng/aggbug/53372.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/feng/" target="_blank">Wang Feng</a> 2008-06-16 16:53 <a href="http://m.shnenglu.com/feng/archive/2008/06/16/53372.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>遗传法pd Q?Q遗传算法的基本概念http://m.shnenglu.com/feng/archive/2008/06/15/53363.htmlWang FengWang FengSun, 15 Jun 2008 12:19:00 GMThttp://m.shnenglu.com/feng/archive/2008/06/15/53363.htmlhttp://m.shnenglu.com/feng/comments/53363.htmlhttp://m.shnenglu.com/feng/archive/2008/06/15/53363.html#Feedback1http://m.shnenglu.com/feng/comments/commentRss/53363.htmlhttp://m.shnenglu.com/feng/services/trackbacks/53363.htmlW一部分是遗传算法的介,h从别的地方{载过来的Q有删改Q。如果对遗传法有所了解了,׃要看了,W一ơ听说遗传算法的Q不妨进来{转?

接下来将在第二部分说下遗传算法的数据l构定义Q第三部分写遗传法的一pd子的具体算法,W四部分写根据风险模型做的改q工作?
当然Q同时给出c++实现?nbsp; 阅读全文

Wang Feng 2008-06-15 20:19 发表评论
]]>
一般线性模型的最二ơ方拟合Ҏ(gu)http://m.shnenglu.com/feng/archive/2008/04/15/47157.htmlWang FengWang FengTue, 15 Apr 2008 14:38:00 GMThttp://m.shnenglu.com/feng/archive/2008/04/15/47157.htmlhttp://m.shnenglu.com/feng/comments/47157.htmlhttp://m.shnenglu.com/feng/archive/2008/04/15/47157.html#Feedback2http://m.shnenglu.com/feng/comments/commentRss/47157.htmlhttp://m.shnenglu.com/feng/services/trackbacks/47157.html阅读全文

Wang Feng 2008-04-15 22:38 发表评论
]]>
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            þøԴվ| պƵ| һƷ| ޾žžƷ| Ƶ߹ۿվ| ŷƵ| ŷһ߹ۿƵ| ŷŷ| ŷɫվ| һƵ߿| ۺƵһ| þþþþ999| ŷ߹ۿ| Ʒ| ޹porn| һպ| þþþƷƵ| ޹һ| һŷ| þþþùƷһ| ŷƷ| ߹ۿav| רһ| ŷȫۿɫ| 99re6ֻоƷ| ŷһƬſ| ŷպƷһ߲ | һҹ| ӰƬ| þþþƵ| һõþۺĻ | ŷҹƷþþþþ˳| һɫ| ξþ99Ʒþþþþ9| Ʒþö| 91þþƷ| þþòƷһ| һɫ**ۺ޾Ʒ| þۺƵӰԺ| ҹþ| ŷ崿Ʒ| žž91| Ů޾Ʒһ| ƷavþþþõӰ| ŷһ| йŮ˾þþ| ŷպ߲һ| avֻ| ҹƷ| ŷ˸Ƶ| ޹ھƷ| ޹˾þ| ŷһ| ޾Ʒۺ| ޻ɫ| ŷպ岻| Ļ| һ| ŷպ| һŷ| վ| պŷɫ| þ˽˹Ʒva| þþþùƷҹһ| ۺ| ŷƵ߲| ŷۺһ| йavһ| ŷƷһ| һƵ| һ| ŷȷ| 㽶߹ۿ| ҹŷƬѹۿ| ޳ɫ777777Ůɫ| ձ| re99þ6Ʒ| þøƵ| ˾a߾Ʒ| ҹҹˬwwwƷ| СƵ߹ۿ| ݺ޾Ʒ| ¹ξƷϼbt| Ʒһҳڶҳҳ| þõӰһ| ŷ߲| þþƷ| ŷһ| ŷ߹ۿƵһ| þۺ| ҹ߹ۿһ| ŷva| ŷһ߿| ŷո| | ŷһƵ| ޼߹ۿ| ҹӰ| һ| þùۺϾƷ| ˵߹ۿ | ƵŷƵ| | ߳СƵ| Ƶһҳ| պƵһ߲ѹۿ | ҹҹavһ | Ʒþþþav| þۺϹƷ| Ʒþö| ޾ѡ91| ޻ɫ| þþƷһĻ | ߹ۿһ| һɫþۺϺݺƪô | Ʒһ| ޾ƷƷԲ| ھƷƵ666| ۺϹƷ| ĵӰ| ŷһҳ| 91þþùƷ| 91þùۺϾþ| ŮƵһ| ŷ| 1769ھƷƵ߲| þþþþþþþӰƬ| þ97Ʒ888| ƷƵ| Ӱȷ| þþƷ| һŮ | ŷһ| 뼴󵨾þþ| ŷպƵ| ޿com| պҹ߳| ŷҳ| ߲| þþþƷ2019Ļ| һþ| þþþ߹ۿ| ޸| һ߹ۿ| Ʒ| þþƷŮ˵av| ޸| һ߹ۿ| պƵһ| ŷ| Ƶþ| þ˽˹Ʒvaҩ| ޹ƷþþþϼӰԺ| һŷ| Ʒþþþþþ | ޾Ʒһ| ҹƷþþþþ| һþþ| ŷ˹һ| һɫþۺһ| ŷһֱ| ޹һ| ŷպһ߹ۿƵ| ŷպƵ| ŷƵ| ҹӰձŷ޾Ʒ| ˳߿| ŷպһ| þþþùƷwww| պƵѴȫĻ| þþþþþۺɫһ| ޾Ʒþþ| Ʒվ| ŷһƵ| ۺϾƷһ| ޵һ߹ۿ| þüþ| ҹ߹ۿ| ޺Ʒһ| ߹ۿƷһ | ޹һƵ| Ʒպ| ŷƷһþ| ŷƷ˿| һƵ| պƵ߹ۿ| ŷjizz19hdŷ| ŷһ߿| һѹۿ| ŷһ߹ۿ| ɫۺavav| ŷɫ2015| ŷƬ91| ŷ99Ƶۿ| þþav| þþþþַ| þþavëƬƷ| þöǾƷ| þù| þþƷһ|