Commit ba957ad2 authored by thomas.forbriger's avatar thomas.forbriger
Browse files

croposp [WP]: confirmed Pairs

parent 1f5c547e
......@@ -93,15 +93,17 @@ int main(int iargc, char* argv[])
cout << TFXX_value(opt.npairs) << " "
<< TFXX_value(pairs.size()) << " "
<< TFXX_value(pairs.pairs()) << endl;
cout << endl << "unique combinations" << endl;
for (unsigned int k=0; k<(opt.npairs-1); ++k)
cout << endl << "unique combinations (in order)" << endl;
for (unsigned int k=1; k<opt.npairs; ++k)
{
for (unsigned int j=k+1; j<opt.npairs; ++j)
for (unsigned int j=0; j<k; ++j)
{
cout << TFXX_value(k) << " " << TFXX_value(j) << " "
<< TFXX_value(pairs(k,j)) << endl;
}
}
cout << endl << "all combinations" << endl;
for (unsigned int k=0; k<opt.npairs; ++k)
{
......@@ -110,7 +112,8 @@ int main(int iargc, char* argv[])
if (k!=j)
{
cout << TFXX_value(k) << " " << TFXX_value(j) << " "
<< TFXX_value(pairs(k,j));
<< TFXX_value(pairs(k,j)) << " "
<< TFXX_value(pairs(j,k));
if (pairs.swap(k,j))
{
cout << " swap";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment