xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 4KB
    文件類型: .cpp
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-06-09
  • 語言: C/C++
  • 標(biāo)簽: FHT??Hartley??

資源簡介

用C++實現(xiàn)了快速Hartley變換,這是本人參照R.N.Bracewell的論文寫得

資源截圖

代碼片段和文件信息


/********************************************************************************************
*
*????This?source?is?just?realize?the?Fast?Hartley?Transform?in?C++?and?all?of?algorithms?
* ?are?from?the?paper?“The?Fast?Hartley?Transform“?by?RONALD?N.?BRACEWELL?1984
*
*????Author:?dtcxy
*????Date??:?10-17-2012
*????Mail??:?wysxylq@163.com
*
********************************************************************************************/



#include?
#include?
#include?
#include?

using?namespace?std;

#define?DATA_SIZE??1024
#define?PI?3.14159265359

bool?permutation(double*?data?int?size);???//?just?like?FFT‘s?permutation
void?FHT(double*?data?double*?dataOut?int?size);?????
void?display(double*?data?int?num);
int?isPow2(int?n);
void?inputData(double*?data?int?size);

int?main()
{
cout<<“--------------CPU?FHT----------------“<
double*?data?=?new?double[DATA_SIZE];
double*?dataOut?=?new?double[DATA_SIZE];
memset(data0DATA_SIZE);
memset(dataOut0DATA_SIZE);

inputData(data?DATA_SIZE);

cout<<“source?data:“< display(dataDATA_SIZE);

FHT(data?dataOut?DATA_SIZE);

cout<<“after?FHT:“< display(dataOut?DATA_SIZE);

return?0;
}

/****************************************************************************
*??
*??Subroutine?to?do?fast?Hartley?transform?of?the?array?of?real?numbers??data.
*??size is?the?length?of?the?array.?Note?that?len?should?be?a?power?of?two.
*
*****************************************************************************/


void?FHT(double*?dataIn?double*?dataOut?int?size)
{
double*?fn?=?new?double[size];
double*?Hn?=?new?double[size];

memset(Hn?0?size*sizeof(double));
memcpy(fn?dataIn?size*sizeof(double));

if(?!permutation(?fn?size)?)
{
cout<<“error:?the?number?of?data?is?not?power?of?2“<

評論

共有 條評論

相關(guān)資源