Fragments.h File
Reusable public Graph fragments for named endpoint routing. More...
Included Headers
#include "nodes/common/Output.h"
#include "nodes/io/Input.h"
#include "pipeline/Graph.h"
#include <stdexcept>
#include <string>
#include <string_view>
#include <unordered_set>
#include <utility>
#include <vector>
Namespaces Index
| namespace | simaai |
| namespace | neat |
| namespace | graphs |
| namespace | detail |
Description
Reusable public Graph fragments for named endpoint routing.
These helpers intentionally return ordinary simaai::neat::Graph objects. They do not expose low-level runtime graph nodes, port handles, or node IDs. Users can inspect, compose, save, and build the returned fragments exactly like any other Graph.
File Listing
The file content with the documentation metadata removed is:
11#include "nodes/common/Output.h"
12#include "nodes/io/Input.h"
13#include "pipeline/Graph.h"
22namespace simaai::neat::graphs {
23namespace detail {
25inline void require_unique_endpoint_name(std::unordered_set<std::string>* used,
68 detail::require_unique_endpoint_name(&used, input, "graphs::Branch");
70 detail::require_unique_endpoint_name(&used, output, "graphs::Branch");
73 Graph g(input);
74 g.add(nodes::Input(input));
76 g.add(nodes::Output(output));
79 g.connect(input, output);
103 CombinePolicy policy = CombinePolicy::ByFrame) {
110 detail::require_unique_endpoint_name(&used, input, "graphs::Combine");
112 detail::require_unique_endpoint_name(&used, output, "graphs::Combine");
114 Graph g(output);
116 g.add(nodes::Input(input));
118 OutputOptions opt;
119 opt.combine_policy = policy;
120 g.add(nodes::Output(output, opt));
122 g.connect(input, output);
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.