unify interface for algorithms.lpsolve.hamiltonian() and
algorithms.tsp.hamiltonian()