672 |
|
} |
673 |
|
|
674 |
|
/** |
675 |
< |
* Returns the cached distance between a pair of cities |
675 |
> |
* Returns the cached distance between a pair of cities. |
676 |
|
*/ |
677 |
|
int distanceBetween(int i, int j) { |
678 |
|
return distances[i][j]; |
682 |
|
static final double PSCALE = (double) 0x80000000L; |
683 |
|
|
684 |
|
/** |
685 |
< |
* Return distance for points scaled in [0,1). This simplifies |
685 |
> |
* Returns distance for points scaled in [0,1). This simplifies |
686 |
|
* checking results. The expected optimal TSP for random |
687 |
|
* points is believed to be around 0.76 * sqrt(N). For papers |
688 |
|
* discussing this, see |