Build a graph with operators
This section illustrates the use of C++ operators to simplify the building of graphs.
Several C++ operators are overloaded to simplify graph construction. For example, the following:
can be simplified to:
The expression a + b
is equivalent to
std::make_shared<op::Add>(a, b)
and the *
operator similarly
returns std::make_shared<op::Multiply>
to its arguments.