MNA computational graph. More...
#include <mna_graph.h>
Public Member Functions | |
| MnaGraph () | |
| void | addNode (const MnaNode &node) |
| void | removeNode (const QString &nodeId) |
| MnaNode & | node (const QString &nodeId) |
| const MnaNode & | node (const QString &nodeId) const |
| QList< MnaNode > & | nodes () |
| const QList< MnaNode > & | nodes () const |
| bool | hasNode (const QString &nodeId) const |
| bool | connect (const QString &srcNodeId, const QString &srcPortName, const QString &dstNodeId, const QString &dstPortName) |
| bool | validate (QStringList *errors=nullptr) const |
| QStringList | topologicalSort () const |
| QStringList | upstreamNodes (const QString &nodeId) const |
| QStringList | downstreamNodes (const QString &nodeId) const |
| QStringList | dirtyNodes () const |
| QJsonObject | toJson () const |
| QCborMap | toCbor () const |
Static Public Member Functions | |
| static MnaGraph | fromJson (const QJsonObject &json) |
| static MnaGraph | fromCbor (const QCborMap &cbor) |
Public Attributes | |
| QList< MnaPort > | graphInputs |
| Named, typed entry points. | |
| QList< MnaPort > | graphOutputs |
| Named, typed exit points. | |
| MnaParamTree | paramTree |
| Hierarchical parameter store with formula-driven bindings. | |
MNA computational graph.
Directed acyclic graph of processing nodes forming a computational pipeline.
Definition at line 70 of file mna_graph.h.
| MnaGraph::MnaGraph | ( | ) |
Definition at line 57 of file mna_graph.cpp.
| void MnaGraph::addNode | ( | const MnaNode & | node | ) |
Definition at line 65 of file mna_graph.cpp.
| bool MnaGraph::connect | ( | const QString & | srcNodeId, |
| const QString & | srcPortName, | ||
| const QString & | dstNodeId, | ||
| const QString & | dstPortName ) |
Connect output port of srcNode to input port of dstNode. Sets the sourceNodeId and sourcePortName on the destination input port.
Definition at line 138 of file mna_graph.cpp.
| QStringList MnaGraph::dirtyNodes | ( | ) | const |
Definition at line 430 of file mna_graph.cpp.
| QStringList MnaGraph::downstreamNodes | ( | const QString & | nodeId | ) | const |
Definition at line 385 of file mna_graph.cpp.
|
static |
Definition at line 544 of file mna_graph.cpp.
|
static |
Definition at line 485 of file mna_graph.cpp.
| bool MnaGraph::hasNode | ( | const QString & | nodeId | ) | const |
Definition at line 124 of file mna_graph.cpp.
| MnaNode & MnaGraph::node | ( | const QString & | nodeId | ) |
Definition at line 84 of file mna_graph.cpp.
| const MnaNode & MnaGraph::node | ( | const QString & | nodeId | ) | const |
Definition at line 97 of file mna_graph.cpp.
| QList< MnaNode > & MnaGraph::nodes | ( | ) |
Definition at line 110 of file mna_graph.cpp.
| const QList< MnaNode > & MnaGraph::nodes | ( | ) | const |
Definition at line 117 of file mna_graph.cpp.
| void MnaGraph::removeNode | ( | const QString & | nodeId | ) |
Definition at line 72 of file mna_graph.cpp.
| QCborMap MnaGraph::toCbor | ( | ) | const |
Definition at line 513 of file mna_graph.cpp.
| QJsonObject MnaGraph::toJson | ( | ) | const |
Definition at line 445 of file mna_graph.cpp.
| QStringList MnaGraph::topologicalSort | ( | ) | const |
Definition at line 300 of file mna_graph.cpp.
| QStringList MnaGraph::upstreamNodes | ( | const QString & | nodeId | ) | const |
Definition at line 348 of file mna_graph.cpp.
| bool MnaGraph::validate | ( | QStringList * | errors = nullptr | ) | const |
Validate the graph: acyclicity, port connections, data-kind compatibility, op schema compliance, required attributes.
| errors | Optional list to receive error messages. |
Definition at line 175 of file mna_graph.cpp.
| QList<MnaPort> MNALIB::MnaGraph::graphInputs |
Named, typed entry points.
Definition at line 91 of file mna_graph.h.
| QList<MnaPort> MNALIB::MnaGraph::graphOutputs |
Named, typed exit points.
Definition at line 92 of file mna_graph.h.
| MnaParamTree MNALIB::MnaGraph::paramTree |
Hierarchical parameter store with formula-driven bindings.
Definition at line 98 of file mna_graph.h.