Skip to content

Commit

Permalink
Switch from int to long for dist pair counts.
Browse files Browse the repository at this point in the history
  • Loading branch information
datapoet committed Jan 5, 2015
1 parent a489a27 commit e3b08a5
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -124,11 +124,11 @@ public float validity() throws Exception {
Arrays.sort(interDists); //ascending sort
intraIndex = 0;
interIndex = 0;
int totalDists = numIntraDists + numInterDists;
int totalPairs = numIntraDists * numInterDists;
long totalDists = numIntraDists + numInterDists;
long totalPairs = numIntraDists * numInterDists;
// This is the sum of concordant and discordant pairs.
int Nc; // Num concordant pairs.
int Nd = 0; // Num discordant pairs.
long Nc; // Num concordant pairs.
long Nd = 0; // Num discordant pairs.
// We will only count the breaches.
do {
while (intraIndex < numIntraDists
Expand Down

0 comments on commit e3b08a5

Please sign in to comment.