| 118 | } |
| 119 | |
| 120 | void TilerEngine::update_attributes(WireNetwork& wire_network, size_t num_repetitions) { |
| 121 | std::vector<std::string> attr_names = m_unit_wire_network->get_attribute_names(); |
| 122 | for (auto itr : attr_names) { |
| 123 | const std::string& name = itr; |
| 124 | wire_network.add_attribute(name, |
| 125 | m_unit_wire_network->is_vertex_attribute(name), false); |
| 126 | |
| 127 | const MatrixFr& values = m_unit_wire_network->get_attribute(name); |
| 128 | const size_t rows = values.rows(); |
| 129 | const size_t cols = values.cols(); |
| 130 | MatrixFr tiled_values(rows * num_repetitions, cols); |
| 131 | |
| 132 | for (size_t i=0; i<num_repetitions; i++) { |
| 133 | tiled_values.block(i*rows, 0, rows, cols) = values; |
| 134 | } |
| 135 | |
| 136 | wire_network.set_attribute(name, tiled_values); |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | void TilerEngine::clean_up(WireNetwork& wire_network, Float tol) { |
| 141 | remove_duplicated_vertices(wire_network, tol); |
nothing calls this directly
no test coverage detected