diff --git a/cpp/switchchain_canonical_properties.cpp b/cpp/switchchain_canonical_properties.cpp index d58097b4b869d31eb64dcaee078f62557297f1d6..33a1de32cbbcc660a8680fda623dacff5318b629 100644 --- a/cpp/switchchain_canonical_properties.cpp +++ b/cpp/switchchain_canonical_properties.cpp @@ -78,7 +78,8 @@ int main(int argc, char* argv[]) { outfile << "2: avgTriangles\n"; outfile << "3: edges\n"; outfile << "4: dstn\n"; - outfile << "5: { HH A, HH L, average A, average L } where for each there is (average of) {lambda1 , lambda1 - lambda2, lambda1/lambda2}\n"; + //outfile << "5: { HH A, HH L, average A, average L } where for each there is (average of) {lambda1 , lambda1 - lambda2, lambda1/lambda2}\n"; + outfile << "5: empty\n"; outfile << "6: switching successrate after mixing\n"; outfile << "7: initial HH triangles\n"; outfile << "*)" << std::endl; @@ -127,10 +128,12 @@ int main(int argc, char* argv[]) { GraphSpectrum gs_start(g); GraphSpectrum gs(chain.g); - HHAspectrum = - getSpectralValues(gs_start.computeAdjacencySpectrum()); - HHLspectrum = - getSpectralValues(gs_start.computeLaplacianSpectrum()); + HHAspectrum.fill(0); + HHLspectrum.fill(0); + //HHAspectrum = + // getSpectralValues(gs_start.computeAdjacencySpectrum()); + //HHLspectrum = + // getSpectralValues(gs_start.computeLaplacianSpectrum()); long long trianglesTotal = 0; int movesDone = 0; @@ -141,12 +144,12 @@ int main(int argc, char* argv[]) { if (chain.doMove()) ++movesDone; trianglesTotal += chain.g.countTriangles(); - auto sA = getSpectralValues(gs.computeAdjacencySpectrum()); - auto sL = getSpectralValues(gs.computeLaplacianSpectrum()); - for (auto i = 0u; i < 3; ++i) { - avgAspectrum[i] += sA[i]; - avgLspectrum[i] += sL[i]; - } + //auto sA = getSpectralValues(gs.computeAdjacencySpectrum()); + //auto sL = getSpectralValues(gs.computeLaplacianSpectrum()); + //for (auto i = 0u; i < 3; ++i) { + // avgAspectrum[i] += sA[i]; + // avgLspectrum[i] += sL[i]; + //} } float avgTriangles = float(trianglesTotal) / float(measurements); float successrate = @@ -156,7 +159,7 @@ int main(int argc, char* argv[]) { for (auto &f : avgLspectrum) f /= float(measurements); - std::cout << "Measuring done." << std::flush; + std::cout << "Measuring done. " << std::flush; if (outputComma) outfile << ',' << '\n'; @@ -166,11 +169,12 @@ int main(int argc, char* argv[]) { outfile << ',' << avgTriangles; outfile << ',' << g.edgeCount(); outfile << ',' << getDSTN(ds); - outfile << ',' << '{' << HHAspectrum; - outfile << ',' << HHLspectrum; - outfile << ',' << avgAspectrum; - outfile << ',' << avgLspectrum; - outfile << '}'; + outfile << ",{}"; + //outfile << ',' << '{' << HHAspectrum; + //outfile << ',' << HHLspectrum; + //outfile << ',' << avgAspectrum; + //outfile << ',' << avgLspectrum; + //outfile << '}'; outfile << ',' << successrate; outfile << ',' << g.countTriangles(); outfile << '}' << std::flush;