Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

Individual Class Reference

#include <Individual.h>

List of all members.

Public Member Functions

 Individual ()
 Individual (const std::string &id)
 Individual (const std::string &id, int rowIndex, int tableIndex)
 Individual (const std::string &id, const std::string &motherId, const std::string &fatherId, const std::string &gender)
 Individual (const std::string &id, const std::string &motherId, const std::string &fatherId, const std::string &gender, int rowIndex, int tableIndex)
void setOrdinaryFounder (bool value)
void setOriginalFounder (bool value)
void setExternalConnection (bool value)
void setIsUnconnected (bool value)
void setIsConsanguinous (bool value)
void setMother (Individual *mother)
void setFather (Individual *father)
void setAdoptedComplement (Individual *adoptedComplement)
void setDOB (Date *dob)
void setAffectionStatus (Affected *affected)
void setProbandStatus (Proband *proband)
void setDeceasedStatus (LivingDead *deceased)
void setVirtualIndividual (bool value)
void setMotherId (std::string motherId)
void setFatherId (std::string fatherId)
void setTwin (std::string marker, Twin::TWIN_TYPE type)
void setGender (std::string gender)
void setSampled (Sampled *sampled)
void setConsultandStatus (Consultand *consultand)
void setCarrierStatus (Carrier *carrier)
void setRelationshipEndedStatus (RelationshipEnded *relationshipEnded)
void setInfertilityStatus (Infertility *infertility)
void setSterilityStatus (Sterility *sterility)
void setBirthOrder (unsigned birthOrder)
void setLeftWidth (unsigned leftWidth)
void setRightWidth (unsigned rightWidth)
void setTotalWidth (unsigned totalWidth)
void setX (double x)
void setY (double y)
void setLeftSideOfLoop (unsigned loopNumber)
void setRightSideOfLoop (unsigned loopNumber)
void setLeftSideOfExternalConnection (unsigned connectionNumber)
void setRightSideOfExternalConnection (unsigned connectionNumber)
void setHasBeenDrawn ()
void setVisited (bool value)
void setLeftSpouseConnector (bool value)
String getId (void)
String getMotherId (void)
String getFatherId (void)
Gender getGender (void)
DategetDOB (void)
bool isOrdinaryFounder (void)
bool isOriginalFounder (void)
bool isVirtual (void)
bool hasExternalConnection (void)
bool hasBeenVisited (void)
bool hasBeenDrawn (void)
bool isConsanguinous (void)
bool isAffected (void)
bool isSampled (void)
bool isProband (void)
bool isConsultand (void)
bool isCarrier (void)
bool relationshipHasEnded (void)
bool isInfertile (void)
bool isSterile (void)
bool isDeceased (void)
RelationshipEnded::TYPE getRelationshipEndedType (void) const
Infertility::TYPE getInfertilityType (void) const
Sterility::TYPE getSterilityType (void) const
std::string getInfertilityLabel (void) const
std::string getSterilityLabel (void) const
unsigned getBirthOrder (void)
unsigned getRowIndex (void)
IndividualgetFather (void)
IndividualgetMother (void)
IndividualgetAdoptedComplement (void)
IndividualgetFirstSpouse (void)
Twin getTwinMarker (void)
unsigned getNumberOfSpouses (void)
unsigned getNumberOfChildren (void)
unsigned getNumberOfDescentTrees (void)
unsigned getNumberOfNuclearFamilies (void)
NuclearFamilygetNuclearFamily (unsigned index)
std::set< unsigned > getDescentTrees (void)
unsigned getLeftWidth (void)
unsigned getRightWidth (void)
unsigned getTotalWidth (void)
double getX (void)
double getY (void)
unsigned getLeftSideOfLoop (void)
unsigned getRightSideOfLoop (void)
unsigned getLeftSideOfExternalConnection (void)
unsigned getRightSideOfExternalConnection (void)
unsigned getLeftFlag (bool consanguinousLoop)
unsigned getRightFlag (bool consanguinousLoop)
bool getLeftSpouseConnector (void)
std::vector< std::string > getChildrenIds (Individual *spouse)
const std::set< Individual *,
compareIndividual > *const 
getSpouses (void) const
const std::set< Individual *,
compareIndividual > *const 
getChildren (void) const
void getChildrenWithSpouse (Individual *spouse, std::vector< Individual * > &children)
void getChildrenSortedByExternalConnections (Individual *spouse, std::vector< Individual * > &children)
void setPedigreeDataTable (const DataTable *pedigreeTable)
DatagetData (const std::string label)
void sortSpouses (bool externalFlag=false)
void addSpouse (Individual *spouse)
void addChild (Individual *child)
void addDescentTree (unsigned descentTreeId)
void addNuclearFamily (NuclearFamily *nuclearFamily)
void setChildrenIdsSortedByExternalConnections (std::string parentPair, std::vector< Individual * > children)
void displayChildren ()
void displaySpouses ()
void displayNuclearFamilies ()
void display ()
bool isIndividualIndicatingNoOffspring (void)
bool isIndividualIndicatingNonFertility (void)
bool isIndividualIndicatingTerminatedPregnancy (void)
bool isIndividualAdoptedIn (void)
bool isIndividualAdoptedOut (void)
bool isSpecial (void)
const DataTablegetDataTable (void) const
int getVisitCount ()
void resetVisitCount ()
void incrementVisitCount ()

