登录
首页 » c++ » 最优路径查找

最优路径查找

于 2023-05-01 发布 文件大小:5.56 MB
0 81
下载积分: 2 下载次数: 1

代码说明:

整体最优查找算法: 1) 用dijkstra函数计算每个必经节点与起点的距离,对于必经边,分别计算两端节点与原点的距离,取较小的那个,将这些节点放入vector points,将距离存储在dist2[maxnum][maxnum]中 2) 以dist2[][]中的距离为标准,从小到大排序points[]中的点,即点points[0]距离原点最近,依次往后 3) 不可经过的边,在输入时,权值已置为极大,无需再处理 4) 用dijkstra函数,计算初始点0与points[0]的最优距离,初始化总距离finaldis = dist[points[0]];用findpath函数输出该段路径,num统计节点数,num=t; 5) points[i]到points[i+1]的最优距离

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • ad7705br
    说明:  这是应用于MSP430F249系列单片机产品的中断应用程序,请大家参考使用就是了,有问题找我好了(MSP430F249 MCU products disruption to the application procedures, please refer to the use of mind, I have to find a good)
    2006-03-28 13:45:19下载
    积分:1
  • commassist
    visual C++ MFC 环境下 串口的连接,收发数据的实现,串口探测工具部分功能的实现(Serial port connection)
    2013-07-20 17:03:57下载
    积分:1
  • 客户端服务器端 tcp socket通信实例源码
    客户端服务器端 tcp socket通信实例源码
    2014-07-07下载
    积分:1
  • Ping
    ping tool, use vc6 compile passed
    2008-09-07 16:18:55下载
    积分:1
  • DLT
    基于visual c++平台,相机标定方法中的直接线性变换方法,即DLT方法(Based on visual c++ platform, camera calibration method of direct linear transformation method, namely DLT method)
    2013-09-05 16:34:56下载
    积分:1
  • heikeyuhuajia
    黑客与画家,高清扫描版pdf,中文版,是一本不错的计算机专业书籍(Hackers and Painters, HD scan version pdf, Chinese version, is a good computer science books)
    2016-04-07 16:21:15下载
    积分:1
  • 使用socket实现文件传输C++
    有服务端与客户端, TCP模式,使用socket实现文件传输C++源码
    2022-02-27 03:45:43下载
    积分:1
  • ExcelToTxt
    一个读取EXCEL数据,并且充足数据,重新写入TXT文档的程序,设计到Excel操作以及读写文件操作(EXCEL a read data, and sufficient data, re-write the program TXT documents and design to operations and to read and write Excel file operations)
    2010-11-08 01:30:44下载
    积分:1
  • jinlishengACMbisaitimu
    第二届吉林省大学生程序设计竞赛题目 含解题报告(Second Jilin Collegiate Programming Contest topics including problem-solving report)
    2011-06-16 14:18:37下载
    积分:1
  • Perl
    perl c it 以前有些应用中perl的速度比较慢,但是如果和c结合起来,就可以解决这样的问题,(perl c it in perl some applications before the slower, but if, and c together, we can solve this problem,)
    2016-05-07 17:59:32下载
    积分:1
  • 696516资源总数
  • 106658会员总数
  • 16今日下载