武汉大学遥感信息工程学院复试机试文档格式.docx

上传人:b****1 文档编号:15214402 上传时间:2022-10-28 格式:DOCX 页数:34 大小:21.47KB
下载 相关 举报
武汉大学遥感信息工程学院复试机试文档格式.docx_第1页
第1页 / 共34页
武汉大学遥感信息工程学院复试机试文档格式.docx_第2页
第2页 / 共34页
武汉大学遥感信息工程学院复试机试文档格式.docx_第3页
第3页 / 共34页
武汉大学遥感信息工程学院复试机试文档格式.docx_第4页
第4页 / 共34页
武汉大学遥感信息工程学院复试机试文档格式.docx_第5页
第5页 / 共34页
点击查看更多>>
下载资源
资源描述

武汉大学遥感信息工程学院复试机试文档格式.docx

《武汉大学遥感信息工程学院复试机试文档格式.docx》由会员分享,可在线阅读,更多相关《武汉大学遥感信息工程学院复试机试文档格式.docx(34页珍藏版)》请在冰豆网上搜索。

武汉大学遥感信息工程学院复试机试文档格式.docx

{

cout<

<

"

text.txtopenfailed"

endl;

return1;

}

outfile)

result.txtopenfailed"

vector<

int>

m_vecInt;

//读出数的个数

intsum=0;

infile>

>

sum;

inti=0;

while(i<

sum)

intnumber=0;

infile>

number;

m_vecInt.push_back(number);

i++;

//排序算法

sort(m_vecInt.begin(),m_vecInt.end());

outfile<

theminnumberis:

m_vecInt[0]<

themaxnumberis:

m_vecInt[sum-1]<

intmid=(sum-1)/2;

themiddlenumberis:

m_vecInt[mid]<

outfile.close();

infile.close();

return0;

}

2005:

typedefvector<

vector<

>

VecInt;

VecIntConvolutionFun1(constvector<

&

vec,constint&

m,constint&

n);

VecIntConvolutionFun2(constvector<

vec,constint&

r,constint&

s);

constintM=125;

constintN=80;

constintR=100;

constintS=100;

VecIntvecInt;

inti,j;

SourceData.txt"

SourceData.txtopenfailed.\n"

;

vec_int;

intnumeric(0);

for(i=0;

i<

10000;

i++)

numeric;

vec_int.push_back(numeric);

result.txtopenfailed.\n"

卷积一次后的矩阵:

\n"

vecInt=ConvolutionFun1(vec_int,M,N);

i<

M;

i++)

for(j=0;

j<

N;

j++)

{

outfile<

vecInt[i][j]<

"

}

outfile<

'

\n'

vecInt=ConvolutionFun2(vec_int,R,S);

第二次卷积后的矩阵:

R;

S;

//卷积函数1

m,constint&

n)

VecIntvecInt(m,vector<

(n));

intnum=0;

for(inti=0;

m;

for(intj=0;

n;

vecInt[i][j]=vec[num];

num++;

inta[]={0,-1,0,-1,5,-1,0,-1,0};

for(inti=1;

m-1;

for(intj=1;

j<

n-1;

j++)

vecInt[i][j]=vecInt[i-1][j-1]*a[0]+vecInt[i-1][j]*a[1]+vecInt[i-1][j+1]*a[2]

+vecInt[i][j-1]*a[3]+vecInt[i][j]*a[4]+vecInt[i][j+1]*a[5]

+vecInt[i+1][j-1]*a[6]+vecInt[i+1][j]*a[7]+vecInt[i+1][j+1]*a[8];

returnvecInt;

//卷积函数

s)

VecIntvecInt(r,vector<

(s));

r;

s;

intb[]={0,0,-1,0,0,0,-1,-2,-1,0,-1,-2,16,-2,-1,0,-1,-2,-1,0,0,0,-1,0,0};

for(inti=2;

r-2;

for(intj=2;

s-2;

vecInt[i][j]=vecInt[i-2][j-2]*b[0]+vecInt[i-2][j-1]*b[1]+vecInt[i-2][j]*b[2]+vecInt[i-2][j+1]*b[3]+vecInt[i-2][j+2]*b[4]

+vecInt[i-1][j-2]*b[5]+vecInt[i-1][j-1]*b[6]+vecInt[i-1][j]*b[7]+vecInt[i-1][j+1]*b[8]+vecInt[i-1][j+2]*b[9]

+vecInt[i][j-2]*b[10]+vecInt[i][j-1]*b[11]+vecInt[i][j]*b[12]+vecInt[i][j+1]*b[13]+vecInt[i][j+2]*b[14]

+vecInt[i+1][j-2]*b[15]+vecInt[i+1][j-1]*b[16]+vecInt[i+1][j]*b[17]+vecInt[i+1][j+1]*b[18]+vecInt[i+1][j+2]*b[19]

+vecInt[i+2][j-2]*b[20]+vecInt[i+2][j-1]*b[21]+vecInt[i+2][j]*b[22]+vecInt[i+2][j+1]*b[23]+vecInt[i+2][j+2]*b[24];

20061

//ifstreamofstream头文件

//sqrt,log,cos所需头文件

cmath>

time.h>

//accumulate所需头文件

numeric>

constintN=100;

constdoublePI=3.1415926;

inti;

//定义vector<

double>

对象,存储产生的随机数

vec_double;

vec_square_double;

//定义输出流对象

cerr<

//随机数产生的开始点

srand((unsigned)time(NULL));

//产生个随机数

doublenum=rand()*1.0/RAND_MAX;

vec_double.push_back(num);

vec_square_double.push_back(num*num);

num<

doublesum_double=accumulate(vec_double.begin(),vec_double.end(),(double)0.0);

doublesum_square_double=accumulate(vec_square_double.begin(),vec_square_double.end(),(double)0.0);

doubleaverage_double=sum_double/N;

均值为:

average_double<

doublevariance=(sum_square_double/N)-(average_double*average_double);

方差为:

variance<

//定义输入流对象

//

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 求职职场 > 简历

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1