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