Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
qishipengqsp committed Aug 22, 2024
1 parent 4974b79 commit 3eb591b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public List<CompanyInvestCompany> getCompanyInvestCompanies() {
return companyInvestCompanies;
}

public void scaleInvestmentRatios() {
public Company scaleInvestmentRatios() {
double sum = 0;
for (PersonInvestCompany pic : personInvestCompanies) {
sum += pic.getRatio();
Expand All @@ -101,6 +101,7 @@ public void scaleInvestmentRatios() {
for (CompanyInvestCompany cic : companyInvestCompanies) {
cic.scaleRatio(sum);
}
return this;
}

public boolean hasInvestedBy(Company company) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package ldbc.finbench.datagen.generation.events;

import java.io.Serializable;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import ldbc.finbench.datagen.entities.edges.CompanyInvestCompany;
import ldbc.finbench.datagen.entities.edges.PersonInvestCompany;
import ldbc.finbench.datagen.entities.nodes.Company;
import ldbc.finbench.datagen.entities.nodes.Person;
Expand Down Expand Up @@ -44,6 +42,7 @@ public void personInvestPartition(List<Person> investors, List<Company> targets)
}
PersonInvestCompany.createPersonInvestCompany(randomFarm, investor, target);
}
System.out.println("[personInvest]: person invest company " + numInvestors + " times");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ class ActivityGenerator()(implicit spark: SparkSession)
)
targets.map { target =>
target.scaleInvestmentRatios()
target
}
}
}
Expand Down

0 comments on commit 3eb591b

Please sign in to comment.