@@ -34,7 +34,7 @@ namespace osp {
3434 * @tparam Graph_to The type of the target graph. Must satisfy `is_constructable_cdag_vertex`.
3535 * @param from The source graph.
3636 * @param to The target graph.
37- */
37+ */
3838template <typename Graph_from, typename Graph_to>
3939void constructComputationalDag (const Graph_from &from, Graph_to &to) {
4040 static_assert (is_computational_dag_v<Graph_from>, " Graph_from must satisfy the computational_dag concept" );
@@ -46,21 +46,21 @@ void constructComputationalDag(const Graph_from &from, Graph_to &to) {
4646 for (const auto &v_idx : from.vertices ()) {
4747 if constexpr (has_typed_vertices_v<Graph_from> and has_typed_vertices_v<Graph_to>) {
4848 vertex_map.push_back (to.add_vertex (from.vertex_work_weight (v_idx), from.vertex_comm_weight (v_idx),
49- from.vertex_mem_weight (v_idx), from.vertex_type (v_idx)));
49+ from.vertex_mem_weight (v_idx), from.vertex_type (v_idx)));
5050 } else {
5151 vertex_map.push_back (to.add_vertex (from.vertex_work_weight (v_idx), from.vertex_comm_weight (v_idx),
52- from.vertex_mem_weight (v_idx)));
52+ from.vertex_mem_weight (v_idx)));
5353 }
5454 }
5555
5656 if constexpr (has_edge_weights_v<Graph_from> and has_edge_weights_v<Graph_to>) {
5757 for (const auto &e : edges (from)) {
58- to.add_edge (vertex_map. at ( source (e, from)) , vertex_map. at ( target (e, from)) , from.edge_comm_weight (e));
58+ to.add_edge (vertex_map[ source (e, from)] , vertex_map[ target (e, from)] , from.edge_comm_weight (e));
5959 }
6060 } else {
6161 for (const auto &v : from.vertices ()) {
6262 for (const auto &child : from.children (v)) {
63- to.add_edge (vertex_map. at (v) , vertex_map. at ( child) );
63+ to.add_edge (vertex_map[v] , vertex_map[ child] );
6464 }
6565 }
6666 }
0 commit comments