Floyd-Warshall算法描述 1)适用范围: a)APSP(All Pairs Shortest Paths) b)稠密图效果最佳 c)边权可正可负 2)算法描述: a)初始化:dis[u,v]=w[u,v] b)For k:=1 to n For i:=1 to n For j:=1 to n If dis[i,j]>dis[i,k]+dis[k,j] Then Dis[I,j]:=dis[I,k]+dis[k,j] c)算法结束:dis即为所有点对的最短路径矩阵 3)算法小结:此算法简单有效,由于三重循环结构紧凑,对于稠密图,效率要高于执行|V|次Dijkstra算法。时间复杂度O(n^3)。 考虑下列变形:如(I,j)∈E则dis[I,j]初始为1,else初始为0,这样的Floyd算法最后的最短路径矩阵即成为一个判断I,j是否有通路的矩阵。更简单的,我们可以把dis设成boolean类型,则每次可以用“dis[I,j]:=dis[I,j]or(dis[I,k]and dis[k,j])”来代替算法描述中的蓝色部分,可以更直观地得到I,j的连通情况。
标签: Floyd-Warshall Shortest Pairs Paths
上传时间: 2013-12-01
上传用户:dyctj
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
标签: basic NeuroBasic Project package
上传时间: 2017-02-15
上传用户:xymbian
该程序用以查找任意两个整数之间的所有素数。 Prime number finder can find all primes between a and b and will write the results to the file PRIMES.TXT
上传时间: 2014-01-14
上传用户:cccole0605
给你A,B两个字符串,检查B串是否是A串的子串,类似于Java的String.indexOf("")。找到匹配失败时的最合适的回退位置,而不是简单的回退到子串的第一个字符(常规的枚举查找方式,是简单的回退到子串的第一个字符,KMP算法的性能分析Java实现实例)*此仅供大家参考、交流,希望对大家有所帮助!
标签: 字符串
上传时间: 2017-05-20
上传用户:498732662
随着光伏发电系统快速发展,以及电动汽车充电桩的普及,传统的剩余电流保护器无法满足实际需求。介绍了一款B型剩余电流保护器,采用磁调制剩余电流互感器和零序电流互感器采集剩余电流。根据GB/T 22794—2017标准要求,可识别1 kHz及以下的正弦交流、带和不带直流分量的脉动直流、平滑直流等剩余电流信号。经信号调理电路将电压信号送到单片机进行采集和判断。通过试验测试,该样机在测试精度和速度上均符合国家标准的相关要求。The rapid development of photovoltaic power generation systems and the popularity of electric vehicle charging piles make the traditional residual current protective devices unable to meet the actual demand.This paper proposed a type B residual current protective device,which uses the magnetically modulated residual current transformer and the zero sequence current transformer to acquire the residual current.According to the requirements of GB/T 22794—2017,the type B residual current protective device can detect sinusoidal AC residual current of 1kHz and below 1kHz,pulsating DC residual current with and without DC component,smooth DC residual current and so on.The signal processing circuit sends the voltage signal to the MCU for acquisition and judgment.Through experimental tests,the device meets the relevant requirements of national standards in terms of test accuracy and speed.
标签: 电流保护器
上传时间: 2022-03-27
上传用户:
21世纪大学新型参考教材系列 集成电路B 荒井
上传时间: 2013-04-15
上传用户:eeworm
家电维修(最基础的教程B)1-20.Torrent
上传时间: 2013-06-10
上传用户:eeworm
jk-b交通信号控制机原理图
上传时间: 2013-07-13
上传用户:eeworm
专辑类-实用电子技术专辑-385册-3.609G jk-b交通信号控制机原理图-1.3M.zip
上传时间: 2013-08-02
上传用户:zhf1234
专辑类-电子基础类专辑-153册-2.20G 21世纪大学新型参考教材系列-集成电路B-荒井-159页-2.8M.pdf
上传时间: 2013-05-16
上传用户:pkkkkp