Get a pointer to a subgraph if in bounds. WARNING: This is an experimental API and subject to change.
| 485 | /// Get a pointer to a subgraph if in bounds. |
| 486 | /// WARNING: This is an experimental API and subject to change. |
| 487 | Subgraph* subgraph(int subgraph_index) { |
| 488 | if (subgraph_index < 0 || |
| 489 | static_cast<size_t>(subgraph_index) >= subgraphs_size()) |
| 490 | return nullptr; |
| 491 | return &*subgraphs_[subgraph_index]; |
| 492 | } |
| 493 | |
| 494 | /// WARNING: Experimental interface, subject to change |
| 495 | Subgraph& primary_subgraph() { |
no outgoing calls