Static Public Member Functions

static std::string getRandomId ()
static void groupIndividualsBasedOn (bool consanguinousLoop, const std::vector< Individual * > &individuals, std::deque< Individual * > &initial, std::deque< Individual * > &left, std::deque< Individual * > &right, bool unique=false)
static std::vector< Individual * > sortIndividualsBasedOnDataField (const std::string &name, const std::vector< Individual * > &individuals, bool dobSortOrder)
static void setSampledColumnPresent ()
static bool getSampledColumnPresent ()

Private Member Functions

void _init (void)
void _checkForSpecialIndividualTypes (void)
void _rearrangeMultipleSpouses (std::deque< Individual * > &initial, std::deque< Individual * > &left, std::deque< Individual * > &right, std::deque< Individual * > &result)

Private Attributes

String _id
String _motherId
String _fatherId
Gender _gender
Date_dob
Date_dod
Affected_affected
LivingDead_deceased
Proband_proband
Consultand_consultand
Carrier_carrier
RelationshipEnded_relationshipEnded
Sterility_sterility
Infertility_infertility
Twin _twinMarker
Sampled_sampled
Individual_father
Individual_mother
Individual_adoptedComplement
bool _isVirtual
bool _isUnconnected
bool _isConsanguinous
bool _hasExternalConnection
unsigned _birthOrder
bool _isOriginalFounder
bool _isOrdinaryFounder
unsigned _leftWidth
unsigned _rightWidth
unsigned _totalWidth
double _x
double _y
bool _hasBeenVisited
int _visitCount
bool _hasBeenDrawn
unsigned _leftSideOfLoop
unsigned _rightSideOfLoop
unsigned _leftSideOfExternalConnection
unsigned _rightSideOfExternalConnection
bool _leftSpouseConnector
std::set< Individual *, compareIndividual_spouses
std::set< Individual *, compareIndividual_children
std::map< std::string, std::vector<
Individual * > > 
_childrenIdsSortedByExternalConnections
std::set< unsigned > _descentTrees
std::vector< NuclearFamily * > _nuclearFamilies
int _rowIndex
int _tableIndex
const DataTable_pedigreeTable
bool _individualIndicatingNoOffspring
bool _individualIndicatingNonFertility
bool _individualIndicatingTerminatedPregnancy
bool _individualAdoptedOut
bool _individualAdoptedIn
bool _isSpecial

Static Private Attributes

static bool _sampledColumnPresent = false

Classes

struct  compareData
struct  compareIndividual


Constructor & Destructor Documentation

Individual::Individual  ) 
 

Individual::Individual const std::string &  id  ) 
 

Individual::Individual const std::string &  id,
int  rowIndex,
int  tableIndex
 

Individual::Individual const std::string &  id,
const std::string &  motherId,
const std::string &  fatherId,
const std::string &  gender
 

Individual::Individual const std::string &  id,
const std::string &  motherId,
const std::string &  fatherId,
const std::string &  gender,
int  rowIndex,
int  tableIndex
 


Member Function Documentation

