編寫一個(gè)程序,輸出基本數(shù)據(jù)類型char, short, int, long, float, double和指針類型void *, char *, short *, int *, long *, float *, double *的數(shù)據(jù)類型的長度。
上傳時(shí)間: 2013-12-26
上傳用戶:pompey
Behavioral models are used in games and computer graphics for realistic simulation of massive crowds. In this paper, we present a GPU based implementation of Reynolds [1987] algorithm for simulating flocks of birds and propose an extension to consider environment self occlusion. We performed several experiments and the results showed that the proposed approach runs up to three times faster than the original algorithm when simulating high density crowds, without compromising significantly the original crowd behavior.
標(biāo)簽: Behavioral simulation realistic computer
上傳時(shí)間: 2017-09-08
上傳用戶:hanli8870
These codes require an ASCII input file called input.dat of the following form: Lower Limit on x Upper Limit on x Final Time Pressure for x<0 when t=0 Density for x<0 when t=0 Speed for x<0 when t=0 Pressure for x>0 when t=0 Density for x>0 when t=0 Speed for x>0 when t=0 These codes produce 8 ASCII output files: density.out. Density vs. x entropy.out. Entropy vs. x mach.out. Mach number vs. x massflux.out. Mass flux vs. x pressure.out. Pressure vs. x sound.out. Speed-of-sound vs. x velocity.out. Velocity vs. x waves.out. A description of the solution in terms of the three waves defined in the book (+,-,0).
標(biāo)簽: input following require called
上傳時(shí)間: 2017-09-21
上傳用戶:希醬大魔王
第一章關(guān)鍵字...................................................................................................................................9 1.1,最寬恒大量的關(guān)鍵字----auto..........................................................................................11 1.2,最快的關(guān)鍵字---- register............................................................................................... 11 1.2.1,皇帝身邊的小太監(jiān)----寄存器............................................................................. 11 1.2.2,使用register 修飾符的注意點(diǎn).............................................................................11 1.3,最名不符實(shí)的關(guān)鍵字----static........................................................................................12 1.3.1,修飾變量...............................................................................................................12 1.3.2,修飾函數(shù)...............................................................................................................13 1.4,基本數(shù)據(jù)類型----short、int、long、char、float、double........................................... 13 1.4.1,數(shù)據(jù)類型與“模子”............................................................................................... 14 1.4.2,變量的命名規(guī)則...................................................................................................14 1.5,最冤枉的關(guān)鍵字----sizeof...............................................................................................18 1.5.1,常年被人誤認(rèn)為函數(shù)...........................................................................................18 1.5.2,sizeof(int)*p 表示什么意思?........................................................................18 1.4,signed、unsigned 關(guān)鍵字................................................................................................19 1.6,if、else 組合.................................................................................................................... 20 1.6.1,bool 變量與“零值”進(jìn)行比較...............................................................................20 1.6.2, float 變量與“零值”進(jìn)行比較.................................................................................21 1.6.3,指針變量與“零值”進(jìn)行比較...............................................................................21 1.6.4,else 到底與哪個(gè)if 配對(duì)呢?...............................................................................22 1.6.5,if 語句后面的分號(hào)............................................................................................... 23 1.6.6,使用if 語句的其他注意事項(xiàng).............................................................................. 24 1.7,switch、case 組合........................................................................................................... 24 1.7.1,不要拿青龍偃月刀去削蘋果.............................................................................. 24 1.7.2,case 關(guān)鍵字后面的值有什么要求嗎?.............................................................. 25 1.7.3,case 語句的排列順序...........................................................................................25 1.7.4,使用case 語句的其他注意事項(xiàng)..........................................................................27 1.8,do、while、for 關(guān)鍵字................................................................................................... 28 1.8.1,break 與continue 的區(qū)別.....................................................................................28 1.8.2,循環(huán)語句的注意點(diǎn)...............................................................................................29 1.9,goto 關(guān)鍵字......................................................................................................................30 1.10,void 關(guān)鍵字....................................................................................................................31 1.10.1,void a?............................................................................................................31 1.10,return 關(guān)鍵字................................................................................................................. 34 1.11,const 關(guān)鍵字也許該被替換為readolny....................................................................... 34 1.11.2,節(jié)省空間,避免不必要的內(nèi)存分配,同時(shí)提高效率.................................... 35 1.12,最易變的關(guān)鍵字----volatile.......................................................................................... 36 1.13,最會(huì)帶帽子的關(guān)鍵字----extern.................................................................................... 37 1.14,struct 關(guān)鍵字..................................................................................................................38
標(biāo)簽: c語言深度剖析
上傳時(shí)間: 2015-05-01
上傳用戶:cascas
The CommScope InstaPATCH? 360 and ReadyPATCH? solutions utilize a standards-compliant multi-fiber connector to provide high density termination capability. The connector is called an MPO (Multi-fiber Push On) connector by the standards. In many cases, multi-fiber connector products are referred to as MTP connectors. This document is intended to clarify the difference between the two terms – MPO and MTP.
上傳時(shí)間: 2017-04-12
上傳用戶:asdfghjkl1234567890
Lithium–sulfur batteries are a promising energy-storage technology due to their relatively low cost and high theoretical energy density. However, one of their major technical problems is the shuttling of soluble polysulfides between electrodes, resulting in rapid capacity fading. Here, we present a metal–organic framework (MOF)-based battery separator to mitigate the shuttling problem. We show that the MOF-based separator acts as an ionic sieve in lithium–sulfur batteries, which selectively sieves Li+ ions while e ciently suppressing undesired polysulfides migrating to the anode side. When a sulfur-containing mesoporous carbon material (approximately 70 wt% sulfur content) is used as a cathode composite without elaborate synthesis or surface modification, a lithium–sulfur battery with a MOF-based separator exhibits a low capacity decay rate (0.019% per cycle over 1,500 cycles). Moreover, there is almost no capacity fading after the initial 100 cycles. Our approach demonstrates the potential for MOF-based materials as separators for energy-storage applications.
上傳時(shí)間: 2017-11-23
上傳用戶:653357637
Lithium–sulfur (Li–S) batteries with high energy density and long cycle life are considered to be one of the most promising next-generation energy-storage systems beyond routine lithium-ion batteries. Various approaches have been proposed to break down technical barriers in Li–S battery systems. The use of nanostructured metal oxides and sulfides for high sulfur utilization and long life span of Li–S batteries is reviewed here. The relationships between the intrinsic properties of metal oxide/sulfide hosts and electrochemical performances of Li–S batteries are discussed. Nanostructured metal oxides/ sulfides hosts used in solid sulfur cathodes, separators/interlayers, lithium- metal-anode protection, and lithium polysulfides batteries are discussed respectively. Prospects for the future developments of Li–S batteries with nanostructured metal oxides/sulfides are also discussed.
標(biāo)簽: 電池 納米結(jié)構(gòu) 硫化物 金屬氧化物
上傳時(shí)間: 2017-11-23
上傳用戶:653357637
貼片鋁電解電容封裝庫 SMD Aluminum Electrolytic Capacitors VE Features ? 3 ~ 16φ, 85℃, 2,000 hours assured ? Chip type large capacitance capacitors ? Designed for surface mounting on high density PC board. ? RoHS Compliance
上傳時(shí)間: 2018-05-09
上傳用戶:angel20041401
#include "iostream" using namespace std; class Matrix { private: double** A; //矩陣A double *b; //向量b public: int size; Matrix(int ); ~Matrix(); friend double* Dooli(Matrix& ); void Input(); void Disp(); }; Matrix::Matrix(int x) { size=x; //為向量b分配空間并初始化為0 b=new double [x]; for(int j=0;j<x;j++) b[j]=0; //為向量A分配空間并初始化為0 A=new double* [x]; for(int i=0;i<x;i++) A[i]=new double [x]; for(int m=0;m<x;m++) for(int n=0;n<x;n++) A[m][n]=0; } Matrix::~Matrix() { cout<<"正在析構(gòu)中~~~~"<<endl; delete b; for(int i=0;i<size;i++) delete A[i]; delete A; } void Matrix::Disp() { for(int i=0;i<size;i++) { for(int j=0;j<size;j++) cout<<A[i][j]<<" "; cout<<endl; } } void Matrix::Input() { cout<<"請(qǐng)輸入A:"<<endl; for(int i=0;i<size;i++) for(int j=0;j<size;j++){ cout<<"第"<<i+1<<"行"<<"第"<<j+1<<"列:"<<endl; cin>>A[i][j]; } cout<<"請(qǐng)輸入b:"<<endl; for(int j=0;j<size;j++){ cout<<"第"<<j+1<<"個(gè):"<<endl; cin>>b[j]; } } double* Dooli(Matrix& A) { double *Xn=new double [A.size]; Matrix L(A.size),U(A.size); //分別求得U,L的第一行與第一列 for(int i=0;i<A.size;i++) U.A[0][i]=A.A[0][i]; for(int j=1;j<A.size;j++) L.A[j][0]=A.A[j][0]/U.A[0][0]; //分別求得U,L的第r行,第r列 double temp1=0,temp2=0; for(int r=1;r<A.size;r++){ //U for(int i=r;i<A.size;i++){ for(int k=0;k<r-1;k++) temp1=temp1+L.A[r][k]*U.A[k][i]; U.A[r][i]=A.A[r][i]-temp1; } //L for(int i=r+1;i<A.size;i++){ for(int k=0;k<r-1;k++) temp2=temp2+L.A[i][k]*U.A[k][r]; L.A[i][r]=(A.A[i][r]-temp2)/U.A[r][r]; } } cout<<"計(jì)算U得:"<<endl; U.Disp(); cout<<"計(jì)算L的:"<<endl; L.Disp(); double *Y=new double [A.size]; Y[0]=A.b[0]; for(int i=1;i<A.size;i++ ){ double temp3=0; for(int k=0;k<i-1;k++) temp3=temp3+L.A[i][k]*Y[k]; Y[i]=A.b[i]-temp3; } Xn[A.size-1]=Y[A.size-1]/U.A[A.size-1][A.size-1]; for(int i=A.size-1;i>=0;i--){ double temp4=0; for(int k=i+1;k<A.size;k++) temp4=temp4+U.A[i][k]*Xn[k]; Xn[i]=(Y[i]-temp4)/U.A[i][i]; } return Xn; } int main() { Matrix B(4); B.Input(); double *X; X=Dooli(B); cout<<"~~~~解得:"<<endl; for(int i=0;i<B.size;i++) cout<<"X["<<i<<"]:"<<X[i]<<" "; cout<<endl<<"呵呵呵呵呵"; return 0; }
標(biāo)簽: 道理特分解法
上傳時(shí)間: 2018-05-20
上傳用戶:Aa123456789
參照棧類模板的例子編寫一個(gè)隊(duì)列類模板class <T> Queue,私有成員包括:隊(duì)首指針Front,隊(duì)尾指針Tail,隊(duì)列容積max。實(shí)現(xiàn):構(gòu)造函數(shù)Queue,復(fù)制構(gòu)造函數(shù)Queue,析構(gòu)函數(shù)~Queue,入隊(duì)函數(shù)In,出隊(duì)函數(shù)Out(每次出隊(duì),后面的元素自動(dòng)前移一位),判隊(duì)列空函數(shù)Empty。并分別用隊(duì)列類模板定義int和double對(duì)象,通過實(shí)例調(diào)用各個(gè)成員函數(shù)。
標(biāo)簽: Queue 函數(shù) double class Front Empty 隊(duì)列 Tail 模板 Out
上傳時(shí)間: 2020-05-04
上傳用戶:1qw2e3r4t5y6u7i8
蟲蟲下載站版權(quán)所有 京ICP備2021023401號(hào)-1