Skip to main content

Node.h File

Hybrid graph node interface (backend + ports + output spec). More...

Included Headers

#include "graph/GraphTypes.h" #include <string> #include <vector>

Namespaces Index

namespacesimaai
namespaceneat
namespacegraph

Classes Index

classNode

Base class for hybrid graph nodes. More...

Description

Hybrid graph node interface (backend + ports + output spec).

File Listing

The file content with the documentation metadata removed is:

1
6#pragma once
7
8#include "graph/GraphTypes.h"
9
10#include <string>
11#include <vector>
12
13namespace simaai::neat::graph {
14
20class Node {
21public:
22 virtual ~Node() = default;
23
24 // Backend type (pipeline-backed vs stage-backed)
25 virtual Backend backend() const = 0;
26
27 // Deterministic type label
28 virtual std::string kind() const = 0;
29
30 // Optional user label
31 virtual std::string user_label() const {
32 return "";
33 }
34
35 // Declared input/output ports
36 virtual std::vector<PortDesc> input_ports() const = 0;
37 virtual std::vector<PortDesc> output_ports() const = 0;
38
39 // Output spec inference for compiler (may return unknown spec).
40 virtual OutputSpec output_spec(const std::vector<OutputSpec>& inputs, PortId out_port) const {
41 (void)inputs;
42 (void)out_port;
43 return OutputSpec{};
44 }
45};
46
47} // namespace simaai::neat::graph

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.1.