From 1fcb7d0ffbc5b00ed20b5ded2e7f1001dc914d6e Mon Sep 17 00:00:00 2001 From: arolet Date: Fri, 14 Jul 2017 15:38:20 +0900 Subject: Removed some references to node_id_type node_id_type is really always int, it makes code hard to read though. In lemon they needed the typedef because they have more complicated graphs. --- ot/lp/EMD_wrapper.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ot/lp/EMD_wrapper.cpp b/ot/lp/EMD_wrapper.cpp index d97ba46..d719c6e 100644 --- a/ot/lp/EMD_wrapper.cpp +++ b/ot/lp/EMD_wrapper.cpp @@ -25,14 +25,14 @@ void EMD_wrap(int n1, int n2, double *X, double *Y, // Get the number of non zero coordinates for r and c n=0; - for (node_id_type i=0; i0) { n++; } } m=0; - for (node_id_type i=0; i0) { m++; @@ -49,10 +49,10 @@ void EMD_wrap(int n1, int n2, double *X, double *Y, // Set supply and demand, don't account for 0 values (faster) cur=0; - for (node_id_type i=0; i0) { - weights1[ di.nodeFromId(cur) ] = val; + weights1[ cur ] = val; indI[cur++]=i; } } @@ -60,10 +60,10 @@ void EMD_wrap(int n1, int n2, double *X, double *Y, // Demand is actually negative supply... cur=0; - for (node_id_type i=0; i0) { - weights2[ di.nodeFromId(cur) ] = -val; + weights2[ cur ] = -val; indJ[cur++]=i; } } @@ -72,8 +72,8 @@ void EMD_wrap(int n1, int n2, double *X, double *Y, net.supplyMap(&weights1[0], n, &weights2[0], m); // Set the cost of each edge - for (node_id_type i=0; i