4 #include <unordered_map> 5 #include <unordered_set> 26 l->critical (
"port signature mismatch: \"{}\" != \"{}\"",
32 m_edges.push_back(std::make_pair(tail,head));
33 Edge edge = std::make_shared<Queue>();
57 std::unordered_map<Node*, int> nincoming;
60 nincoming[th.first] += 0;
61 nincoming[th.second] += 1;
64 std::vector<Node*> ret;
65 std::unordered_set<Node*>
seeds;
67 for (
auto it : nincoming) {
69 seeds.insert(it.first);
73 while (!seeds.empty()) {
74 Node*
t = *seeds.begin();
80 if (nincoming[
h] == 0) {
108 l->debug(
"executing with {} nodes",
nodes.size());
113 bool did_something =
false;
115 for (
auto nit =
nodes.rbegin(); nit !=
nodes.rend(); ++nit, ++count) {
121 did_something =
true;
127 if (!did_something) {
137 l->error(
"graph call: got nullptr node");
152 if (!
n->connected()) {
std::unordered_set< Node * > m_nodes
boost::error_info< struct tag_errmsg, std::string > errmsg
virtual std::string ident()=0
std::shared_ptr< Queue > Edge
const std::string & signature()
void add_node(Node *node)
bool call_node(Node *node)
std::vector< Node * > sort_kahn()
std::vector< std::pair< Node *, Node * > > m_edges
bool connect(Node *tail, Node *head, size_t tpind=0, size_t hpind=0)
std::string demangle(const std::string &name)
std::unordered_map< Node *, std::vector< Node * > > m_edges_backward
logptr_t logger(std::string name)
Thrown when a wrong value has been encountered.
std::vector< TrajPoint > seeds
#define SPDLOG_LOGGER_TRACE(logger,...)
int execute_upstream(Node *node)
std::unordered_map< Node *, std::vector< Node * > > m_edges_forward
def parent(G, child, parent_type)
h
training ###############################
PortList & output_ports()