| 43 | } |
| 44 | |
| 45 | VectorI WireConnectivity::get_vertex_neighbors(size_t i) const { |
| 46 | if (m_vertex_adjacencies.size() == 0) { |
| 47 | throw RuntimeError("Vertex adjacencies is not computed."); |
| 48 | } |
| 49 | |
| 50 | size_t begin = m_vertex_adjacency_index[i]; |
| 51 | size_t end = m_vertex_adjacency_index[i+1]; |
| 52 | return m_vertex_adjacencies.segment(begin, end-begin); |
| 53 | } |