Package groundTruthModule.datastructure

Examples of groundTruthModule.datastructure.PersonEntity


    }
  }

  private void generatePeople() {
    for (int i = 0; i < nPeople; i++) {
      db.addPerson(new PersonEntity(i));
    }
  }
View Full Code Here


   */
  public void associateOrganizations() {
    // create nPeople / 2 memberOf associations
    for (int i = 0; i < nPeople / 2; i++) {
      int rand1 = getRandom(0, nPeople - 1);
      PersonEntity person = db.getPeople().get(rand1);
      int rand2 = getRandom(0, nOrganizations - 1);
      OrganizationEntity organization = db.getOrganizations().get(rand2);
      while (organization.getMembers().contains(person)) {
        rand1 = getRandom(0, nPeople - 1);
        person = db.getPeople().get(rand1);
      }
      organization.addMember(person);
      person.addRelatedOrganization(organization);
    }
  }
View Full Code Here

TOP

Related Classes of groundTruthModule.datastructure.PersonEntity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.