MCPcopy Create free account
hub / github.com/easy-graph/Easy-Graph / get_nodes

Method get_nodes

cpp_easygraph/classes/graph.cpp:632–644  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

630}
631
632py::object Graph::get_nodes() {
633 if (this->dirty_nodes) {
634 py::dict nodes = py::dict();
635 for (const auto& node_info : node) {
636 node_t id = node_info.first;
637 const auto& node_attr = node_info.second;
638 nodes[this->id_to_node[py::cast(id)]] = attr_to_dict(node_attr);
639 }
640 this->nodes_cache = nodes;
641 this->dirty_nodes = false;
642 }
643 return this->nodes_cache;
644}
645
646py::object Graph::get_name() {
647 return this->graph.attr("get")("name", "");

Callers

nothing calls this directly

Calls 1

attr_to_dictFunction · 0.85

Tested by

no test coverage detected