summaryrefslogtreecommitdiff
path: root/order.cpp
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2022-10-10 20:49:04 +0200
committerJaron Kent-Dobias <jaron@kent-dobias.com>2022-10-10 20:49:04 +0200
commit02bff5563d5a0150bde4ae3de9222a1837aefa98 (patch)
tree6f7cb72d5c33b919ee74ffc999d161c5b2a4825b /order.cpp
parent721260982551ec8ba51b9e7b9419031313aa0de0 (diff)
downloadcode-02bff5563d5a0150bde4ae3de9222a1837aefa98.tar.gz
code-02bff5563d5a0150bde4ae3de9222a1837aefa98.tar.bz2
code-02bff5563d5a0150bde4ae3de9222a1837aefa98.zip
Merged Graph and AztecDiamond classes.
Diffstat (limited to 'order.cpp')
-rw-r--r--order.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/order.cpp b/order.cpp
index 3f43377..44b5fa3 100644
--- a/order.cpp
+++ b/order.cpp
@@ -24,7 +24,7 @@ int main(int argc, char* argv[]) {
}
Rng r;
- Graph G(n, r);
+ AztecDiamond G(n, r);
#pragma omp declare reduction(vec_int_plus : std::vector<long int> : \
std::transform(omp_out.begin(), omp_out.end(), omp_in.begin(), omp_out.begin(), std::plus<long int>())) \
@@ -50,8 +50,8 @@ int main(int argc, char* argv[]) {
for (unsigned i = 0; i < m; i++) {
PerfectMatching pm(G.vertices.size(), G.edges.size());
- for (const Graph::Edge& e : G.edges) {
- pm.AddEdge(e.halfedges[0].getHead().index, e.halfedges[0].getTail().index, r.variate<double, std::exponential_distribution>(1));
+ for (const AztecDiamond::Edge& e : G.edges) {
+ pm.AddEdge(e.head->index, e.tail->index, r.variate<double, std::exponential_distribution>(1));
}
pm.options.verbose = false;