Skip to content

Commit 9b5c78c

Browse files
committed
Added upper limit to person degrees based on number of persons of the graph
1 parent cee42eb commit 9b5c78c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/ldbc/snb/datagen/generator/PersonGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ private Person generateUser() {
7070
person.countryId(countryId);
7171
person.cityId(Dictionaries.places.getRandomCity(randomFarm.get(RandomGeneratorFarm.Aspect.CITY), countryId));
7272
person.ipAddress(Dictionaries.ips.getRandomIPFromLocation(randomFarm.get(RandomGeneratorFarm.Aspect.IP), countryId));
73-
person.maxNumKnows(degreeDistribution_.nextDegree());
73+
person.maxNumKnows(Math.min(degreeDistribution_.nextDegree(),DatagenParams.numPersons));
7474
person.accountId(composeUserId(nextId++, creationDate));
7575
person.mainInterest(Dictionaries.tags.getaTagByCountry(randomFarm.get(RandomGeneratorFarm.Aspect.TAG_OTHER_COUNTRY), randomFarm.get(RandomGeneratorFarm.Aspect.TAG), person.countryId()));
7676
short numTags = ((short) randomTagPowerLaw.getValue(randomFarm.get(RandomGeneratorFarm.Aspect.NUM_TAG)));

0 commit comments

Comments
 (0)