Checks if the graph contains at least one tree or one arborescence
checkGraph function checks if it is possible to
find at least one tree (or arborescence, if it is the case)
in the graph. It only happens when the graph is connected
and it is posible to find a walk from the source to any
vector containing the nodes of the graph, identified by a number that goes from 1 to the order of the graph.
matrix with the list of arcs of the graph. Each row represents one arc. The first two columns contain the two endpoints of each arc and the third column contains their weights.
number pointing the source node of the graph.
logical value indicating whether the
graph is directed (
checkGraph returns the value
TRUE if the
graph meets the requirements and
FALSE otherwise. If
the graph is not acceptable this functions also prints the
1 2 3 4 5 6
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.