Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
networks[allpairs] - all-pairs shortest paths in a graph
Calling Sequence
allpairs(G)
allpairs(G, v)
Parameters
G
-
graph or network
v
name used to return a table of parents
Description
Important: The networks package has been deprecated. Use the superseding command GraphTheory[AllPairsDistance] instead.
This procedure is an implementation of Floyd's allpairs shortest path algorithm.
The result, T, is a table of distances between any two vertices. Thus is the shortest distance from u to v.
The optional extra parameter (eg. parents) is used to supply a name for a table of ancestors. Thus is the ancestor of v in the shortest path tree rooted at u.
Edge weights are assumed to be lengths or distances. Undirected edges are assumed to be bidirectional.
Edge weights must be non-negative.
This routine is normally loaded via the command with(networks) but may also be referenced using the full name networks[allpairs](...).
Examples
See Also
GraphTheory, GraphTheory[AllPairsDistance], networks(deprecated)[shortpathtree], networks(deprecated)[spantree], with
Download Help Document