tf::Graph
taskflow/core/graph.hpp
class friend class Node Node Node
class friend class FlowBuilder FlowBuilder FlowBuilder
class friend class Subflow Subflow Subflow
class friend class Taskflow Taskflow Taskflow
class friend class Executor Executor Executor
std::vector< Node * > std::vector<Node*> tf::Graph::_nodes _nodes
tf::Graph::Graph
()=default
Graph

constructs a graph object

tf::Graph::Graph
(const Graph &)=delete
Graph
const Graph &

disabled copy constructor

tf::Graph::Graph
(Graph &&)
Graph
Graph && other

constructs a graph using move semantics

tf::Graph::~Graph
()
~Graph

destructs the graph object

Graph & Graph& tf::Graph::operator= (const Graph &)=delete operator= const Graph &

disabled copy assignment operator

Graph & Graph & tf::Graph::operator= (Graph &&) operator= Graph && other

assigns a graph using move semantics

bool bool tf::Graph::empty () const empty

queries if the graph is empty

size_t size_t tf::Graph::size () const size

queries the number of nodes in the graph

void void tf::Graph::clear () clear

clears the graph

void void tf::Graph::_clear () _clear
void void tf::Graph::_clear_detached () _clear_detached
void void tf::Graph::_merge (Graph &&) _merge Graph && g
void void tf::Graph::_erase (Node *) _erase Node * node
typename ... ArgsT ArgsT
Node * Node* tf::Graph::_emplace_back (ArgsT &&...) _emplace_back ArgsT && ...
typename ... ArgsT ArgsT
Node * Node* tf::Graph::_emplace_back (ArgsT &&... args) _emplace_back ArgsT &&... args

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. A graph manages a set of nodes in a global object pool that animates and recycles node objects efficiently without going through repetitive and expensive memory allocations and deallocations. 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.

- tf::Graph
  _clear
- tf::Graph
  _clear_detached
- tf::Graph
  _emplace_back
- tf::Graph
  _emplace_back
- tf::Graph
  _erase
- tf::Graph
  _merge
- tf::Graph
  _nodes
- tf::Graph
  clear
- tf::Graph
  empty
- tf::Graph
  Executor
- tf::Graph
  FlowBuilder
- tf::Graph
  Graph
- tf::Graph
  Graph
- tf::Graph
  Graph
- tf::Graph
  Node
- tf::Graph
  operator=
- tf::Graph
  operator=
- tf::Graph
  size
- tf::Graph
  Subflow
- tf::Graph
  Taskflow
- tf::Graph
  ~Graph