CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - shortest path in map
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Search - shortest path in map - List
[
VC/MFC
]
hitgps
DL : 0
程序的设计选用C++语言,并且界面使用MFC制作,MFC中的窗口形式使用下拉形式和扩大化设计,学校介绍、学院介绍、景点介绍采用文件方式读取,进行文件的查找,学校导航运用了图的存储结构,并显示在学校的平面图上,学校平面图采用Google Earth的卫星照片,运用平面图上各个顶点(包括主要景点及关键路口)像素位置来定位其坐标,运用弗洛伊德算法可以定位两个顶点之间的最短路径,用户还可根据需要直接在平面图上点击自己感兴趣的地点,相应的介绍会以窗口界面的形式直接显示出来。-he design selection process C++ language, and the production of MFC interface, MFC in the form of window use the drop-down form and expansion of the design of schools, colleges, the spots to introduce the use of papers read, carried out to find documents, the school used the navigation map storage structure, and show the floor plan in the school, the school plans the use of Google Earth satellite photos, floor plans on the use of all vertices (including the main attractions and key junctions) to locate the pixel position coordinates, using Floyd algorithm can be targeted between two vertices of the shortest path, the user can also directly in the plan as needed by clicking on the location of interest, the corresponding window interface will be introduced directly displayed.
Date
: 2026-01-02
Size
: 5.58mb
User
:
sunwenyi
[
VC/MFC
]
dijkstra
DL : 1
dijkstra算法 问题描述 目前网络上电子地图的使用很普遍。利用电子地图可以很方便地确定从一个地点到另一个地点的路径。特别地,可确定在城市中的公交换乘路线。 电子地图可以看成是一个图,而公交线路图可看成是带权有向图G =(V,E),其中每条边的权是非负实数。 你的任务:对给定的一个(无向)图G,及G中的两点s、t,计算从顶点s到顶点t的最短距离和最少路段数。 输入 输入文件中有若干组测试数据(组数不超过20)。 每组测试数据的第1行是一个正整数n,表示地图G的顶点数,n<50。 接下来的n行采用邻接矩阵方式描述这一个地图,第i行有n个数,依次表示第i个顶点与第1、2、3、…、n个顶点的路径长。假如两个顶点间无边相连,用一个-1表示。相邻的两个整数之间用空格隔开。注意,图中每个顶点 i处都没有自己到自己的边。 再在下面的一行上给出两个整数s、t,表示上述地图上的两个顶点。 每组测试数据输入结束后空一行。 输入直到文件结束。-Description of the problem At present the use of electronic maps on the network are common. The use of electronic maps can be easily identified from one location to another location path. In particular, can be determined in the cities bus transfer routes. E-map can be seen as a map, while the bus route map can be seen as a weighted directed graph G = (V, E), in which each edge of the right of a non-negative real number. Your task: given a (undirected) Figure G, and G, two points s, t, calculated from the vertex s to vertex t, the shortest distance and the minimum number of sections. Input Input file there are several groups of test data (group of not more than 20). Each test data row 1 is a positive integer n, said the map of G, vertices, n <50. The next n lines describe the use of adjacency matrix, a map, the first i have n number of rows in turn said that the first i vertices with the first 1,2,3, ..., n vertices of the path length. If the two ver
Date
: 2026-01-02
Size
: 862kb
User
:
谷
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.