Graph Class
The assembly stage — turns a list of Nodes into a runnable, deterministic pipeline. More...
Declaration
Included Headers
Public Member Typedefs Index
| using | TensorCallback = std::function< bool(const simaai::neat::Tensor &)> |
|
Callback signature used by source-mode pipelines (no input pushed; pipeline produces tensors continuously). More... | |
Enumerations Index
| enum class | CompositionEdgeKind { ... } |
| enum class | SinkRequirement : int { ... } |
Friends Index
| struct | simaai::neat::internal::ModelAccess |
Public Constructors Index
| Graph (const GraphOptions &opt={}) | |
|
Construct an empty Graph with the given options (or defaults). More... | |
| Graph (std::string name, const GraphOptions &opt={}) | |
|
Construct an empty Graph with a label used for diagnostics, save/load, and visualization. More... | |
| Graph (const Graph &)=delete | |
|
Non-copyable. More... | |
| Graph (Graph &&) noexcept | |
|
Move-constructible. More... | |
Public Destructor Index
| ~Graph () noexcept | |
Public Operators Index
| Graph & | operator= (const Graph &)=delete |
|
Non-copyable. More... | |
| Graph & | operator= (Graph &&) noexcept |
|
Move-assignable. More... | |
Public Member Functions Index
| Graph & | set_name (std::string name) |
|
Set the Graph label used for diagnostics, save/load, and visualization. More... | |
| const std::string & | name () const noexcept |
| std::vector< std::string > | inputs () const |
|
Return public logical input endpoint names declared by this Graph. More... | |
| std::vector< std::string > | outputs () const |
|
Return public logical output endpoint names declared by this Graph. More... | |
| Graph & | add (std::shared_ptr< Node > node) |
| Graph & | add (const Graph &fragment) |
| Graph & | add (Graph &&fragment) |
| Graph & | add (const Model &model) |
|
Append a model route as a linear graph fragment. More... | |
| Graph & | connect (std::string_view from_endpoint, std::string_view to_endpoint) |
|
Connect named endpoints or reusable fragments through the public Graph compiler. More... | |
| Graph & | connect (const Graph &from, const Graph &to) |
| Graph & | connect (const Graph &from, const Graph &to, const GraphLinkOptions &options) |
| Graph & | connect (std::shared_ptr< Node > from, std::shared_ptr< Node > to) |
| Graph & | connect (const Graph &from, std::shared_ptr< Node > to) |
| Graph & | connect (std::shared_ptr< Node > from, const Graph &to) |
| Graph & | connect (std::shared_ptr< Node > from, std::string_view from_output, const Graph &to, const GraphLinkOptions &options={}) |
|
Connect one named output pad of a Node to a Graph fragment. More... | |
| Graph & | connect (const Model &from, const Model &to) |
| Graph & | connect (const Model &from, const Graph &to) |
| Graph & | connect (const Graph &from, const Model &to) |
| Graph & | connect (const Model &from, std::shared_ptr< Node > to) |
| Graph & | connect (std::shared_ptr< Node > from, const Model &to) |
| Graph & | custom (std::string fragment) |
|
Splice a raw GStreamer launch fragment into the pipeline. More... | |
| Graph & | custom (std::string fragment, InputRole role) |
|
Variant that declares the fragment's role (e.g., source vs. sink). More... | |
| void | run () |
|
Run a source-mode pipeline (no inputs pushed; producer Nodes drive the flow). More... | |
| TensorList | run (const std::vector< cv::Mat > &inputs, const RunOptions &opt={}) |
|
One-shot synchronous push+pull from cv::Mat inputs. More... | |
| TensorList | run (const TensorList &inputs, const RunOptions &opt={}) |
| Sample | run (const Sample &inputs, const RunOptions &opt={}) |
|
One-shot synchronous push+pull from Sample inputs (carries per-buffer metadata). More... | |
| Run | build (const std::vector< cv::Mat > &inputs, const RunOptions &opt={}) |
|
Build a long-lived async Run handle, seeding caps from cv::Mat inputs. More... | |
| Run | build (const TensorList &inputs, const RunOptions &opt={}) |
| Run | build (const Sample &inputs, const RunOptions &opt={}) |
|
Build variant seeded with full Sample inputs (with per-buffer metadata). More... | |
| GraphReport | validate (const ValidateOptions &opt, const cv::Mat &input) const |
|
Validate the Graph against a real input sample without running the pipeline. More... | |
| RtspServerHandle | run_rtsp (const RtspServerOptions &opt) |
| GraphReport | validate (const ValidateOptions &opt={}) const |
| Graph & | add_output_tensor (const OutputTensorOptions &opt={}) |
|
Append a tensor-friendly output (auto-inserts convert/scale/caps + sink). More... | |
| std::string | describe (const GraphPrinter::Options &opt={}) const |
|
Returns a hierarchical, human-readable view of the Nodes added so far. More... | |
| std::string | describe_backend (bool insert_boundaries=false) const |
|
Returns the GStreamer launch string the Graph would emit at build(). More... | |
| void | set_guard (std::shared_ptr< void > guard) |
|
Attach an external lifetime guard (used by externally-managed runtimes). More... | |
| void | set_tensor_callback (TensorCallback cb) |
|
Set the per-tensor callback used by source-mode run(). More... | |
| void | save (const std::string &path) const |
|
Save the Graph's Node list, options, and topology to a JSON file at path. More... | |
| Run | build (const RunOptions &opt={}) |
|
Build a Graph as an asynchronous runner without seeding inputs. More... | |
| Run | build (std::initializer_list< std::nullptr_t >) |
|
Preserve the established build({}) default-options idiom. More... | |
| const std::string & | last_pipeline () const |
|
Returns the GStreamer launch string from the most recent build() call. More... | |