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
19inline std::shared_ptr<simaai::neat::graph::Node> Pipeline(const simaai::neat::NodeGroup& group,
20 std::string label = {}) {
21 return std::make_shared<PipelineNode>(group, std::move(label));
22}
23
25inline std::shared_ptr<simaai::neat::graph::Node> Pipeline(simaai::neat::NodeGroup&& group,
26 std::string label = {}) {
27 return std::make_shared<PipelineNode>(std::move(group), std::move(label));
28}
29
31inline std::shared_ptr<simaai::neat::graph::Node> Pipeline(std::shared_ptr<simaai::neat::Node> node,
32 std::string label = {}) {
33 return std::make_shared<PipelineNode>(std::move(node), std::move(label));
34}
35
37inline std::shared_ptr<simaai::neat::graph::Node>
38Stage(std::string kind, StageNode::StageExecutorFactory factory, std::vector<PortDesc> inputs,
39 std::vector<PortDesc> outputs, std::string label = {}, StageNode::OutputSpecFn out_fn = {},
40 StageNodeOptions options = {}) {
41 return std::make_shared<StageNode>(std::move(kind), std::move(factory), std::move(inputs),
42 std::move(outputs), std::move(label), std::move(out_fn),
43 std::move(options));
44}
45
46} // namespace simaai::neat::graph::nodes

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.