void Individual::_checkForSpecialIndividualTypes void   )  [private]
 

void Individual::_init void   )  [inline, private]
 

void Individual::_rearrangeMultipleSpouses std::deque< Individual * > &  initial,
std::deque< Individual * > &  left,
std::deque< Individual * > &  right,
std::deque< Individual * > &  result
[private]
 

void Individual::addChild Individual child  )  [inline]
 

void Individual::addDescentTree unsigned  descentTreeId  )  [inline]
 

void Individual::addNuclearFamily NuclearFamily nuclearFamily  )  [inline]
 

void Individual::addSpouse Individual spouse  ) 
 

void Individual::display  ) 
 

void Individual::displayChildren  ) 
 

void Individual::displayNuclearFamilies  ) 
 

void Individual::displaySpouses  ) 
 

Individual* Individual::getAdoptedComplement void   )  [inline]
 

unsigned Individual::getBirthOrder void   )  [inline]
 

const std::set< Individual *, Individual::compareIndividual > *const Individual::getChildren void   )  const
 

std::vector< std::string > Individual::getChildrenIds Individual spouse  ) 
 

getChildrenIds: with a given spouse

void Individual::getChildrenSortedByExternalConnections Individual spouse,
std::vector< Individual * > &  children
 

void Individual::getChildrenWithSpouse Individual spouse,
std::vector< Individual * > &  children
 

Data* Individual::getData const std::string  label  )  [inline]
 

const DataTable* Individual::getDataTable void   )  const [inline]
 

std::set<unsigned> Individual::getDescentTrees void   )  [inline]
 

Date* Individual::getDOB void   )  [inline]
 

Individual* Individual::getFather void   )  [inline]
 

String Individual::getFatherId void   )  [inline]
 

Individual * Individual::getFirstSpouse void   ) 
 

getFirstSpouse: Used in cases with missing mother or father id in the input pedigree data table.

Gender Individual::getGender void   )  [inline]
 

String Individual::getId void   )  [inline]
 

std::string Individual::getInfertilityLabel void   )  const [inline]
 

Infertility::TYPE Individual::getInfertilityType void   )  const [inline]
 

unsigned Individual::getLeftFlag bool  consanguinousLoop  ) 
 

getLeftFlag: Get the consanguinity or external left flag

unsigned Individual::getLeftSideOfExternalConnection void   )  [inline]
 

unsigned Individual::getLeftSideOfLoop void   )  [inline]
 

bool Individual::getLeftSpouseConnector void   )  [inline]
 

unsigned Individual::getLeftWidth void   )  [inline]
 

Individual* Individual::getMother void   )  [inline]
 

String Individual::getMotherId void   )  [inline]
 

NuclearFamily * Individual::getNuclearFamily unsigned  index  ) 
 

unsigned Individual::getNumberOfChildren void   )  [inline]
 

unsigned Individual::getNumberOfDescentTrees void   )  [inline]
 

unsigned Individual::getNumberOfNuclearFamilies void   )  [inline]
 

unsigned Individual::getNumberOfSpouses void   )  [inline]
 

std::string Individual::getRandomId  )  [static]
 

getRandomId: Generates a random id for virtual Individuals.

RelationshipEnded::TYPE Individual::getRelationshipEndedType void   )  const [inline]
 

unsigned Individual::getRightFlag bool  consanguinousLoop  ) 
 

getRightFlag: Get the consanguinity or external right flag

unsigned Individual::getRightSideOfExternalConnection void   )  [inline]
 

unsigned Individual::getRightSideOfLoop void   )  [inline]
 

unsigned Individual::getRightWidth void   )  [inline]
 

unsigned Individual::getRowIndex void   )  [inline]
 

bool Individual::getSampledColumnPresent  )  [static]
 

const std::set< Individual *, Individual::compareIndividual > *const Individual::getSpouses void   )  const
 

std::string Individual::getSterilityLabel void   )  const [inline]
 

Sterility::TYPE Individual::getSterilityType void   )  const [inline]
 

unsigned Individual::getTotalWidth void   )  [inline]
 

Twin Individual::getTwinMarker void   )  [inline]
 

int Individual::getVisitCount  )  [inline]
 

double Individual::getX void   )  [inline]
 

