Implemented BFS, DFS and A* To compile this project, use the following command: g++ -o search main.cpp Then you can run it: ./search The input is loaded from a input file in.txt Here is the format of the input file: The first line of the input file shoud contain two chars indicate the source and destination city for breadth first and depth first algorithm. The second line of input file shoud be an integer m indicate the number of connections for the map. Following m lines describe the map, each line represents to one connection in this form: dist city1 city2, which means there is a connection between city1 and city2 with the distance dist. The following input are for A* The following line contains two chars indicate the source and destination city for A* algorithm. Then there is an integer h indicate the number of heuristic. The following h lines is in the form: city dist which means the straight-line distance from the city to B is dist.
標簽: Implemented following compile command
上傳時間: 2014-01-01
上傳用戶:lhc9102
* "Copyright (c) 2006 Robert B. Reese ("AUTHOR")" * All rights reserved. * (R. Reese, reese@ece.msstate.edu, Mississippi State University) * IN NO EVENT SHALL THE "AUTHOR" BE LIABLE TO ANY PARTY FOR * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE "AUTHOR" * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
上傳時間: 2015-09-24
上傳用戶:mpquest
考察例1 4 - 8中的1 4個點。A中的最近點對為(b,h),其距離約為0 . 3 1 6。B中最近點對為 (f, j),其距離為0 . 3,因此= 0 . 3。當考察 是否存在第三類點時,除d, g, i, l, m 以外 的點均被淘汰,因為它們距分割線x= 1的 距離≥ 。RA ={d, i, m},RB= {g, l},由 于d 和m 的比較區中沒有點,只需考察i 即可。i 的比較區中僅含點l。計算i 和l 的距離,發現它小于,因此(i, l) 是最近
標簽:
上傳時間: 2013-12-03
上傳用戶:66666
Verilog HDL: Magnitude For a vector (a,b), the magnitude representation is the following: A common approach to implementing these arithmetic functions is to use the Coordinate Rotation Digital Computer (CORDIC) algorithm. The CORDIC algorithm calculates the trigonometric functions of sine, cosine, magnitude, and phase using an iterative process. It is made up of a series of micro-rotations of the vector by a set of predetermined constants, which are powers of two. Using binary arithmetic, this algorithm essentially replaces multipliers with shift and add operations. In a Stratix™ device, it is possible to calculate some of these arithmetic functions directly, without having to implement the CORDIC algorithm.
標簽: representation Magnitude the magnitude
上傳時間: 2013-12-24
上傳用戶:金宜
design LP,HP,B S digital Butterworth and Chebyshev filter. All array has been specified internally,so user only need to input f1,f2,f3,f4,fs(in hz), alpha1,alpha2(in db) and iband (to specify the type of to design). This program output hk(z)=bk(z)/ak(z),k=1,2,..., ksection and the freq.
標簽: Butterworth internally Chebyshev specified
上傳時間: 2015-11-08
上傳用戶:253189838
A* sudo sudo/* B* adduser script adduser C* rmuser script rmuser E* tout tout/* F* dumdum dumdum G* lostfile lostfile H* Mkfl.localsys Makefile.localsys I* spacegripe spacegripe J* sendmail.cf sendmail.cf N* remote remote.c O* distributed conrol distrib/* P* hosts and name server makerevhosts Q* xargs xargs/*
標簽: adduser script rmuser sudo
上傳時間: 2016-03-29
上傳用戶:gxrui1991
基于verilog HDL的自動售貨機控制電路設計: 可以對5種不同種類的貨物進行自動售貨,價格分別為A=1.00,B=1.50,C=1.80,D=3.10,E=5.00 。售貨機可以接受1元,5角,1角三種硬幣(即有三種輸入信號IY,IWJ,IYJ),并且在一個3位7段LED(二位代表元,一位代表角)顯示以投入的總錢數,最大9.90元,如果大于該數值,新投入的硬幣會退出,選擇貨物的輸入信號Ia,Ib,Ic,Id,Ie和一個放棄信號In,輸出指示信號為 Sa, Sb ,Sc ,Sd, Se 分別表示售出相應的貨物,同時輸出的信號yuan, jiao代表找零,相應每個脈沖代表找零相應的硬幣,上述輸入和輸出信號均是一個固定寬度的脈沖信號。
上傳時間: 2016-07-12
上傳用戶:lanwei
DESCRIPTION : BIN to seven segments converter -- segment encoding -- a -- +---+ -- f | | b -- +---+ <- g -- e | | c -- +---+ -- d -- Enable (EN) active : high -- Outputs (data_out) active : low
標簽: DESCRIPTION converter segments encoding
上傳時間: 2016-08-17
上傳用戶:ainimao
Problem B:Longest Ordered Subsequence A numeric sequence of ai is ordered if a1 < a2 < ... < aN. Let the subsequence of the given numeric sequence (a1, a2, ..., aN) be any sequence (ai1, ai2, ..., aiK), where 1 <= i1 < i2 < ... < iK <= N. For example, sequence (1, 7, 3, 5, 9, 4, 8) has ordered subsequences, e. g., (1, 7), (3, 4, 8) and many others. All longest ordered subsequences are of length 4, e. g., (1, 3, 5, 8).
標簽: Subsequence sequence Problem Longest
上傳時間: 2016-12-08
上傳用戶:busterman
Matlab實現: Erlang B model(M/M/n/n)與 Erlang C model排隊系統的模擬,并畫出阻塞概率(P)與負載(A=lamda/miu in Erlang)的關系圖。用法:運行RunMe
上傳時間: 2014-01-02
上傳用戶:wcl168881111111