in graphjet-core/src/main/java/com/twitter/graphjet/algorithms/counting/tweetfeature/TopSecondDegreeByCountTweetRecsGenerator.java [94:112]
private static boolean isSocialProofUnionSizeLessThanMin(
SmallArrayBasedLongToDoubleMap[] socialProofs,
int minUserSocialProofSize,
Set<byte[]> socialProofTypeUnions) {
long socialProofSizeSum = 0;
for (byte[] socialProofTypeUnion: socialProofTypeUnions) {
socialProofSizeSum = 0;
for (byte socialProofType: socialProofTypeUnion) {
if (socialProofs[socialProofType] != null) {
socialProofSizeSum += socialProofs[socialProofType].uniqueKeysSize();
if (socialProofSizeSum >= minUserSocialProofSize) {
return false;
}
}
}
}
return true;
}