| 214 | } |
| 215 | |
| 216 | void WireNetwork::filter_edges(const std::vector<bool>& to_keep) { |
| 217 | MatrixIr edges; |
| 218 | filter(m_edges, to_keep, edges); |
| 219 | m_edges = edges; |
| 220 | const auto& attr_names = m_attributes.get_attribute_names(); |
| 221 | for (const auto& name : attr_names) { |
| 222 | if (!is_vertex_attribute(name)) { |
| 223 | const MatrixFr& val = m_attributes.get_attribute(name); |
| 224 | MatrixFr filtered_val; |
| 225 | filter(val, to_keep, filtered_val); |
| 226 | m_attributes.set_attribute(*this, name, filtered_val); |
| 227 | } |
| 228 | } |
| 229 | m_connectivity.reset(); |
| 230 | } |
| 231 | |
| 232 | void WireNetwork::write_to_file(const std::string& filename) const { |
| 233 | WireWriter writer; |
no test coverage detected