[输入] 图的顶点个数N,图中顶点之间的关系及起点A和终点B [输出] 若A到B无路径,则输出“There is no path” 否则输出A到B路径上个顶点 [存储结构] 图采用邻接矩阵的方式存储。 [算法的基本思想] 采用广度优先搜索的方法,从顶点A开始,依次访问与A邻接的顶点VA1,VA2,...,VAK, 访问遍之后,若没有访问B,则继续访问与VA1邻接的顶点VA11,VA12,...,VA1M,再访问与VA2邻接顶点...,如此下去,直至找到B,最先到达B点的路径,一定是边数最少的路径。实现时采用队列记录被访问过的顶点。每次访问与队头顶点相邻接的顶点,然后将队头顶点从队列中删去。若队空,则说明到不存在通路。在访问顶点过程中,每次把当前顶点的序号作为与其邻接的未访问的顶点的前驱顶点记录下来,以便输出时回溯。 #include<stdio.h> int number //队列类型 typedef struct{ int q[20]
标签: 输入
上传时间: 2015-11-16
上传用户:ma1301115706
为基带系统测试误码率而写的数字噪声程序,包括噪声产生程序和一个测试文件。可以分别产生两路噪声供I,Q两路使用,速率80Mbps左右。
上传时间: 2015-11-19
上传用户:米卡
A system simulation environment in Matlab/Simulink of RFID is constructed in this paper. Special attention is emphasized on the analog/RF circuit.Negative effects are concerned in the system model,such as phase noise of the local oscillator,TX-RX coupling,reflection of the environment, AWGN noise,DC offset,I/Q mismatch,etc.Performance of the whole system can be evaluated by changing the coding method,parameters of building blocks,and operation distance.Finally,some simulation results are presented in this paper.
标签: environment constructed simulation Simulink
上传时间: 2014-01-09
上传用户:zhangliming420
Software Testing, Second Edition provides practical insight into the world of software testing and quality assurance. Learn how to find problems in any computer program, how to plan an effective test approach and how to tell when software is ready for release. Updated from the previous edition in 2000 to include a chapter that specifically deals with testing software for security bugs, the processes and techniques used throughout the book are timeless. This book is an excellent investment if you want to better understand what your Software Test team does or you want to write better software.
标签: practical Software provides software
上传时间: 2014-08-01
上传用户:zhaiyanzhong
The subroutines glkern.f and lokern.f use an efficient and fast algorithm for automatically adaptive nonparametric regression estimation with a kernel method. Roughly speaking, the method performs a local averaging of the observations when estimating the regression function. Analogously, one can estimate derivatives of small order of the regression function.
标签: automatically subroutines and algorithm
上传时间: 2015-11-25
上传用户:luke5347
嘿嘿,大侠看到不要见笑呀... 大家都知道使用DLL的好处.于是我就想把FORM封装到DLL里面去. 到网上找,发现是MDI和模式窗体的,非模式的也有很多问题.便想自己解决这个问题. 原来是用DLL创建一个对象返回,但发现有很多的问题. 想了半天就去寻根问柳吧. 找到了类. 我就想把类封装进DLL,到时简单的返回一个类,然后在主程序里操作不就简单了? 找了半天发现了TFormClass,于是试了试从DLL导出来,像一般的程序一样创建窗体发现成功. 接着我又想看看其他的类是不是也能这样,就拿TFrame来实验. function GetDllFrameClass():TFrame stdcall 第一次是这样声明的,失败.奇怪?! 试了好多次都不行,就想到了TFormClass(Ctrl+左键),进去看看,发现是这样声明的. TFormClass = class of TForm 哎呀,恍然大悟!! class(TFrame) 是声明一个类, 这个类继承了TFrame类 f: TFrame 是一个对象 class of TFrame 声明的是类类型, f:TFrameClass 是一个类. function GetDllFrameClass():TFrame 返回就不是类而是对象了,照TFormClass修改后TFrameClass = class of TFrame 运行...成功,
上传时间: 2013-12-10
上传用户:kiklkook
unit Video interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, stdctrls, ExtCtrls, avicap, mmsystem, dsgnintf // Types for event-procedures type TCapStatusProc = procedure(Sender: TObject) of object TCapStatusCallback = procedure(Sender: TObject nID: integer status: string) of object TVideoStream = procedure(sender: TObject lpVhdr: PVIDEOHDR) of object TAudioStream = procedure(sender: TObject lpWHdr: PWAVEHDR) of object // Property Editor for driver selection type TDrivereditor = class(TPropertyEditor) function GetAttributes: TPropertyAttributes override procedure GetValues(Proc: TGetStrProc) override function GetValue: string override procedure SetValue(const Value: string) override end
标签: interface Messages Graphics Controls
上传时间: 2013-12-21
上传用户:heart520beat
This application report describes the use of Timer_A3 to decode RC5 and SIRC TV IR remote control signals. The decoder described in this report is interrupt-driven and operates a background function using specific features the Timer_A3. Only a small portion of the MSP430 CPU?s nonreal-time resources is used. Specific hardware bit-latching capabilities of the Timer_A3 module are used for real-time decoding of the IR data signal, independent and asynchronous to the CPU. CPU activity and power consumption are kept to an absolute minimum level. The Timer_A3 decoder implementation also allows other tasks to occur simultaneously if required. The solutions provided are written specifically for MSP430x11x(1) and MSP430x12x derivatives, but can be adapted to any other MSP430 incorporating Timer_A3. 電視遙控器設計基於MSP430
标签: application describes Timer_A control
上传时间: 2014-01-01
上传用户:qq21508895
Implement the step 2 of two-level logic minimization. Our goal is to find the minimum (exact minimum) sum-of-products expression for a given function.
标签: minimization Implement the two-level
上传时间: 2014-01-09
上传用户:无聊来刷下
New users and old of optimization in MATLAB will find useful tips and tricks in this document, as well as examples one can use as templates for their own problems. Use this tool by editing the file optimtips.m, then execute blocks of code in cell mode from the editor, or best, publish the file to HTML. Copy and paste also works of course. Some readers may find this tool valuable if only for the function pleas - a partitioned least squares solver based on lsqnonlin. This is a work in progress, as I fully expect to add new topics as I think of them or as suggestions are made. Suggestions for topics I ve missed are welcome, as are corrections of my probable numerous errors. The topics currently covered are listed below
标签: optimization and document MATLAB
上传时间: 2015-12-24
上传用户:佳期如梦