MCPcopy Create free account
hub / github.com/demoth/jake2 / SmallestNode1

Method SmallestNode1

client/src/main/java/jake2/client/SCR.java:1490–1510  ·  view source on GitHub ↗

SmallestNode1

(int numhnodes)

Source from the content-addressed store, hash-verified

1488 *
1489 */
1490 private static int SmallestNode1(int numhnodes) {
1491
1492 int best = 99999999;
1493 int bestnode = -1;
1494 for (int i = 0; i < numhnodes; i++) {
1495 if (cin.h_used[i] != 0)
1496 continue;
1497 if (cin.h_count[i] == 0)
1498 continue;
1499 if (cin.h_count[i] < best) {
1500 best = cin.h_count[i];
1501 bestnode = i;
1502 }
1503 }
1504
1505 if (bestnode == -1)
1506 return -1;
1507
1508 cin.h_used[bestnode] = 1; // true
1509 return bestnode;
1510 }
1511
1512
1513 /**

Callers 1

Huff1TableInitMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected