Skip to content

Commit

Permalink
Rename lowerRow
Browse files Browse the repository at this point in the history
  • Loading branch information
larsbeck committed May 21, 2024
1 parent b2a1972 commit 31d822c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nextroute/decode/tsplib.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const (
inPickupAndDelivery = iota
)

const LOWER_ROW = "LOWER_ROW"
const lowerRow = "LOWER_ROW"

// Decode a tsplib instance from the given reader to the nextroute input format.
func (j TSPLIBDecoder) Decode(reader io.Reader, anyInput any) error {
Expand Down Expand Up @@ -135,8 +135,8 @@ scanLoop: // Label scanner loop to break out of nested switch statements
switch s[2] {
case "FULL_MATRIX":
edgeWeightFormat = "FULL_MATRIX"
case LOWER_ROW:
edgeWeightFormat = LOWER_ROW
case lowerRow:
edgeWeightFormat = lowerRow
default:
return fmt.Errorf("unsupported edge weight format: %s", s[2])
}
Expand Down Expand Up @@ -502,7 +502,7 @@ scanLoop: // Label scanner loop to break out of nested switch statements
if colIndex >= len(*matrix) {
colIndex = depotIndexInMatrix
}
if edgeWeightFormat == LOWER_ROW {
if edgeWeightFormat == lowerRow {
if colIndex > rowIndex {
colIndex, rowIndex = rowIndex, colIndex
}
Expand Down

0 comments on commit 31d822c

Please sign in to comment.