39 for (
Edge& edge : edges) {
46 for (
const auto& vertex_and_neigh_and_count :
adj_list_) {
57 throw invalid_argument(
"vertex is not defined");
59 Index degree_count = 0;
63 for (
const pair<const Index, Index>& neighbor_and_count :
65 if (neighbor_and_count.first == vertex) {
66 degree_count += neighbor_and_count.second * 2;
68 degree_count += neighbor_and_count.second;
75 vector<Index> vertices;
76 for (
const auto& vertex_and_neigh_and_count :
adj_list_) {
78 if (degree_count == degree) {
79 vertices.push_back(vertex_and_neigh_and_count.first);
86 for (
const auto& vertex_and_neigh_and_count :
adj_list_) {
88 if (degree_count == degree) {
124 if (point1 != point2) {
135 assert(
adj_list_.count(vertex) == 0 &&
"Cannot add vertex already exists");
136 unordered_map<Index, Index> empty_temp;
141 vector<Index> vertices;
142 for (
const pair<
const Index, unordered_map<Index, Index>>&
143 vertex_and_neigh_and_count :
adj_list_) {
144 vertices.push_back(vertex_and_neigh_and_count.first);
150 vector<Index> neigh_verts;
152 for (
const pair<const Index, Index>& neigh_and_count :
154 neigh_verts.push_back(neigh_and_count.first);
161 vector<Edge> neigh_edges;
163 for (
const pair<const Index, Index>& neigh_and_count :
165 for (
Index count = 0;
166 count <
adj_list_.at(vertex).at(neigh_and_count.first); ++count) {
167 neigh_edges.push_back(
Edge(vertex, neigh_and_count.first));
175 unordered_map<Edge, Index> extra_edge_count;
176 for (
const auto& vertex_and_neigh_and_count :
adj_list_) {
177 for (
const pair<const Index, Index>& neigh_and_count :
178 vertex_and_neigh_and_count.second) {
179 extra_edge_count[
Edge(vertex_and_neigh_and_count.first,
180 neigh_and_count.first)] = neigh_and_count.second;
184 for (pair<const Edge, Index>& edge_count : extra_edge_count) {
185 for (
Index count = 0; count < edge_count.second; ++count) {
186 edges.push_back(edge_count.first);
193 auto edges = edgecontainer.
getEdges();
194 for (
auto edge : edges) {
base class for all analysis tools