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.
標(biāo)簽: Implemented following compile command
上傳時(shí)間: 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.
標(biāo)簽: Reese B. R. Copyright
上傳時(shí)間: 2015-09-24
上傳用戶:mpquest
考察例1 4 - 8中的1 4個(gè)點(diǎn)。A中的最近點(diǎn)對(duì)為(b,h),其距離約為0 . 3 1 6。B中最近點(diǎn)對(duì)為 (f, j),其距離為0 . 3,因此= 0 . 3。當(dāng)考察 是否存在第三類點(diǎn)時(shí),除d, g, i, l, m 以外 的點(diǎn)均被淘汰,因?yàn)樗鼈兙喾指罹€x= 1的 距離≥ 。RA ={d, i, m},RB= {g, l},由 于d 和m 的比較區(qū)中沒有點(diǎn),只需考察i 即可。i 的比較區(qū)中僅含點(diǎn)l。計(jì)算i 和l 的距離,發(fā)現(xiàn)它小于,因此(i, l) 是最近
標(biāo)簽:
上傳時(shí)間: 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.
標(biāo)簽: representation Magnitude the magnitude
上傳時(shí)間: 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.
標(biāo)簽: Butterworth internally Chebyshev specified
上傳時(shí)間: 2015-11-08
上傳用戶:253189838
基于verilog HDL的自動(dòng)售貨機(jī)控制電路設(shè)計(jì): 可以對(duì)5種不同種類的貨物進(jìn)行自動(dòng)售貨,價(jià)格分別為A=1.00,B=1.50,C=1.80,D=3.10,E=5.00 。售貨機(jī)可以接受1元,5角,1角三種硬幣(即有三種輸入信號(hào)IY,IWJ,IYJ),并且在一個(gè)3位7段LED(二位代表元,一位代表角)顯示以投入的總錢數(shù),最大9.90元,如果大于該數(shù)值,新投入的硬幣會(huì)退出,選擇貨物的輸入信號(hào)Ia,Ib,Ic,Id,Ie和一個(gè)放棄信號(hào)In,輸出指示信號(hào)為 Sa, Sb ,Sc ,Sd, Se 分別表示售出相應(yīng)的貨物,同時(shí)輸出的信號(hào)yuan, jiao代表找零,相應(yīng)每個(gè)脈沖代表找零相應(yīng)的硬幣,上述輸入和輸出信號(hào)均是一個(gè)固定寬度的脈沖信號(hào)。
標(biāo)簽: verilog 1.00 1.50 1.80
上傳時(shí)間: 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
標(biāo)簽: DESCRIPTION converter segments encoding
上傳時(shí)間: 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).
標(biāo)簽: Subsequence sequence Problem Longest
上傳時(shí)間: 2016-12-08
上傳用戶:busterman
Matlab實(shí)現(xiàn): Erlang B model(M/M/n/n)與 Erlang C model排隊(duì)系統(tǒng)的模擬,并畫出阻塞概率(P)與負(fù)載(A=lamda/miu in Erlang)的關(guān)系圖。用法:運(yùn)行RunMe
標(biāo)簽: Erlang model Matlab 排隊(duì)系統(tǒng)
上傳時(shí)間: 2014-01-02
上傳用戶:wcl168881111111
basic.c */ /**//* Project:NeuroBasic, basic package*//**/ /* Survey:This is a simple Basic b-code compiler which*/ /*can be used as a comfortable command shell for */ /* any program. The actual compiler is found in */ /*compiler.c.*/ /*The functions m_fctptr() and user_server()*/ /*build an interface to an
標(biāo)簽: basic NeuroBasic Project package
上傳時(shí)間: 2017-02-15
上傳用戶:xymbian
蟲蟲下載站版權(quán)所有 京ICP備2021023401號(hào)-1