Back to Taskflow

tf::Graph class

docs/classtf_1_1Graph.html

4.0.01.9 KB
Original Source

tf::Graph class

class to create a graph object

A graph is the ultimate storage for a task dependency graph and is the main gateway to interact with an executor. This class is mainly used for creating an opaque graph object in a custom class to interact with the executor through taskflow composition.

A graph object is move-only.

Constructors, destructors, conversion operators

Graph() defaultedconstructs the graph object~Graph()destroys the graph objectGraph(const Graph&) deleteddisabled copy constructorGraph(Graph&&)constructs a graph using move semantics

Public functions

auto operator=(const Graph&) -> Graph& deleteddisabled copy assignment operatorauto operator=(Graph&&) -> Graph&assigns a graph using move semanticsvoid clear()clears the graphauto size() const -> size_treturns the number of nodes in the graphauto empty() const -> boolqueries the emptiness of the graphauto begin() -> autoreturns an iterator to the first node of this graphauto end() -> autoreturns an iterator past the last element of this graphauto begin() const -> autoreturns an iterator to the first node of this graphauto end() const -> autoreturns an iterator past the last element of this graph