double Individual::getY void   )  [inline]
 

void Individual::groupIndividualsBasedOn bool  consanguinousLoop,
const std::vector< Individual * > &  individuals,
std::deque< Individual * > &  initial,
std::deque< Individual * > &  left,
std::deque< Individual * > &  right,
bool  unique = false
[static]
 

groupIndividualsBasedOn: Splits individuals into three queues left, right and initial based on the consanguinous/external flags. Individuals with left flag set are pushed onto the left queue in increasing order of the left flags. Individuals with right flag set are pushed onto the right queue in descending order of the right flags.

bool Individual::hasBeenDrawn void   )  [inline]
 

bool Individual::hasBeenVisited void   )  [inline]
 

bool Individual::hasExternalConnection void   )  [inline]
 

void Individual::incrementVisitCount  )  [inline]
 

bool Individual::isAffected void   )  [inline]
 

bool Individual::isCarrier void   )  [inline]
 

bool Individual::isConsanguinous void   )  [inline]
 

bool Individual::isConsultand void   )  [inline]
 

bool Individual::isDeceased void   )  [inline]
 

bool Individual::isIndividualAdoptedIn void   )  [inline]
 

bool Individual::isIndividualAdoptedOut void   )  [inline]
 

bool Individual::isIndividualIndicatingNonFertility void   )  [inline]
 

bool Individual::isIndividualIndicatingNoOffspring void   )  [inline]
 

bool Individual::isIndividualIndicatingTerminatedPregnancy void   )  [inline]
 

bool Individual::isInfertile void   )  [inline]
 

bool Individual::isOrdinaryFounder void   )  [inline]
 

bool Individual::isOriginalFounder void   )  [inline]
 

bool Individual::isProband void   )  [inline]
 

bool Individual::isSampled void   )  [inline]
 

bool Individual::isSpecial void   )  [inline]
 

bool Individual::isSterile void   )  [inline]
 

bool Individual::isVirtual void   )  [inline]
 

bool Individual::relationshipHasEnded void   )  [inline]
 

void Individual::resetVisitCount  )  [inline]
 

void Individual::setAdoptedComplement Individual adoptedComplement  )  [inline]
 

void Individual::setAffectionStatus Affected affected  )  [inline]
 

void Individual::setBirthOrder unsigned  birthOrder  )  [inline]
 

void Individual::setCarrierStatus Carrier carrier  )  [inline]
 

void Individual::setChildrenIdsSortedByExternalConnections std::string  parentPair,
std::vector< Individual * >  children
 

void Individual::setConsultandStatus Consultand consultand  )  [inline]
 

void Individual::setDeceasedStatus LivingDead deceased  )  [inline]
 

void Individual::setDOB Date dob  )  [inline]
 

void Individual::setExternalConnection bool  value  )  [inline]
 

void Individual::setFather Individual father  )  [inline]
 

void Individual::setFatherId std::string  fatherId  )  [inline]
 

void Individual::setGender std::string  gender  )  [inline]
 

void Individual::setHasBeenDrawn  )  [inline]
 

void Individual::setInfertilityStatus Infertility infertility  )  [inline]
 

void Individual::setIsConsanguinous bool  value  )  [inline]
 

void Individual::setIsUnconnected bool  value  )  [inline]
 

void Individual::setLeftSideOfExternalConnection unsigned  connectionNumber  )  [inline]
 

void Individual::setLeftSideOfLoop unsigned  loopNumber  )  [inline]
 

void Individual::setLeftSpouseConnector bool  value  )  [inline]
 

void Individual::setLeftWidth unsigned  leftWidth  )  [inline]
 

void Individual::setMother Individual mother  )  [inline]
 

void Individual::setMotherId std::string  motherId  )  [inline]
 

void Individual::setOrdinaryFounder bool  value  )  [inline]
 

void Individual::setOriginalFounder bool  value  )  [inline]
 

void Individual::setPedigreeDataTable const DataTable pedigreeTable  )  [inline]
 

void Individual::setProbandStatus Proband proband  )  [inline]
 

void Individual::setRelationshipEndedStatus RelationshipEnded relationshipEnded  )  [inline]
 

void Individual::setRightSideOfExternalConnection unsigned  connectionNumber  )  [inline]
 

