20namespace shamrock::solvergraph {
23 if (get_edges().condition.data) {
25 then_node->evaluate();
27 }
else if (else_node) {
28 else_node->evaluate();
36 ss <<
"subgraph cluster_" + std::to_string(
get_uuid()) +
" {\n";
40 ss << then_node->get_dot_graph_partial();
42 "n_{} -> {} [label=\"true\"];\n",
44 then_node->get_dot_graph_node_start());
45 ss << then_node->get_dot_graph_node_end() <<
" -> "
46 << sham::format(
"n_{}_end",
get_uuid()) <<
";\n";
49 "n_{} -> n_{}_end [label=\"true\", style=dashed];\n",
get_uuid(),
get_uuid());
53 ss << else_node->get_dot_graph_partial();
55 "n_{} -> {} [label=\"false\"];\n",
57 else_node->get_dot_graph_node_start());
58 ss << else_node->get_dot_graph_node_end() <<
" -> "
59 << sham::format(
"n_{}_end",
get_uuid()) <<
";\n";
62 "n_{} -> n_{}_end [label=\"false\", style=dashed];\n",
get_uuid(),
get_uuid());
65 ss << sham::format(
"n_{}_end [label=\"\", shape=point, width=0.15];\n",
get_uuid());
71 "e_{} -> n_{} [style=\"dashed\", color=green];\n", cond.get_uuid(),
get_uuid());
73 "e_{} [label=\"{}\",shape=rect, style=filled];\n", cond.get_uuid(), cond.get_label());
82 ss <<
"Then :\n" << then_node->get_tex_partial() <<
"\n";
85 ss <<
"Else :\n" << else_node->get_tex_partial() <<
"\n";
Meta node that evaluates an optional then-node when a bool edge is true, and an optional else-node wh...
u64 get_uuid() const
Get the UUID of the node.
const IEdge & get_ro_edge_base(int slot)
Get a reference to a read only edge.
std::string _impl_get_dot_graph_partial() const
get the dot graph of the node partial
std::string _impl_get_label() const
get the label of the node
void _impl_evaluate_internal()
evaluate the node
std::string _impl_get_tex() const
get the tex of the node