Skip to content

Commit

Permalink
Revert perentile definition
Browse files Browse the repository at this point in the history
Comment now applies as written. This should be checked before merging back to the main development branch.
  • Loading branch information
ansoncfit committed Nov 30, 2023
1 parent 1649e89 commit ff2d39d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/conveyal/r5/analyst/TravelTimeReducer.java
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ private static int findPercentileIndex(int nElements, double percentile) {
// Note that the commented-out definition is used in modern version of Conveyal Analysis, and the other version
// was removed by #563. However, we used the previous version for the Getting Charlie off the MTA paper, and this
// hacks it back in for comparability.
//return (int)(Math.ceil(percentile / 100 * nElements) - 1);
return (int) Math.round(percentile / 100 * nElements);
return (int)(Math.ceil(percentile / 100 * nElements) - 1);
// return (int) Math.round(percentile / 100 * nElements);
}

/**
Expand Down

0 comments on commit ff2d39d

Please sign in to comment.