亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? btl_fourier.h

?? 利用這個模板可以分析基因表達數據
?? H
字號:
//// btl_fourier.h//// This file contains the header file for the Fast Fourier Transform Routine. // The routine allows one, two or three-dimensional transforms, in either // the 'forward' or 'reverse' directions.//// Copyright (C) 1997, 1998 Birkbeck College, Malet Street, London, U.K// // This library is free software; you can redistribute it and/or modify it// under the terms of the GNU Library General Public License as published // by the Free Software Foundation; either version 2 of the License, or // (at your option) any later version.  This library is distributed in the// hope that it will be useful, but WITHOUT ANY WARRANTY; without even the// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR// PURPOSE.  See the GNU Library General Public License for more details.// You should have received a copy of the GNU Library General Public// License along with this library; if not, write to the Free Software// Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA./////////////////////////////////////////////////////////////////////////////// #if !defined(BTL_FOURIER_H)#define BTL_FOURIER_H 1#include <iostream>#include <cmath>#include <complex>#include <vector>#include <string>#include "BTL.h"  _BTL_BEGIN_NAMESPACEusing namespace std;/**#: [Description ="     This routine may be used to carry out a One-dimensional, Two-dimensional,    or Three-dimensional Fast Fourier Transform. The basic algorithm has been    adapted from freely-distributed code issued by the HP Reference Library    It is based on the Cooley-Tukey algorihm (decimation in time), and    it caters for sizes of the input array which are not a power of two.    <P>    The input parameters are;    <P>    First Input Parameter: A one, two or three-dimensional object, from    the Fastft class.    Second Input Parameter: A boolean variable. When set to 'true', this    gives the 'forward' transform.    <P>    Note: in the comments following, the term 'array' is used to refer to the    object created using the Fastft class.    <P>    Operation:  The routine carries out the standard Fast Fourier Transform. It    checks to see if the size of the array is divisible by any of the first 12    primes. If it is it continues using the usual algorithm. It copies z1 to z2    as it proceeds, and the next time around uses z2 as the input array.    Each iteration the variable 'arg' is set to 1, and 'omega' is set to the    appropriate value. Arg is then multiplied by omega to give the relevant    roots of unity. (For example, if n=8, in the first iteration -1 and 1 is    used, then -i, 1, i, and -1, then in the last iteration the 8 '8th roots'    are used).    The routine should still work if the array size contains a factor which    is not one of the first 12 primes. However it may be preferable to    increase the number of primes in this case (in the 'prime' array), or    alternatively pad the array with extra data points to ensure it is    divisible by one of the 12 primes, or preferably a power of a prime.    <P>    Warnings:    1. This routine does divide by n when doing the 'forward' transform. This    is useful if the routine is used to transform forward and then back again.    Most routines seem to leave this 'division by n' to the calling routine,    however it is more sensible to let the calling routine 'multiply by n' if    there is ever a need to do so.    (E.g. (1, 0, 0, 0) will 'forward' transform to (.25, .25, .25, .25), and    will then transform back to (1, 0, 0, 0).)    <P>    2. The calculation will leave small 'epsilon' values in the array    where the value is calculated as zero. The calling routine should    take whatever action is required.    <P>    Acknowledgements: This routine was originally adapted from code which    has been circulated freely from the standard Hewlett-Packard Reference    Library. It is essentially the same routine with the addition of the    'esign' variable, which allows 'reverse' transforms as well as    'forward' transforms; and with 'division by n' during the forward transform.    The HP code was initially transcribed from Fortran as presented in    'FFT as Nested Multiplication, with a Twist' by Carl de Boor in    SIAM Sci. Stat. Comput., Vol 1 No 1, March 1980."]    [Summary = "a class containing generic algorithms to calculate 1,2, and 3D     fast Fourier transforms (FFT)."]     [Authors = "B.Sweeney, W.R.Pitt"]    [Files = "<A HREF=./btl/btl_fourier.h>btl_fourier.h</A>"]    [Dependencies="none"]*/static const double BTL_PI2 = 8.0 * atan(1.0);// SGI CC version 7.1 does not implement the complex class as a template type.#if !defined(SGI_CC)    typedef complex<double> complex_type;#else    typedef complex complex_type;#endif//..................................................................................// private functiontemplate<class RandomAccessIterator>void _Fftstp(const RandomAccessIterator zin,    	      const unsigned int after,    	      const unsigned int now,    	      const unsigned int before,    	      const RandomAccessIterator zout,             const int esign){    unsigned int now_x_after = now * after; // now*after is 'n'         double angle = BTL_PI2/(now_x_after);	        complex_type omega = complex_type(cos(angle), esign*sin(angle));        complex_type arg = complex_type(1, 0);        complex_type value;        unsigned int j,ia,ib, before_x_after = before * after, offset;    int in;        for (j=0; j<now; j++)	    	// The 'j' gives us different values    {				    	// for the zout index.    	for (ia=0; ia<after; ia++)  	// The 'ia' and 'ib' indices    	{			    	// give use the correct indices.    	    for (ib=0; ib<before; ib++)    	    {    	    	offset = ia + ib*after;     	    	value = zin[offset + (now-1) * before_x_after];    		for (in=(now-2); 0<=in; in--)    		{    		    value *= arg;    		    value += zin[offset + in * before_x_after];    		}    		zout[ia + j*after + ib * now_x_after] = value;    	    }    	    arg *= omega;   // gives use the appropriate root       }			 //  of unity each loop.    }}       //............................................................................    	/**#: [Description="One dimensional FFT."] *///// N.B. prerequisites for type RandomAccessIterator are://// 1. an operator[](int)// 2. must contain type complex type//// N.B. start and result must point to separate areas of memory.template <class RandomAccessIterator>void fourier_transform(const RandomAccessIterator start,     	        	  const RandomAccessIterator result,    	        	  const unsigned int size,     	        	  bool forward){    if (start == result)    {    	cerr << "!!Error in Transform\n"    	     << "start and result must point to separate areas of memory."    	     << endl;    	exit(1);    }    const unsigned int NEXTMX = 12;    const int prime[NEXTMX] = { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37 };      // Here we initialise the 'sign', and the other initial variables...    int esign = 1;    if (forward) esign = -1;    int inzee = 1;    unsigned int before = size, after = 1,         	 next = 0,         	 now;    do     {  	                      	    	// This do loop picks out the relevant    	int np = prime[next]; 	    	// prime on each iteration.     	if ( (before/np) * np < before )   // Does np divide before?    	{    	    if (++next < NEXTMX) continue;    	    now = before;    	    before = 1;    	}    	else    	{    	    now = np;    	    before /= np;    	}    	if (inzee == 1)     	// Alternate between using z1 or z2 as input,    	   _Fftstp(start, after, now, before, result, esign);    	else    	   _Fftstp(result, after, now, before, start, esign);    	inzee = 3 - inzee;    	after *= now;    } while (1 < before);    // Make sure the result contains the correct data.    if (inzee == 1)    {    	// Copy data from start container to results container    	RandomAccessIterator ir = result, is = start;    	for (unsigned int i=0; i<size; i++) *ir++ = *is++;     }    // Here we divide by the number of elements, if we are carrying    // out the forward transformation.    if (forward)    	for (unsigned int i=0; i<size; i++)    	    result[i] /= complex_type(size);}//............................................................................	    	/**#: [Description="Two dimensional FFT."] */template <class RandomAccessIterator>void fourier_transform(const RandomAccessIterator start,    	        	  const RandomAccessIterator result,                	  const unsigned int nrows,                	  const unsigned int ncols,                	  const bool forward){    if (start == result)    {    	cerr << "!!Error in Transform\n"    	     << "start and result must point to separate areas of memory."    	     << endl;    	exit(1);    }    unsigned int size = nrows*ncols;    unsigned int row, col;    RandomAccessIterator is, ir;        // We carry out the 1D transform on the rows and put answer in result    // container.    //    for (row=0, is=start, ir=result; row<nrows; row++, is+=ncols, ir+=ncols)    	fourier_transform(is, ir, ncols, forward);    // We now copy the result to the start container, transposing the rows    // and columns.    //    for (row=0, ir=result; row<nrows; row++)     	for (col=0; col<ncols; col++)     	    start[nrows*col + row] = *ir++;       // We now transform it again (column wise with respect to original input).    //    for (col=0, is=start, ir=result; col<ncols; col++, is+=nrows, ir+=nrows)    	fourier_transform(is, ir, nrows, forward);       // We now copy back to start container, reversing the rows and columns.    for (row=0, is=start; row<nrows; row++)     	for (col=0; col<ncols; col++)     	    *is++ = result[nrows*col + row];        // Copy results for start to result container.    //    ir = result;    is = start;    for (unsigned int i=0; i<size; i++) *ir++ = *is++; }//............................................................................    	/**#: [Description="Three dimensional FFT."] */template <class RandomAccessIterator>void fourier_transform(const RandomAccessIterator start,    	      	         const RandomAccessIterator result,              	  const unsigned int nrows,              	  const unsigned int ncols,              	  const unsigned int nlayers,              	  const bool forward){    if (start == result)    {    	cerr << "!!Error in Transform\n"    	     << "start and result must point to separate areas of memory."    	     << endl;    	exit(1);    }        unsigned int row, col, layer;    RandomAccessIterator is, ir;    unsigned int layerSize=nrows*ncols;        // We carry out the 2D transform on the start container putting the answer    // in the result container.    //    for (layer=0, is=start, ir=result; layer<nlayers; layer++,is+=layerSize,ir+=layerSize)    	fourier_transform(is, ir, nrows, ncols, forward);    // Perform 1D transform on each row, column combination    //    vector<complex_type> tempStart(nlayers), tempResult(nlayers);    unsigned int row_offset, in_layer_offset;    for (row=0; row<nrows; row++)    {    	row_offset = ncols * row;    	for (col=0; col<ncols; col++)    	{    	    // Copy row,col combination to single continous section of memory    	    //    	    in_layer_offset = row_offset + col;    	    for (layer=0; layer<nlayers; layer++)    	    	tempStart[layer] = result[layerSize*layer + in_layer_offset];    	    	    	    // Carry out 1D FFT    	    //    	    fourier_transform(tempStart.begin(), tempResult.begin(), nlayers, forward);    	        	    // Copy result back to original locations    	    //    	    for (layer=0; layer<nlayers; layer++)    	    	result[layerSize*layer + in_layer_offset] = tempResult[layer];    	}    }}_BTL_END_NAMESPACE#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲视频一区二区在线观看| 91成人在线免费观看| 欧美精品日韩一区| 午夜精品福利一区二区三区蜜桃| 欧美日韩亚洲综合在线 | 欧美美女一区二区| 午夜精品aaa| 日韩欧美国产一区在线观看| 久久99精品国产麻豆婷婷| 精品国产欧美一区二区| 成人免费毛片aaaaa**| 综合久久综合久久| 欧美日韩高清一区| 精品一区二区三区不卡| 国产精品午夜电影| 欧美亚洲高清一区二区三区不卡| 亚洲mv在线观看| 欧美成人三级电影在线| 成人小视频在线| 一二三四区精品视频| 日韩视频免费直播| 成人性生交大片免费看中文| 午夜精品影院在线观看| 精品成a人在线观看| 99v久久综合狠狠综合久久| 午夜视黄欧洲亚洲| 久久午夜免费电影| 91久久精品午夜一区二区| 日本亚洲一区二区| 国产精品乱码人人做人人爱| 欧美无乱码久久久免费午夜一区 | 国产一区二区三区在线观看免费视频| 亚洲国产一区视频| 色香蕉成人二区免费| 男女男精品网站| 国产精品久久久久影视| 欧美系列日韩一区| 国产成人8x视频一区二区 | 欧美日韩aaa| 懂色av一区二区夜夜嗨| 日韩和欧美的一区| 国产精品久久久久婷婷二区次| 777久久久精品| 99久久er热在这里只有精品66| 日本在线观看不卡视频| ㊣最新国产の精品bt伙计久久| 欧美另类变人与禽xxxxx| 岛国精品在线播放| 蜜桃av一区二区三区| 一区二区欧美国产| 国产欧美日韩精品一区| 日韩欧美成人一区二区| 欧美人狂配大交3d怪物一区| eeuss鲁片一区二区三区在线观看| 日本aⅴ精品一区二区三区| 亚洲美女偷拍久久| 国产日产欧美一区二区三区| 日韩视频在线永久播放| 欧美日韩精品系列| 91影视在线播放| 成人一二三区视频| 国产麻豆精品theporn| 日本人妖一区二区| 亚洲第一激情av| 一区二区三区日韩欧美精品| 国产精品网站在线| 亚洲国产高清aⅴ视频| 久久综合五月天婷婷伊人| 在线综合视频播放| 8x福利精品第一导航| 欧美性色黄大片手机版| 欧美亚洲国产bt| 欧美三级三级三级| 欧美日韩精品一区二区| 欧美日韩国产综合视频在线观看| 欧美亚日韩国产aⅴ精品中极品| 色综合久久久久久久久| 91蜜桃视频在线| 成人免费小视频| 欧美三级日韩三级国产三级| 精品视频免费在线| 欧美日韩一区二区三区四区五区| 99热国产精品| 色婷婷综合久色| 欧美亚洲高清一区二区三区不卡| 精品视频1区2区| 欧美一区二区三区视频免费播放| 欧美一区二区三区视频免费 | 国产一区二区三区四区五区入口| 老司机精品视频在线| 久久99精品国产麻豆婷婷| 国产一区二区三区香蕉| 成人avav影音| 色一情一乱一乱一91av| 欧美日韩一区二区在线观看视频 | 久久―日本道色综合久久| 久久久精品国产99久久精品芒果| 国产农村妇女毛片精品久久麻豆| 中文字幕一区二区三区乱码在线| 亚洲精品国产精品乱码不99 | 国产嫩草影院久久久久| 亚洲欧洲99久久| 亚洲国产中文字幕在线视频综合 | 欧美一级二级三级蜜桃| 久久视频一区二区| 最新高清无码专区| 婷婷久久综合九色综合绿巨人| 美国av一区二区| 国产suv精品一区二区883| 色婷婷av一区二区三区大白胸| 欧美日韩成人一区| 久久综合色之久久综合| 亚洲欧美一区二区三区国产精品 | 东方欧美亚洲色图在线| 日本电影亚洲天堂一区| 日韩一级免费观看| 亚洲同性同志一二三专区| 天堂精品中文字幕在线| 国产99精品国产| 欧美日韩成人激情| 欧美激情在线一区二区三区| 亚洲动漫第一页| 欧美日韩国产高清一区二区| 欧美日韩国产片| 国产日韩视频一区二区三区| 亚洲一二三专区| 丁香婷婷深情五月亚洲| 在线视频一区二区三区| 国产欧美日韩在线视频| 日韩黄色一级片| aaa国产一区| 精品乱人伦一区二区三区| 亚洲欧美韩国综合色| 国产精品资源在线看| 欧美久久一二区| 亚洲色图制服丝袜| 国产美女娇喘av呻吟久久| 在线不卡一区二区| 亚洲女人的天堂| 粉嫩aⅴ一区二区三区四区五区| 欧美四级电影在线观看| 中文幕一区二区三区久久蜜桃| 日本aⅴ亚洲精品中文乱码| 色狠狠综合天天综合综合| 欧美高清在线精品一区| 久久 天天综合| 欧美电影一区二区三区| 一区二区三区在线播| av在线播放一区二区三区| 久久久久国产成人精品亚洲午夜| 麻豆精品国产91久久久久久| 欧美剧情电影在线观看完整版免费励志电影 | 裸体歌舞表演一区二区| 欧美日韩专区在线| 亚洲综合在线免费观看| 99久久国产免费看| 国产精品久久久久一区二区三区共| 国产激情一区二区三区| 国产婷婷色一区二区三区| 韩国精品主播一区二区在线观看| 日韩免费高清视频| 久久精品99国产精品日本| 日韩一区二区三区精品视频| 日韩av电影免费观看高清完整版 | 在线观看视频一区二区| 久久国产精品无码网站| 欧美亚洲一区二区三区四区| 亚洲一区电影777| 欧美视频在线一区| 亚洲黄一区二区三区| 91免费观看国产| 亚洲人123区| 91女人视频在线观看| 亚洲欧美aⅴ...| 91在线视频在线| 一区二区三区电影在线播| 色嗨嗨av一区二区三区| 亚洲综合一二区| 欧美日韩视频专区在线播放| 日日夜夜精品视频免费| 欧美大片日本大片免费观看| 九九九久久久精品| 日韩欧美国产wwwww| 中文字幕中文乱码欧美一区二区| 蜜臀99久久精品久久久久久软件| 日本不卡一区二区三区高清视频| 亚洲品质自拍视频网站| 国产色综合一区| 中文成人av在线| 国产精品成人免费精品自在线观看| 国产清纯美女被跳蛋高潮一区二区久久w| 日韩视频一区二区三区在线播放 | 亚洲欧洲av另类| 亚洲人成网站精品片在线观看 | 日韩成人精品在线观看| 欧美久久久久中文字幕| 九色|91porny| 国产精品久久三| 精品视频一区三区九区| 精彩视频一区二区三区|