void Individual::setRightSideOfLoop unsigned  loopNumber  )  [inline]
 

void Individual::setRightWidth unsigned  rightWidth  )  [inline]
 

void Individual::setSampled Sampled sampled  )  [inline]
 

void Individual::setSampledColumnPresent  )  [static]
 

void Individual::setSterilityStatus Sterility sterility  )  [inline]
 

void Individual::setTotalWidth unsigned  totalWidth  )  [inline]
 

void Individual::setTwin std::string  marker,
Twin::TWIN_TYPE  type
[inline]
 

void Individual::setVirtualIndividual bool  value  )  [inline]
 

void Individual::setVisited bool  value  )  [inline]
 

void Individual::setX double  x  )  [inline]
 

void Individual::setY double  y  )  [inline]
 

std::vector< Individual * > Individual::sortIndividualsBasedOnDataField const std::string &  name,
const std::vector< Individual * > &  individuals,
bool  dobSortOrder
[static]
 

void Individual::sortSpouses bool  externalFlag = false  ) 
 

sortSpouses: If the descent tree has consanguinity/external connections find the optimal ordering of the spouses.


Member Data Documentation

Individual* Individual::_adoptedComplement [private]
 

Affected* Individual::_affected [private]
 

unsigned Individual::_birthOrder [private]
 

Carrier* Individual::_carrier [private]
 

std::set<Individual *,compareIndividual> Individual::_children [private]
 

std::map<std::string, std::vector<Individual*> > Individual::_childrenIdsSortedByExternalConnections [private]
 

Consultand* Individual::_consultand [private]
 

LivingDead* Individual::_deceased [private]
 

std::set<unsigned> Individual::_descentTrees [private]
 

Date* Individual::_dob [private]
 

Date* Individual::_dod [private]
 

Individual* Individual::_father [private]
 

String Individual::_fatherId [private]
 

Gender Individual::_gender [private]
 

bool Individual::_hasBeenDrawn [private]
 

bool Individual::_hasBeenVisited [private]
 

bool Individual::_hasExternalConnection [private]
 

String Individual::_id [private]
 

bool Individual::_individualAdoptedIn [private]
 

bool Individual::_individualAdoptedOut [private]
 

bool Individual::_individualIndicatingNonFertility [private]
 

bool Individual::_individualIndicatingNoOffspring [private]
 

bool Individual::_individualIndicatingTerminatedPregnancy [private]
 

Infertility* Individual::_infertility [private]
 

bool Individual::_isConsanguinous [private]
 

bool Individual::_isOrdinaryFounder [private]
 

bool Individual::_isOriginalFounder [private]
 

bool Individual::_isSpecial [private]
 

bool Individual::_isUnconnected [private]
 

bool Individual::_isVirtual [private]
 

unsigned Individual::_leftSideOfExternalConnection [private]
 

unsigned Individual::_leftSideOfLoop [private]
 

bool Individual::_leftSpouseConnector [private]
 

unsigned Individual::_leftWidth [private]
 

Individual* Individual::_mother [private]
 

String Individual::_motherId [private]
 

std::vector<NuclearFamily*> Individual::_nuclearFamilies [private]
 

const DataTable* Individual::_pedigreeTable [private]
 

Proband* Individual::_proband [private]
 

RelationshipEnded* Individual::_relationshipEnded [private]
 

unsigned Individual::_rightSideOfExternalConnection [private]
 

unsigned Individual::_rightSideOfLoop [private]
 

unsigned Individual::_rightWidth [private]
 

int Individual::_rowIndex [private]
 

Sampled* Individual::_sampled [private]
 

bool Individual::_sampledColumnPresent = false [static, private]
 

std::set<Individual *,compareIndividual> Individual::_spouses [private]
 

Sterility* Individual::_sterility [private]
 

int Individual::_tableIndex [private]
 

unsigned Individual::_totalWidth [private]
 

Twin Individual::_twinMarker [private]
 

int Individual::_visitCount [private]
 

double Individual::_x [private]
 

double Individual::_y [private]
 


The documentation for this class was generated from the following files:
Generated on Fri Nov 18 16:24:39 2011 for MADELINE by  doxygen 1.4.4