navGraph
Description
The navGraph
object is a graph data structure for Navigation Toolbox™ that aids search-based planners.
The navGraph
object enables you to create a graph and perform
computations on it. The navGraph
object supports functionalities that are
frequently used by graph search algorithms. You can easily implement Dijkstra, A*, or variants
using navGraph
.
In graph theory, states represent nodes and links represent edges. The states and links
are represented by their corresponding row index in the table. The navGraph
is a directed graph that currently supports unique names, with no self-loops in edges.
Creation
Syntax
Description
specifies additional parameters using the graph
= navGraph(___,Name=Value
)Name
and
Weight
name-value arguments in addition to the argument from the previous syntax.
creates a graph
= navGraph(stateTable
,linkTable
)navGraph
object with the specified state table and link table,
which contain the metadata for the graph. The stateTable
and
linkTable
inputs set the value of the States and
Links
properties, respectively.
specifies additional parameters using the graph
= navGraph(___,Name=Value
)LinkWeightFcn
name-value argument in addition to the arguments from the previous syntaxes.
Input Arguments
Properties
Object Functions
addstate | Add one or more states to graph |
addlink | Add links between one or more state pairs |
rmstate | Remove one or more states from graph |
rmlink | Remove links between one or more state pairs |
findlink | Find IDs of links |
findstate | Find IDs of states |
index2state | Find state vectors of state indices |
state2index | Find indices for queried state vectors |
successors | Find successive state indices and costs |
show | Plot graph representation |
copy | Create deep copy of navGraph object |
Examples
Extended Capabilities
Version History
Introduced in R2023a
See Also
Objects
Functions
findlink
|findstate
|index2state
|state2index
|successors
|show
|copy
|addstate
|addlink
|rmstate
|rmlink