character string or integer giving the starting node.
end
character string or integer giving the ending node.
…
generic arguments.
Value
When at least one path exists, a "mathgraph" object containing
the edges within the first path found;
this may be an empty mathgraph if start and end are equal.
When no path exists, returns NULL.
Details
getpath is a generic function with methods for
"mathgraph", "incidmat" and "adjamat".
The default method converts x to class "incidmat".
getpath.adjamat is an implementation of algorithm 2.2 in Chachra,
Ghare and Moore (1979) and getpath.incidmat is an implementation
of their algorithm 2.3.
The distinction between non-existent paths and paths of length zero
may be useful in some situations.
References
Chachra, V., Ghare, P. M. and Moore, J. M. (1979).
Applications of Graph Theory Algorithms.
Elvesier North Holland, New York.