Description Usage Arguments Details Value
View source: R/functions_graph.R
get reachability to goal states (or to 'target' states if specified). See details.
1 | getReachability(g, target = NULL)
|
g |
an 'igraph' object generated by |
target |
a numerical vector, which gives IDs of target states. NULL means IDs of goal states. |
Reachability of a state represent whether it is on any acyclic path to any of goal states (or to any of 'target' states if specified).
Suppose you proceeded from the initial state of the sliding puzzles.
When your current state is 'reachable', you are on the right track. By proceeding further from there, you can achive one of goal (or 'target“) states without returning states which you have already passes through (and without being interrupted by any of goal states, if 'target' is specified).
When your current state is 'unreachable', something goes wrong. By proceeding further from there you will eventually see states which you have already passes through (or will be intrrupted by any of goal states if 'target' is specified) before you achive one of goal ('target') states.
'Reachability' of a state is a wider concept than whether it is on the shortest pathes to the goal (target) states: States on the longer pathes are also 'reachable'.
a binary vector of the length of the number of states in 'g'. The ith element gives reachability of the ith state in 'g' (0:unreachable, 1:reachable)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.