| 665 | } |
| 666 | |
| 667 | py::object Graph::get_adj() { |
| 668 | if (this->dirty_adj) { |
| 669 | py::dict adj = py::dict(); |
| 670 | for (const auto& ego_edges : this->adj) { |
| 671 | node_t start_point = ego_edges.first; |
| 672 | py::dict ego_edges_dict = py::dict(); |
| 673 | for (const auto& edge_info : ego_edges.second) { |
| 674 | node_t end_point = edge_info.first; |
| 675 | const auto& edge_attr = edge_info.second; |
| 676 | ego_edges_dict[this->id_to_node[py::cast(end_point)]] = attr_to_dict(edge_attr); |
| 677 | } |
| 678 | adj[this->id_to_node[py::cast(start_point)]] = ego_edges_dict; |
| 679 | } |
| 680 | this->adj_cache = adj; |
| 681 | this->dirty_adj = false; |
| 682 | } |
| 683 | return this->adj_cache; |
| 684 | } |
| 685 | |
| 686 | py::object Graph::get_edges() { |
| 687 | py::list edges = py::list(); |
nothing calls this directly
no test coverage detected