Skip to content

Commit

Permalink
Add percentage to output
Browse files Browse the repository at this point in the history
  • Loading branch information
tylern4 committed Aug 1, 2018
1 parent 15028f3 commit c37b40c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@ public void processRecBank(DataBank recBank, int gpid, Integer gq, double gpx, d


public void printResults() {
System.out.printf("%-7s %-7s %-7s %n", "pid", "#gen", "#rec");
System.out.printf("%-7s %-7s %-7s %-7s %n", "pid", "#gen", "#rec", "#percent");
for(int i = 0; i < pids.size(); i++) {
System.out.printf("%-7d %-7d %-7d %n", pids.get(i), genCounts.get(i), recCounts.get(i));
if(genCounts.get(i) >0) {
System.out.printf("%-7d %-7d %-7d %-2f %n", pids.get(i), genCounts.get(i), recCounts.get(i), 100.0*recCounts.get(i)/genCounts.get(i));
}
}
}

Expand Down

0 comments on commit c37b40c

Please sign in to comment.