7std::shared_ptr<Node>
operator>>(std::shared_ptr<Node> lhs, std::shared_ptr<Node> rhs)
9 auto chain = std::make_shared<ChainNode>(lhs, rhs);
14std::shared_ptr<Node>
operator+(std::shared_ptr<Node> lhs, std::shared_ptr<Node> rhs)
16 auto result = std::make_shared<BinaryOpNode>(lhs, rhs, [](
double a,
double b) {
return a + b; });
21std::shared_ptr<Node>
operator*(std::shared_ptr<Node> lhs, std::shared_ptr<Node> rhs)
23 auto result = std::make_shared<BinaryOpNode>(lhs, rhs, [](
double a,
double b) {
return a * b; });
28void operator*(std::shared_ptr<Node> node,
double value)
30 if (
auto gen = std::dynamic_pointer_cast<Generator::Generator>(node)) {
31 gen->set_amplitude(value);
33 std::cerr <<
"Error: Cannot multiply non-generator node by a scalar\n."
34 <<
"Either use one of the set_[params] methods, or use the appropriate node to create BinaryOpNode" << std::endl;
std::shared_ptr< Node > operator>>(std::shared_ptr< Node > lhs, std::shared_ptr< Node > rhs)
Connects two nodes in series (pipeline operator)
std::shared_ptr< Node > operator+(std::shared_ptr< Node > lhs, std::shared_ptr< Node > rhs)
Combines two nodes in parallel (addition operator)
std::shared_ptr< Node > operator*(std::shared_ptr< Node > lhs, std::shared_ptr< Node > rhs)
Multiplies the outputs of two nodes (multiplication operator)
Contains the node-based computational processing system components.