Skip to main content

Adapters.h File

Convenience helpers to build graph nodes. More...

Included Headers

#include "graph/nodes/PipelineNode.h" #include "graph/nodes/StageNode.h" #include <memory> #include <string> #include <utility> #include <vector>

Namespaces Index

namespacesimaai
namespaceneat
namespacegraph
namespacenodes

Description

Convenience helpers to build graph nodes.

File Listing

The file content with the documentation metadata removed is:

1
6#pragma once
7
10
11#include <memory>
12#include <string>
13#include <utility>
14#include <vector>
15
17
18inline std::shared_ptr<simaai::neat::graph::Node> Pipeline(const simaai::neat::NodeGroup& group,
19 std::string label = {}) {
20 return std::make_shared<PipelineNode>(group, std::move(label));
21}
22
23inline std::shared_ptr<simaai::neat::graph::Node> Pipeline(simaai::neat::NodeGroup&& group,
24 std::string label = {}) {
25 return std::make_shared<PipelineNode>(std::move(group), std::move(label));
26}
27
28inline std::shared_ptr<simaai::neat::graph::Node> Pipeline(std::shared_ptr<simaai::neat::Node> node,
29 std::string label = {}) {
30 return std::make_shared<PipelineNode>(std::move(node), std::move(label));
31}
32
33inline std::shared_ptr<simaai::neat::graph::Node>
34Stage(std::string kind, StageNode::StageExecutorFactory factory, std::vector<PortDesc> inputs,
35 std::vector<PortDesc> outputs, std::string label = {}, StageNode::OutputSpecFn out_fn = {},
36 StageNodeOptions options = {}) {
37 return std::make_shared<StageNode>(std::move(kind), std::move(factory), std::move(inputs),
38 std::move(outputs), std::move(label), std::move(out_fn),
39 std::move(options));
40}
41
42} // namespace simaai::neat::graph::nodes

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.1.