2 ms·
Interestingly enough, that isn’t true. The operations of row-shuffling and column-shuffling commute, so you can do them in either order. You can try it yoursel
by robinhouston 10y ago
Interestingly enough, that isn’t true. The operations of row-shuffling and column-shuffling commute, so you can do them in either order.
You can try it yourself, if you’ve cloned the repo. Here are the commands to reconstruct first by columns and then by rows:
git checkout double-shuffling
make images/double_shuffled/blue-hour-paris.png bin/compute_scores
mkdir tmp
bin/compute_scores --cols images/double_shuffled/blue-hour-paris.png > tmp/cols.tsp
bin/lkh.sh tmp/cols.tsp tmp/cols.tour
bin/reconstruct_image.py --cols tmp/cols.tour images/double_shuffled/blue-hour-paris.png > tmp/cols-unshuffled.png
bin/compute_scores --rows tmp/cols-unshuffled.png > tmp/rows.tsp
bin/lkh.sh tmp/rows.tsp tmp/rows.tour
bin/reconstruct_image.py --rows tmp/rows.tour tmp/cols-unshuffled.png > tmp/reverse-unshuffled.png