equal
deleted
inserted
replaced
114 nodes[i] = graph.addNode(); |
114 nodes[i] = graph.addNode(); |
115 } |
115 } |
116 std::vector<ListGraph::Edge> edges(edgeNum); |
116 std::vector<ListGraph::Edge> edges(edgeNum); |
117 for (int i = 0; i < edgeNum; ++i) { |
117 for (int i = 0; i < edgeNum; ++i) { |
118 edges[i] = |
118 edges[i] = |
119 graph.addEdge(nodes[urandom(nodeNum)], nodes[urandom(nodeNum)]); |
119 graph.addEdge(nodes[rnd[nodeNum]], nodes[rnd[nodeNum]]); |
120 } |
120 } |
121 for (int i = 0; i < nodeNum; ++i) { |
121 for (int i = 0; i < nodeNum; ++i) { |
122 check(inDeg[nodes[i]] == countInEdges(graph, nodes[i]), |
122 check(inDeg[nodes[i]] == countInEdges(graph, nodes[i]), |
123 "Wrong in degree map"); |
123 "Wrong in degree map"); |
124 } |
124 } |