可以求的网络的最短路径,直径,介数,度分布,聚类系数-Cannetworkseektheshortestpath,diameter,referredtothenumberofdegreedistribution,clusteringcoefficient
1
用Visualc++编写的一个简单的校园导游系统是我们数据结构的课程设计用mgraphinitgraph()函数来初始化图,使用字符串的函数strcpy来初始化信息和名称,再给各弧的权值赋值,由于全部赋值在找路径的过程中太多了,所以只给部分赋值了。
用intlocatevex(mgraphc,intv)来查找景点在图中的序号(由于之后继续增加或者减少结点)两景点间的所有路径用函数intallpath(mgraphc)找到所有的路径voidpath(mgraphc,intm,intn,intk)用于打印序号为m,n景点间的一条路径在其中,当走完一条路径后,将其存储在d[k]中,直到d[k]==n时输出这条路径,然后跳出,把d[k]点的visited设为0,继续进行下个顶点。
直至到所有的顶点都完成。
用voidshortestpath_dij(mgraphc)函数来计算两个顶点间的最短路径,使用迪克斯特拉算法用voidshortestpath_floyd(mgraphc)函数来计算两个顶点间的最短路径,使用floyd算法
2024/2/10 13:36:07 19KB 导游系统
1
多旅行商matlab实验源码实现了三种多旅行商问题%MTSPOF_GAFixedOpenMultipleTravelingSalesmenProblem(M-TSP)GeneticAlgorithm(GA)%Findsa(near)optimalsolutiontoavariationofthe"open"M-TSPby%settingupaGAtosearchfortheshortestroute(leastdistanceneeded%foreachsalesmantotravelfromthestartlocationtounique%individualcitiesandfinallytotheendlocation)%%Summary:%1.Eachsalesmanstartsatthefirstpoint,andendsatthelast%point,buttravelstoauniquesetofcitiesinbetween(noneof%themclosetheirloopsbyreturningtotheirstartingpoints)%2.Exceptforthefirstandlast,eachcityisvisitedbyexactlyonesalesman%%Note:TheFixedStartistakentobethefirstXYpointandtheFixedEnd%istakentobethelastXYpoint%%Input:%XY(float)isanNx2matrixofcitylocations,whereNisthenumberofcities%DMAT(float)isanNxNmatrixofcity-to-citydistancesorcosts%SALESMEN(scalarinteger)isthenumberofsalesmentovisitthecities%MIN_TOUR(scalarinteger)istheminimumtourlengthforanyofthe%salesmen,NOTincludingthestartpointorendpoint%POP_SIZE(scalarinteger)isthesizeofthepopulation(shouldbedivisibleby8)%NUM_ITER(scalarinteger)isthenumberofdesirediterationsforthealgorithmtorun%SHOW_PROG(scalarlogical)showstheGAprogressiftrue%SHOW_RES(scalarlogical)showstheGAresultsiftrue%%Output:%OPT_RTE(integerarray)isthebestroutefoundbythealgorithm%OPT_BRK(integerarray)isthelistofroutebreakpoints(thesespecifytheindices%intotherouteusedtoobtaintheindividualsalesmanroutes)%MIN_DIST(scalarfloat)isthetotaldistancetraveledbythesalesmen%%Route/BreakpointDetails:%Ifthereare10citiesand3salesmen,apossibleroute/break%combinationmightbe:rte=[56942837],brks=[37]%
1
leetcodepython题解,包含大量leetcode题目的解法,源代码,python实现CourseSchedule21.4.4Numberofislands14.5HeapsMergeKSortedLinkedLists1.5.1KthLargestElementinanArray1.5.2Arrays1.62sum‖l1.62SumⅢ1.6.2ContainsDuplicate1.6.3RotateArray1.643SumSmaller1.653Sumclosest1.663Sum1.6.7TwoSum1.68PlusOne1.6.9BestTimetoBuyandSellStock1.6.10Shortestworddistance1.6.11Movezeroes1.6.12ContainsDuplicate1.6.13MajorityElement1.6.14RemoveDuplicatesfromSortedArray1.6.15NestedListWeightSum1.6.16NestedListWeightedSumIl1.6.17Removeelement1.6.18IntersectionofTwoArraysll1.6.19MergeSortedArrays1.6.20ReverseVowelsofaString1.6.21IntersectionofTwoArrays1.6.22Containerwithmostwater1.6.23ProductofArrayExceptSelf1.6.24TrappingRainWater1.6.25MaximumSubarray1.6.26BestTimetoBuyandSellStockIl1.6.27FindMinimuminRotatedSortedArray1.6.28Pascal'sTriangle1.6.29Pascal'sTriangle‖l1.6.30SummaryRanges1.6.31MissingNumber1.6.32StringsValidAnagram1.7.1Validpalindrome1.7.2WordPattern1.7.3ValidParentheses1.7.4IsomorphicStrings1.7.5ReverseString1.7.6BitManipulationSumofTwoIntegers18.1SingleNumber18.2Singlenumber‖18.3SingleNumberIll1.8.4Maths1.9ReverseInteger1.9.1Palindromenumber19.2Pow(x,n)19.3Subsets1.94Subsets‖195FractiontoRecurringDecimal19.6Excelsheetcolumnnumber19.7Excelsheetcolumntitle19.8FactorialTrailingzeros199HappyNumber1.9.10Countprimes1.9.11Plusone19.12DivideTwoIntegers19.13MultiplyStrings1.9.14MaxPointsonaline1.9.15ProductofArrayExceptSelf19.16Powerofthree19.17IntegerBreak1.9.18Poweroffour9.19Adddigits1.9.20UglyNumber1.9.21glyNumberll1.9.22SuperUglyNumber19.23FindKpairswithsmallestsums1.924SelfCrossing1.9.25Paintfence1.9.26Bulbswitcher19.27Nimgame1.9.28Matrix1.10RotateImage1.10.1SetmatrixZeroes1.10.2Searcha2DMatrix1.10.3Searcha2dMatrixl1.10.4SpiralMatrix1.10.5SpiralMatrix‖l1.10.6DesignLRUCache1.11.1IntroductionMyLeetcodeSolutionsinPythonThisbookwillcontainmysolutionsinPythontotheleetcodeproblems.Currently,willjusttrytoposttheacceptedsolutions.TheplanistoeventuallyincludedetailedexplanationsofeachandeverysolutionamdoingthisjustforfunLinkedListCycleLinkedListCvcleGivenalinkedlist,determineifithasacycleinitFollowup:Canyousolveitwithoutusingextraspace?Url:https://leetcode.com/problems/linked-list-cycle/Definitionforsingly-linkedlistclassListNodeobject)###definit(self,x)self,val=xself,nextNoneclassSolution(object):defhasCycle(self,head)IItypehead:ListNodertype:boolIIIIifhead=nonereturnfalseelsefastheadslow=headWhilefastnoneandfast.nextnonesloW=slownextfastfast.nextnextiffast=slow:breaki千fastNoneorfast.next=nonereturnFalseeliffast=slowreturntruereturnfalseLinkedListCycleReverseLinkedListReverseLinkedlistReverseasinglylinkedlistUrl:https://eetcode.com/problems/reverse-linked-list/definitionforsingly-linkedlist#tclassListNode(object):##def-init(self,x)self.∨al=xselfnextnoneclassSolution(object):defreverseList(self,head)11IIl1typehead:ListNodertype:ListNodeifhead=nonereturnnoneelifhead!=noneandheadnext=nonereturnheadelsetempNonenextnodenoneWhileheadNonenextnodeheadnexthead.nexttemptemp=headheadnextnodereturntempDeletenodeinalinkedlistDeletenodeinalinkedlistWriteafunctiontodeleteanode(exceptthetail)inasinglylinkedlist,givenonlyaccesstothatnodeSupposedthelinkedlistis1->2->3->4andyouaregiventhethirdnodewithvalue3,thelinkedlistshouldbecome1->2->4aftercallingyourfunctionUrl:https://eetcode.com/problems/delete-node-in-a-linked-list/Definitionforsingly-linkedlistclassListNode(object):#def-init(self,x)#self,valxself,nextNoneclasssolution(object):defdeleteNode(self,node):IIlIItypenode:ListNodertype:voidDonotreturnanythingmodifynodein-placeinsteadI111fnode=nonepasse⊥se:nextnodenode.nextnodevalnextnodevalnode.nextnextnode,next
2023/11/8 17:06:47 574KB leetcode python题解
1
Thisbookintroducesyoutotheworldofdatastructuresandalgorithms.Datastructuredefinesthewaydataisarrangedincomputermemoryforfastandefficientaccesswhilealgorithmisasetofinstructiontosolveproblemsbymanipulatingthesedatastructures.DataStructuresalgorithmsInGoHemantjainCopyrightoHemantJain2017.AllRightReservedHemantJainassertsthemoralrighttobeidentifiedasheauthorofthisworkAllrightsreserved.Nopartofthispublicationmaybereproduced,storedinorintroducedintoaretrievalsystem,ortransmitted,inanyform,orbyanymeans(electrical,mechanical,photocopying,recordingorotherwise)withoutthepriorwrittenpermissionoftheauthor,exceptinthecaseofverybriefquotationsembodiedincriticalreviewsandcertainothernonco妹妹ercialusespermittedbycopyrightlaw.AnypersonwhodoesanyunauthorizedactinrelationtothispublicationmaybeliabletocriminalprosecutionandcivilclaimsfordamagesACKNOWLEDGEMENTTheauthorisverygratefultoGodALMIGhTYforhisgraceandblessingDeepestgratitudeforthehelpandsupportofmybrotherDrSumantJain.ThisbookwouldnothavebeenpossiblewithoutthesupportandencouragementheprovidedIwouldliketoexpressprofoundgratitudetomyguide/myfriendNaveenKaushikforhisinvaluableencouragement,supervisionandusefulsuggestionthroughoutthisbookwritingwork.hissupportandcontinuousguidanceenablemetocompletemyworksuccessfuFinallyyetimportantly,IamthankfultoLoveSinghal,AnilberryandotherswhohelpedmedirectlyorindirectlyincompletingthisbookHemantJainTABLEOFCONTENTSACKNOWLEDGEMENTTABLEOFCONTENTSChAPTERO:HOWTOUSETHISBOOKWHATTHISBOOKISABOUTPREPARATIONPLANSSUMMARYChAPTER1:NTRODUCTION-PROGRAMMIINGOVERVIEWINTRODUCTIONFIRSTGOPROGRAMvariablesconstantsBASICDATATYPESSTRINGCONDITIONSANDLOOPSFUNCTIONPARAMETERPASSINGCALLBYVALUEPOINTERSPARAMETERPASSING.CALLBYPOINTER/REFERENCESTRUCTURESMETHODSINTERFACEARRaySLICEMAP/DICTIONARYARRAYINTERVIEWQUESTIONSCONCEPTOFSTACKSYSTEMSTACKANDMETHODCALLSRECURSIVEFUNCTIONEXERCISESCHAPTER2:ALGORITHMSANALYSISINTRODUCTIONALGORITHMASYMPTOTICANALYSISBIG-ONOTATIONOMEGA-QNOTATIONTHETA-⊙NOTATIONCOMPLEXITYANALYSISOFALGORITHMSTIMECOMPLEXITYORDERDERIVINGTHERUNTIMEFUNCTIONOFANALGORITHMTIMECOMPLEXITYEXAMPLESMASTERTHEOREMMODIFIEDMASTERTHEOREMEXERCISECHAPTER3:APPROACHTOSOLVEALGORITHMDESIGNPROBLEMSINTRODUCTIONCONSTRAINTSIDEAGENERATIONCOMPLEXITIESCODINGTESTINGEⅹAMPLESUMMARYChaPTER4:ABSTRACTDATATYPEGOCollECtIonsABSTRACTDATATYPE(ADTDATA-STRUCTUREGOCOLLECTIONFRAMEWORKACKQUEUETREEBINARYTREEBINARYSEARCHTREES(BSTPRIORITYQUEUE(HEAPHASH-TABLEDICTIONARY/SYMBOLTABLEGRAPHSGRAPHALGORITHMSSORTINGALGORITHMSCOUNTINGSORTENDNOTEchaPTER5:SEARCHINGINTRODUCTIONWHYSEARCHING?DIFFERENTSEARCHINGALGORITHMSLINEARSEARCH-UNSORTEDINPUTLINEARSEARCH-SORTEDBINARYSEARCHSTRINGSEARCHINGALGORITHMSHASHINGANDSYMBOLTABLESHOWSORTINGISUSEFULINSELECTIONALGORITHM?PROBLEMSINSEARCHINGEXERCISECHAPTER6:SORTINGINTRODUCTIONTYPEOFSORTINGBUBBLE-SORTMODIFIED(IMPROVED)BUBBLE-SORTINSERTION-SORTSELECTION-SORTMERGE-SORTQUICK-SORTQUICKSELECTBUCKETSORTGENERALIZEDBUCKETSORTHEAP-SORTTREESORTINGEXTERNALSORT(EXTERNALMERGE-SORTICOMPARISONSOFTHEVARIOUSSORTINGALGORITHMSSELECTIONOFBESTSORTINGALGORITHMEXERCISEChAPTER7:LINKEDLISTINTRODUCTIONLINKEDLISTTYPESOFLINKEDLISTSINGLYLINKEDLISTDOUBLYLINKEDLISTCIRCULARLINKEDLISTDOUBLYCIRCULARLISTEXERCISEchapter8:STACKINTRODUCTIONTHESTACKABSTRACTDATATYPESTACKUSINGSLICESSTACKGENERICIMPLEMENTATIONSTACKUSINGLINKEDLISTPROBLEMSINSTACKUSESOFSTACKEXERCISEchaPTER9:QUEUEINTRODUCTIONTHEQUEUEABSTRACTDATATYPEQUEUEUSINGLISTQUEUEUSINGLINKEDLISTPROBLEMSINQUEUEEXERCISECHAPTER10:TREEINTRODUCTIONTERMINOLOGYINTREEBINARYTREETYPESOFBINARYTREESPROBLEMSINBINARYTREEBINARYSEARCHTREE(BST)PROBLEMSINBINARYSEARCHTREE(BSTISEGMENTTREEAVLTREESRED-BLACKTREESPLAYTREEB-TREEB+TREEB*TREEEXERCISECHAPTERIl:PRIORITYQUEUEINTRODUCTIONTYPESOFHEAPHEAPADTOPERATIONSOPERATIONONHEAPHEAP-SORTUSESOFHEAPPROBLEMSINHEAPPRIORITYQUEUEGENERICIMPLEMENTATION.PRIORITYQUEUEUSINGHEAPFROMCONTAINER.EXERCISECHAPTER12:HASH-TABLEINTRODUCTIONHASH-TABLEHASHIINGWITHOPENADDRESSINGHASHINGWITHSEPARATECHAININGPROBLEMSINHASHINGEXERCISEChaPTER13:GRAPHSINTRODUCTIONGRAPHREPRESENTATIONADJACENCYMATRIXADJACENCYLISTGRAPHTRAVERSALSDEPTHFIRSTTRAVERSALBREADTHFIRSTTRAVERSALPROBLEMSINGRAPHDIRECTEDACYCLICGRAPHTOPOLOGICALSORTMINIMUMSPANNINGTREES(MST)SHORTESTPATHALGORITHMSINGRAPHEXERCISEChAPTER14:STRINGALGORITHMSTRODUCTIONSTRINGMATCHINGDICTIONARY/SYMBOLTABLEPROBLEMSINSTRINGEXERCISECHAPTER15:ALGORITHMDESIGNTECHNIQUESNTRODUCTIONBRUTEFORCEALGORITHMGREEDYALGORITHMDIVIDE-AND-CONQUER,DECREASE-AND-CONQUERDYNAMICPROGRAMMINGREDUCTIONTRANSFORM-AND-CONQUERBACKTRACKINGBRANCH-AND-BOUNDAALGORITHMCONCLUSIONCHAPTER16:BRUTEFORCEALGORITHMINTRODUCTIONPROBLEMSINBRUTEFORCEALGORITHMCONCLUSIONCHAPTER17:GREEDYALGORITHMINTRODUCTIONPROBLEMSONGREEDYALGORITHMCHAPTER18:DIVIDE-AND-CONQUER,DECREASE-AND-CONQUER
2023/3/25 9:44:09 6.19MB Data Structures Algorithms
1
(含源码及报告)本程序分析了自2016年到2021年(外加)每年我国原油加工的产量,并且分析了2020年全国各地区原油加工量等,含饼状图,柱状图,折线图,数据在地图上显示。
运转本程序需要requests、bs4、csv、pandas、matplotlib、pyecharts库的支持,如果缺少某库请自行安装后再运转。
文件含6个excel表,若干个csv文件以及一个名字为render的html文件(需要用浏览器打开),直观的数据处理部分是图片以及html文件,可在地图中显示,数据处理的是excel文件。
不懂可以扫文件中二维码在QQ里面问。
2022/9/30 16:31:44 29.75MB 爬虫 python 源码软件 开发语言
1
CUDA平行最短路径运用CUDA平台的NVIDIAGPU上的并行最短路径算法
2015/3/14 16:06:21 13KB Cuda
1
作者:ProfessorKwang-ChengChen,ProfessorRamjeePrasad出书:Wiley2009目录Prefacexi1WirelessCommunications11.1WirelessCommunicationsSystems11.2OrthogonalFrequencyDivisionMultiplexing(OFDM)31.2.1OFDMConcepts41.2.2MathematicalModelofOFDMSystem51.2.3OFDMDesignIssues91.2.4OFDMA211.3MIMO241.3.1Space-TimeCodes241.3.2SpatialMultiplexingUsingAdaptiveMultipleAntennaTechniques271.3.3Open-loopMIMOSolutions271.3.4Closed-loopMIMOSolutions291.3.5MIMOReceiverStructure311.4Multi-userDetection(MUD)341.4.1Multi-user(CDMA)Receiver341.4.2SuboptimumDS/CDMAReceivers37References402SoftwareDefinedRadio412.1SoftwareDefinedRadioArchitecture412.2DigitalSignalProcessorandSDRBasebandArchitecture432.3ReconfigurableWirelessCommunicationSystems462.3.1UnifiedCommunicationAlgorithm462.3.2ReconfigurableOFDMImplementation472.3.3ReconfigurableOFDMandCDMA472.4DigitalRadioProcessing482.4.1ConventionalRF482.4.2DigitalRadioProcessing(DRP)BasedSystemArchitecture52References583WirelessNetworks593.1MultipleAccessCommunicationsandALOHA603.1.1ALOHASystemsandSlottedMultipleAccess613.1.2SlottedALOHA613.1.3StabilisedSlottedALOHA643.1.4ApproximateDelayAnalysis653.1.5UnslottedALOHA663.2SplittingAlgorithms663.2.1TreeAlgorithms673.2.2FCFSSplittingAlgorithm683.2.3AnalysisofFCFSSplittingAlgorithm693.3CarrierSensing713.3.1CSMASlottedALOHA713.3.2SlottedCSMA763.3.3CarrierSenseMultipleAccesswithCollisionDetection(CSMA/CD)793.4Routing823.4.1FloodingandBroadcasting833.4.2ShortestPathRouting833.4.3OptimalRouting833.4.4HotPotato(Reflection)Routing843.4.5Cut-throughRouting843.4.6InterconnectedNetworkRouting843.4.7ShortestPathRoutingAlgorithms843.5FlowControl893.5.1WindowFlowControl893.5.2RateControlSchemes913.5.3QueuingAnalysisoftheLeakyBucketScheme9
2015/5/14 13:23:51 7.73MB Cognitive Radio Networks
1
在日常工作中,钉钉打卡成了我生活中不可或缺的一部分。然而,有时候这个看似简单的任务却给我带来了不少烦恼。 每天早晚,我总是得牢记打开钉钉应用,点击"工作台",再找到"考勤打卡"进行签到。有时候因为工作忙碌,会忘记打卡,导致考勤异常,影响当月的工作评价。而且,由于我使用的是苹果手机,有时候系统更新后,钉钉的某些功能会出现异常,使得打卡变得更加麻烦。 另外,我的家人使用的是安卓手机,他们也经常抱怨钉钉打卡的繁琐。尤其是对于那些不太熟悉手机操作的长辈来说,每次打卡都是一次挑战。他们总是担心自己会操作失误,导致打卡失败。 为了解决这些烦恼,我开始思考是否可以通过编写一个全自动化脚本来实现钉钉打卡。经过一段时间的摸索和学习,我终于成功编写出了一个适用于苹果和安卓系统的钉钉打卡脚本。
2024-04-09 15:03 15KB 钉钉 钉钉打卡