Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correct assigment of completeRank #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Muskworker
Copy link

Per discord message.

"Ensure that complete-tied ranks share the same rank" doesn't do what it says it's trying to do

Currently it goes through each one, compares A (data[i]) to the one before it B (data[i - 1]), then sets B's rank to A if they're the same
this does:
Compare a (# 1, rank 2) to b (# 0, rank 1), they're the same, b (# 0) gets a (# 1)'s rank of 2
Compare a (# 2, rank 3) to b (# 1, still rank 2), they're the same, b (# 1) gets a (# 2)'s rank of 3

the expected behavior appears to be "a.completeRank = b.completeRank" in line 63
that would do:
Compare a (# 1, rank 2) to b (# 0, rank 1), they're the same, a (# 1) should get b (# 1)'s rank of 1
Compare a (# 2, rank 3) to b (# 1, now rank 1), they're the same, a (# 2) gets b (# 1)'s rank of 1

Copy link

@malkakamally malkakamally left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants