A base class to define the interface to an implicit graph of convex sets.
Implementations of this class must implement DoSuccesors() and provide some method of accessing at least one vertex in the graph.
#include <drake/geometry/optimization/implicit_graph_of_convex_sets.h>
Public Member Functions | |
virtual | ~ImplicitGraphOfConvexSets () |
std::vector< GraphOfConvexSets::Edge * > | Successors (GraphOfConvexSets::Vertex *v) |
Returns the outgoing edges from v , which defines the "successors" of v in the common notation of implicit graph search. More... | |
void | ExpandRecursively (GraphOfConvexSets::Vertex *v, int max_successor_calls=1000) |
Makes repeated recursive calls to Successors() until no new vertices will be added to the graph, or max_successor_calls has been reached. More... | |
const GraphOfConvexSets & | gcs () const |
Does not allow copy, move, or assignment | |
ImplicitGraphOfConvexSets (const ImplicitGraphOfConvexSets &)=delete | |
ImplicitGraphOfConvexSets & | operator= (const ImplicitGraphOfConvexSets &)=delete |
ImplicitGraphOfConvexSets (ImplicitGraphOfConvexSets &&)=delete | |
ImplicitGraphOfConvexSets & | operator= (ImplicitGraphOfConvexSets &&)=delete |
Protected Member Functions | |
ImplicitGraphOfConvexSets () | |
Constructs the (empty) implicit GCS. More... | |
GraphOfConvexSets & | mutable_gcs () |
virtual void | Expand (GraphOfConvexSets::Vertex *v)=0 |
Expands a vertex v by adding its outgoing edges (and the vertices that they point to) to the mutable_gcs(), calling mutable_gcs().AddVertex() and mutable_gcs().AddEdge() as needed. More... | |
|
delete |
|
delete |
|
virtual |
|
protected |
Constructs the (empty) implicit GCS.
|
protectedpure virtual |
Expands a vertex v
by adding its outgoing edges (and the vertices that they point to) to the mutable_gcs(), calling mutable_gcs().AddVertex() and mutable_gcs().AddEdge() as needed.
Due to a caching mechanism, implementations can assume that Expand(v) will only be called once for each v
.
void ExpandRecursively | ( | GraphOfConvexSets::Vertex * | v, |
int | max_successor_calls = 1000 |
||
) |
Makes repeated recursive calls to Successors() until no new vertices will be added to the graph, or max_successor_calls
has been reached.
Note: v
is mutable because exanding a vertex requires changes to the underlying vertex object.
std::exception | if v is not already registered with the graph. |
const GraphOfConvexSets& gcs | ( | ) | const |
|
protected |
|
delete |
|
delete |
std::vector<GraphOfConvexSets::Edge*> Successors | ( | GraphOfConvexSets::Vertex * | v | ) |
Returns the outgoing edges from v
, which defines the "successors" of v
in the common notation of implicit graph search.
The internal gcs() object is expanded as needed to include the edges (and the vertices they point to) that are returned.
Note: The input arguments are mutable because expanding a vertex requires changes to the underlying vertex object. Similarly, the output is mutable because callers will need to get mutable vertex pointers from the returned edges to expand them further.
std::exception | if v is not already registered with the graph. |