When C++ was first introduced many benefits such as code reuse, portability and scalability were promised, but somehow these benefits failed to eventuate. It didn’t take too long before most people in the embedded world decided that the promises were just hype, and settled down to using C++ as a slightly better version of C
標簽: portability scalability introduced benefits
上傳時間: 2013-12-24
上傳用戶:yt1993410
It’s your first day in the lab.Undoubtedly you are experiencing a range of emotions: excitement, curiosity, anxiety. You will be working in this lab and with a group of people, as well as with your supervisor, for several years to come. This is the first day of a long commitment and, for some, a hard road ahead. Which is why it’s important to get off on the right foot.
標簽: experiencing Undoubtedly excitement emotions
上傳時間: 2017-09-14
上傳用戶:zhangyi99104144
Finally, after a great deal of effort and hard work, you have obtained the results you were trying to get for such a long time. You may be so busy (and tired) that you don’t even realize that you have indeed achieved a certain measure of success. Perhaps it will take a fewmore months before you can present your work at a conference or submit it to a scientific journal.
標簽: you obtained Finally results
上傳時間: 2014-09-10
上傳用戶:Avoid98
Aodv for NS-2. A mobile ad-hoc network (MANET) is a kind of wireless ad-hoc network, and is a self-configuring network of mobile routers connected wirelessly. MANET may operate in a standalone fashion, or may be connected to the larger Internet. Many routing protocols have been developed for MANETs over the past few years. This project evaluated three specific MANET routing protocols which are Ad-hoc On-demand Distance Vector (AODV), Dynamic Source Routing (DSR) and Dynamic MANET Ondemand routing protocol (DYMO) to better understand the major characteristics of these routing protocols. Different performance aspects were investigated in this project including packet delivery ratio, routing overhead, throughput and average end-to-end delay.
標簽: network ad-hoc wireless mobile
上傳時間: 2014-01-12
上傳用戶:zsjzc
This book describes and offers several solutions to many issues. It is geared to meet the immediate and long-term needs of the professional network programmer.
標簽: describes immediate solutions several
上傳時間: 2017-09-24
上傳用戶:playboys0
在圖形中若于個邊(edge)上加上一些值,此數值稱為比重( weight ) 。而此圖形稱為比重圖形(Weight Graph ) ,若weight是成本( cost )或距離( distance ) ,則稱此圖形為網路( Network )。根據Spanning Tree的定義,知一個圖形可有許多不同spanning tree ,在network中找出一個具有最小成本( Cost )的Spanning tree ,則此Spanning tree稱為最小成本生成樹。
上傳時間: 2013-12-28
上傳用戶:Shaikh
? 出動m只螞蟻,每只螞蟻各隨機選擇一條路徑,記為I=[1 2 3···m],長度記為long(I); ? 計算出每條路徑的信息素濃度,記為P(I)=1/long(I),并進行歸一化處理; ? 重新出動m只螞蟻,按如下規則選擇路徑: l 每只螞蟻都以一個概率p1選擇新路徑(路徑隨機); l 未選擇新路徑的螞蟻以概率P(I)選擇路徑I; l 所有螞蟻都以一個小概率p2對自己的路徑進行局部變化; ? 更新所有路徑,計算出每條路徑的信息素濃度; ? 重復上述步驟,直至僅剩一條路徑。
上傳時間: 2015-04-16
上傳用戶:jackynie
#include <iostream> using namespace std; int main(){ int t; cin>>t; while(t--){ long long n; cin>>n; if(n%2==1) cout<<(n*n-1)/4<<endl; else if (n%4==0) cout <<(n*n)/4-1<<endl; else{ if(n==2) cout<<1<<endl; else{ long long k=n/2-1; cout <<k*k+2*k-3<<endl; } } } return 0; }
標簽: 天津大學acm4022 代碼
上傳時間: 2015-04-20
上傳用戶:nr607
第一章關鍵字...................................................................................................................................9 1.1,最寬恒大量的關鍵字----auto..........................................................................................11 1.2,最快的關鍵字---- register............................................................................................... 11 1.2.1,皇帝身邊的小太監----寄存器............................................................................. 11 1.2.2,使用register 修飾符的注意點.............................................................................11 1.3,最名不符實的關鍵字----static........................................................................................12 1.3.1,修飾變量...............................................................................................................12 1.3.2,修飾函數...............................................................................................................13 1.4,基本數據類型----short、int、long、char、float、double........................................... 13 1.4.1,數據類型與“模子”............................................................................................... 14 1.4.2,變量的命名規則...................................................................................................14 1.5,最冤枉的關鍵字----sizeof...............................................................................................18 1.5.1,常年被人誤認為函數...........................................................................................18 1.5.2,sizeof(int)*p 表示什么意思?........................................................................18 1.4,signed、unsigned 關鍵字................................................................................................19 1.6,if、else 組合.................................................................................................................... 20 1.6.1,bool 變量與“零值”進行比較...............................................................................20 1.6.2, float 變量與“零值”進行比較.................................................................................21 1.6.3,指針變量與“零值”進行比較...............................................................................21 1.6.4,else 到底與哪個if 配對呢?...............................................................................22 1.6.5,if 語句后面的分號............................................................................................... 23 1.6.6,使用if 語句的其他注意事項.............................................................................. 24 1.7,switch、case 組合........................................................................................................... 24 1.7.1,不要拿青龍偃月刀去削蘋果.............................................................................. 24 1.7.2,case 關鍵字后面的值有什么要求嗎?.............................................................. 25 1.7.3,case 語句的排列順序...........................................................................................25 1.7.4,使用case 語句的其他注意事項..........................................................................27 1.8,do、while、for 關鍵字................................................................................................... 28 1.8.1,break 與continue 的區別.....................................................................................28 1.8.2,循環語句的注意點...............................................................................................29 1.9,goto 關鍵字......................................................................................................................30 1.10,void 關鍵字....................................................................................................................31 1.10.1,void a?............................................................................................................31 1.10,return 關鍵字................................................................................................................. 34 1.11,const 關鍵字也許該被替換為readolny....................................................................... 34 1.11.2,節省空間,避免不必要的內存分配,同時提高效率.................................... 35 1.12,最易變的關鍵字----volatile.......................................................................................... 36 1.13,最會帶帽子的關鍵字----extern.................................................................................... 37 1.14,struct 關鍵字..................................................................................................................38
標簽: c語言深度剖析
上傳時間: 2015-05-01
上傳用戶:cascas
matlab有限元網格劃分程序 DistMesh is a simple MATLAB code for generation of unstructured triangular and tetrahedral meshes. It was developed by Per-Olof Persson (now at UC Berkeley) and Gilbert Strang in the Department of Mathematics at MIT. A detailed description of the program is provided in our SIAM Review paper, see documentation below. One reason that the code is short and simple is that the geometries are specified by Signed Distance Functions. These give the shortest distance from any point in space to the boundary of the domain. The sign is negative inside the region and positive outside. A simple example is the unit circle in 2-D, which has the distance function d=r-1, where r is the distance from the origin. For more complicated geometries the distance function can be computed by interpolation between values on a grid, a common representation for level set methods. For the actual mesh generation, DistMesh uses the Delaunay triangulation routine in MATLAB and tries to optimize the node locations by a force-based smoothing procedure. The topology is regularly updated by Delaunay. The boundary points are only allowed to move tangentially to the boundary by projections using the distance function. This iterative procedure typically results in very well-shaped meshes. Our aim with this code is simplicity, so that everyone can understand the code and modify it according to their needs. The code is not entirely robust (that is, it might not terminate and return a well-shaped mesh), and it is relatively slow. However, our current research shows that these issues can be resolved in an optimized C++ code, and we believe our simple MATLAB code is important for demonstration of the underlying principles. To use the code, simply download it from below and run it from MATLAB. For a quick demonstration, type "meshdemo2d" or "meshdemond". For more details see the documentation.
標簽: matlab有限元網格劃分程序
上傳時間: 2015-08-12
上傳用戶:凜風拂衣袖