shmulvad/fast-tsp

Include MIT license for reverse_tour

Closed this issue · 1 comments

As highlighted in estan/tsp#3 (comment), there is an issue with the reverse_tour code which is copied from https://github.com/estan/tsp:

fast-tsp/src/tsp.h

Lines 198 to 212 in 5f76216

// Copied reverse method from: https://github.com/estan/tsp/blob/master/tsp.cpp
void reverse_tour(uint_fast16_t n, Tour& tour, uint_fast16_t start, uint_fast16_t end, uint_fast16_t* position) {
uint_fast16_t num_swaps = (((start <= end ? end - start : (end + n) - start) + 1) / 2);
uint_fast16_t i = start;
uint_fast16_t j = end;
while (num_swaps--) {
std::swap(tour[i], tour[j]);
position[tour[i]] = i;
position[tour[j]] = j;
i = (i + 1) % n;
j = ((j + n) - 1) % n;
}
}

estan/tsp uses a MIT license, so the copyright and permission notice needs to be included somewhere.

Closed in 63554b3. Now referencing the appropriate licenses in LICENSE.