bpp-popgen  2.2.0
bpp::Group Class Reference

The Group class. More...

#include <Bpp/PopGen/Group.h>

+ Collaboration diagram for bpp::Group:

Public Member Functions

 Group (size_t group_id)
 Build a void new Group. More...
 
 Group (const Group &group)
 Copy constructor. More...
 
 Group (const Group &group, size_t group_id)
 A duplication constructor with new Group Id. More...
 
 ~Group ()
 Destroy an Group. More...
 
Groupoperator= (const Group &group)
 The assignation operator =. More...
 
void setGroupId (size_t group_id)
 Set the id of the Group. More...
 
const std::string & getGroupName () const
 Get the name of the Group. More...
 
void setGroupName (const std::string &group_name)
 Set the name of the Group. More...
 
size_t getGroupId () const
 Get the id of the Group. More...
 
void addIndividual (const Individual &ind) throw (BadIdentifierException)
 Add an Individual. More...
 
void addEmptyIndividual (const std::string &individual_id) throw (BadIdentifierException)
 Add an empty Individual to the Group. More...
 
size_t getNumberOfIndividuals () const
 Get the number of Individual in the Group. More...
 
size_t getMaxNumberOfSequences () const
 Get the maximum number of sequence. More...
 
size_t getIndividualPosition (const std::string &individual_id) const throw (IndividualNotFoundException)
 Get the position of an Individual. More...
 
const IndividualgetIndividualById (const std::string &individual_id) const throw (IndividualNotFoundException)
 Get a reference to an Individual. More...
 
const IndividualgetIndividualAtPosition (size_t individual_position) const throw (IndexOutOfBoundsException)
 Get a reference to an Individual by its position. More...
 
std::auto_ptr< IndividualremoveIndividualById (const std::string &individual_id) throw (IndividualNotFoundException)
 Remove an Individual from the Group. More...
 
std::auto_ptr< IndividualremoveIndividualAtPosition (size_t individual_position) throw (IndexOutOfBoundsException)
 Remove an Individual from the Group. More...
 
void deleteIndividualById (const std::string &individual_id) throw (IndividualNotFoundException)
 Delete an Individual from the Group. More...
 
void deleteIndividualAtPosition (size_t individual_position) throw (IndexOutOfBoundsException)
 Delete an Individual from the Group. More...
 
void clear ()
 Clear the Group. More...
 
void setIndividualSexAtPosition (size_t individual_position, const unsigned short sex) throw (IndexOutOfBoundsException)
 Set the sex of an Individual. More...
 
unsigned short getIndividualSexAtPosition (size_t individual_position) const throw (IndexOutOfBoundsException)
 Get the sex of an Individual. More...
 
void setIndividualDateAtPosition (size_t individual_position, const Date &date) throw (IndexOutOfBoundsException)
 Set the date of an Individual. More...
 
const DategetIndividualDateAtPosition (size_t individual_position) const throw (Exception)
 Get the date of an Individual. More...
 
void setIndividualCoordAtPosition (size_t individual_position, const Point2D< double > &coord) throw (IndexOutOfBoundsException)
 Set the coordinates of an Individual. More...
 
const Point2D< double > & getIndividualCoordAtPosition (size_t individual_position) const throw (Exception)
 Get the coordinates of an Individual. More...
 
void setIndividualLocalityAtPosition (size_t individual_position, const Locality< double > *locality) throw (IndexOutOfBoundsException)
 Set the locality of an Individual. More...
 
const Locality< double > & getIndividualLocalityAtPosition (size_t individual_position) const throw (Exception)
 Get the locality of an Individual. More...
 
void addIndividualSequenceAtPosition (size_t individual_position, size_t sequence_position, const Sequence &sequence) throw (Exception)
 Add a sequence to an Individual. More...
 
const Sequence & getIndividualSequenceByName (size_t individual_position, const std::string &sequence_name) const throw (Exception)
 Get a sequence of an Individual. More...
 
const Sequence & getIndividualSequenceAtPosition (size_t individual_position, size_t sequence_position) const throw (Exception)
 Get a sequence of an Individual. More...
 
void deleteIndividualSequenceByName (size_t individual_position, const std::string &sequence_name) throw (Exception)
 Delete a sequence of an Individual. More...
 
void deleteIndividualSequenceAtPosition (size_t individual_position, size_t sequence_position) throw (Exception)
 Delete a sequence of an Individual. More...
 
bool hasIndividualSequences (size_t individual_position) const throw (IndexOutOfBoundsException)
 Tell if the Individual has some sequences. More...
 
std::vector< std::string > getIndividualSequencesNames (size_t individual_position) const throw (Exception)
 Get the sequences' names from an Individual. More...
 
size_t getIndividualSequencePosition (size_t individual_position, const std::string &sequence_name) const throw (Exception)
 Get the position of a sequence in an Individual. More...
 
size_t getIndividualNumberOfSequences (size_t individual_position) const throw (Exception)
 Get the number of sequences in an Individual. More...
 
void setIndividualSequences (size_t individual_position, const MapSequenceContainer &msc) throw (IndexOutOfBoundsException)
 Set all the sequences by copying an OrderedSequenceContainer. More...
 
void setIndividualGenotype (size_t individual_position, const MultilocusGenotype &genotype) throw (IndexOutOfBoundsException)
 Set the genotype of an Individual. More...
 
void initIndividualGenotype (size_t individual_position, size_t loci_number) throw (Exception)
 Initialyze the genotype of an Individual. More...
 
void deleteIndividualGenotype (size_t individual_position) throw (IndexOutOfBoundsException)
 Delete the genotype of an Individual. More...
 
bool hasIndividualGenotype (size_t individual_position) const throw (IndexOutOfBoundsException)
 Tell if an Individual has a genotype. More...
 
void setIndividualMonolocusGenotype (size_t individual_position, size_t locus_position, const MonolocusGenotype &monogen) throw (Exception)
 Set a MonolocusGenotype of an Individual. More...
 
void setIndividualMonolocusGenotypeByAlleleKey (size_t individual_position, size_t locus_position, const std::vector< size_t > &allele_keys) throw (Exception)
 Set a MonolocusGenotype of an Individual. More...
 
void setIndividualMonolocusGenotypeByAlleleId (size_t individual_position, size_t locus_position, const std::vector< std::string > &allele_id, const LocusInfo &locus_info) throw (Exception)
 Set a MonolocusGenotype of an Individual. More...
 
const MonolocusGenotypegetIndividualMonolocusGenotype (size_t individual_position, size_t locus_position) const throw (Exception)
 Get a MonolocusGenotype of an Individual. More...
 
bool hasSequenceData () const
 Tell if at least one individual has at least one sequence. More...
 
const Alphabet * getAlphabet () const throw (NullPointerException)
 Get the alphabet used for the sequences. More...
 
size_t getGroupSizeForLocus (size_t locus_position) const
 Get the number of individual that have a data at the specified locus. More...
 
size_t getGroupSizeForSequence (size_t sequence_position) const
 Get the number of individual that have a sequence at the specified position. More...
 

Protected Attributes

size_t id_
 
std::string name_
 
std::vector< Individual * > individuals_
 

Detailed Description

The Group class.

A Group is an ensemble of Individuals with some statistics like the average allele number.

Author
Sylvain Gaillard

Definition at line 70 of file Group.h.

Constructor & Destructor Documentation

◆ Group() [1/3]

Group::Group ( size_t  group_id)

Build a void new Group.

Definition at line 47 of file Group.cpp.

◆ Group() [2/3]

Group::Group ( const Group group)

Copy constructor.

If you need to use a copy constructor in a DataSet context, use the one which specify a new Group Id.

Definition at line 51 of file Group.cpp.

References addIndividual(), getIndividualAtPosition(), and getNumberOfIndividuals().

◆ Group() [3/3]

Group::Group ( const Group group,
size_t  group_id 
)

A duplication constructor with new Group Id.

Definition at line 62 of file Group.cpp.

References addIndividual(), getIndividualAtPosition(), and getNumberOfIndividuals().

◆ ~Group()

Group::~Group ( )

Destroy an Group.

Definition at line 74 of file Group.cpp.

Member Function Documentation

◆ addEmptyIndividual()

void Group::addEmptyIndividual ( const std::string &  individual_id)
throw (BadIdentifierException
)

Add an empty Individual to the Group.

Exceptions
BadIdentifierExceptionif individual_id is already in use.

Definition at line 110 of file Group.cpp.

◆ addIndividual()

void Group::addIndividual ( const Individual ind)
throw (BadIdentifierException
)

Add an Individual.

Add an Individual to the group.

Parameters
indThe Individual to add to the Group.
Exceptions
BadIdentifierExceptionif individual's identifier is already in use.

Definition at line 98 of file Group.cpp.

Referenced by Group(), operator=(), and bpp::DataSet::splitGroup().

◆ addIndividualSequenceAtPosition()

void Group::addIndividualSequenceAtPosition ( size_t  individual_position,
size_t  sequence_position,
const Sequence &  sequence 
)
throw (Exception
)

Add a sequence to an Individual.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.
AlphabetMismatchExceptionif the sequence's alphabet doesn't match the container's alphabet.
BadIdentifierExceptionif the sequence's name is already in use.
BadIntegerExceptionif sequence_position is already in use.

Definition at line 304 of file Group.cpp.

References bpp::BadIdentifierException::getIdentifier().

◆ clear()

void Group::clear ( )

Clear the Group.

Delete all the Individuals of the group.

Definition at line 178 of file Group.cpp.

References individuals_.

◆ deleteIndividualAtPosition()

void Group::deleteIndividualAtPosition ( size_t  individual_position)
throw (IndexOutOfBoundsException
)

Delete an Individual from the Group.

Parameters
individual_positionThe position in the Group of the Individual to delete.

Free the memory by calling the destructor of the Individual.

Definition at line 166 of file Group.cpp.

◆ deleteIndividualById()

void Group::deleteIndividualById ( const std::string &  individual_id)
throw (IndividualNotFoundException
)

Delete an Individual from the Group.

Parameters
individual_idThe id of the Individual to delete.
Exceptions
IndividualNotFoundExceptionif individual_id is not found.

Search an Individual in the Group by cheking the id and delete it if it is foundi and free the memory by calling the destructor of the Individual.

Definition at line 154 of file Group.cpp.

◆ deleteIndividualGenotype()

void Group::deleteIndividualGenotype ( size_t  individual_position)
throw (IndexOutOfBoundsException
)

Delete the genotype of an Individual.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.

Definition at line 483 of file Group.cpp.

◆ deleteIndividualSequenceAtPosition()

void Group::deleteIndividualSequenceAtPosition ( size_t  individual_position,
size_t  sequence_position 
)
throw (Exception
)

Delete a sequence of an Individual.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.
NullPointerExceptionif there is no sequence container defined in the individual.
SequenceNotFoundExceptionif sequence_position is not found.

Definition at line 380 of file Group.cpp.

◆ deleteIndividualSequenceByName()

void Group::deleteIndividualSequenceByName ( size_t  individual_position,
const std::string &  sequence_name 
)
throw (Exception
)

Delete a sequence of an Individual.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.
NullPointerExceptionif there is no sequence container defined in the individual.
SequenceNotFoundExceptionif sequence_name is not found.

Definition at line 362 of file Group.cpp.

◆ getAlphabet()

const Alphabet * Group::getAlphabet ( ) const
throw (NullPointerException
)

Get the alphabet used for the sequences.

Definition at line 587 of file Group.cpp.

References getNumberOfIndividuals(), hasIndividualSequences(), and individuals_.

◆ getGroupId()

size_t bpp::Group::getGroupId ( ) const
inline

Get the id of the Group.

Returns
The id of the Group as an size_t.

Definition at line 134 of file Group.h.

References id_.

Referenced by operator=().

◆ getGroupName()

const std::string& bpp::Group::getGroupName ( ) const
inline

Get the name of the Group.

Returns
The name of the Group as a string.

Definition at line 120 of file Group.h.

References name_.

◆ getGroupSizeForLocus()

size_t Group::getGroupSizeForLocus ( size_t  locus_position) const

Get the number of individual that have a data at the specified locus.

Definition at line 597 of file Group.cpp.

References individuals_.

◆ getGroupSizeForSequence()

size_t Group::getGroupSizeForSequence ( size_t  sequence_position) const

Get the number of individual that have a sequence at the specified position.

Definition at line 608 of file Group.cpp.

References individuals_.

◆ getIndividualAtPosition()

const Individual & Group::getIndividualAtPosition ( size_t  individual_position) const
throw (IndexOutOfBoundsException
)

Get a reference to an Individual by its position.

Parameters
individual_positionThe position of the Individual in the group.
Returns
A pointer to the Individual.
Exceptions
IndividualNotFoundExceptionif individual_id is not found.

Definition at line 197 of file Group.cpp.

Referenced by Group(), and operator=().

◆ getIndividualById()

const Individual & Group::getIndividualById ( const std::string &  individual_id) const
throw (IndividualNotFoundException
)

Get a reference to an Individual.

Parameters
individual_idThe id of the Individual to find.
Returns
A pointer to the Individual or NULL if the Individual is not found.

Definition at line 187 of file Group.cpp.

◆ getIndividualCoordAtPosition()

const Point2D< double > & Group::getIndividualCoordAtPosition ( size_t  individual_position) const
throw (Exception
)

Get the coordinates of an Individual.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.
NullPointerExceptionif the individual has no coordinate.

Definition at line 269 of file Group.cpp.

◆ getIndividualDateAtPosition()

const Date & Group::getIndividualDateAtPosition ( size_t  individual_position) const
throw (Exception
)

Get the date of an Individual.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.
NullPointerExceptionif the Individual has no date.

Definition at line 248 of file Group.cpp.

◆ getIndividualLocalityAtPosition()

const Locality< double > & Group::getIndividualLocalityAtPosition ( size_t  individual_position) const
throw (Exception
)

Get the locality of an Individual.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.
NullPointerExceptionif the individual has no locality.

Definition at line 290 of file Group.cpp.

◆ getIndividualMonolocusGenotype()

const MonolocusGenotype & Group::getIndividualMonolocusGenotype ( size_t  individual_position,
size_t  locus_position 
) const
throw (Exception
)

Get a MonolocusGenotype of an Individual.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.
NullPointerExceptionif the individual has no genotype.
IndexOutOfBoundsExceptionif locus_position excedes the number of locus.

Definition at line 559 of file Group.cpp.

◆ getIndividualNumberOfSequences()

size_t Group::getIndividualNumberOfSequences ( size_t  individual_position) const
throw (Exception
)

Get the number of sequences in an Individual.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.
NullPointerExceptionif there is no sequence container defined in the individual.

Definition at line 437 of file Group.cpp.

◆ getIndividualPosition()

size_t Group::getIndividualPosition ( const std::string &  individual_id) const
throw (IndividualNotFoundException
)

Get the position of an Individual.

Exceptions
IndividualNotFoundExceptionif individual_id is not found.

Definition at line 120 of file Group.cpp.

◆ getIndividualSequenceAtPosition()

const Sequence & Group::getIndividualSequenceAtPosition ( size_t  individual_position,
size_t  sequence_position 
) const
throw (Exception
)

Get a sequence of an Individual.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.
NullPointerExceptionif there is no sequence container defined in the individual.
SequenceNotFoundExceptionif sequence_position is not found.

Definition at line 344 of file Group.cpp.

◆ getIndividualSequenceByName()

const Sequence & Group::getIndividualSequenceByName ( size_t  individual_position,
const std::string &  sequence_name 
) const
throw (Exception
)

Get a sequence of an Individual.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.
NullPointerExceptionif there is no sequence container defined in the individual.
SequenceNotFoundExceptionif sequence_name is not found.

Definition at line 326 of file Group.cpp.

◆ getIndividualSequencePosition()

size_t Group::getIndividualSequencePosition ( size_t  individual_position,
const std::string &  sequence_name 
) const
throw (Exception
)

Get the position of a sequence in an Individual.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.
NullPointerExceptionif there is no sequence container defined in the individual.
SequenceNotFoundExceptionif sequence_name is not found.

Definition at line 419 of file Group.cpp.

◆ getIndividualSequencesNames()

vector< string > Group::getIndividualSequencesNames ( size_t  individual_position) const
throw (Exception
)

Get the sequences' names from an Individual.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.
NullPointerExceptionif there is no sequence container defined in the individual.

Definition at line 405 of file Group.cpp.

◆ getIndividualSexAtPosition()

unsigned short Group::getIndividualSexAtPosition ( size_t  individual_position) const
throw (IndexOutOfBoundsException
)

Get the sex of an Individual.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.

Definition at line 234 of file Group.cpp.

◆ getMaxNumberOfSequences()

size_t Group::getMaxNumberOfSequences ( ) const

Get the maximum number of sequence.

Give the value of the highest sequence key. This value is usefull to discover the missing sequences data for each individual.

Definition at line 210 of file Group.cpp.

References getNumberOfIndividuals(), and individuals_.

◆ getNumberOfIndividuals()

size_t Group::getNumberOfIndividuals ( ) const

Get the number of Individual in the Group.

Returns
An integer as the number of Individual.

Definition at line 205 of file Group.cpp.

References individuals_.

Referenced by getAlphabet(), getMaxNumberOfSequences(), Group(), hasSequenceData(), and operator=().

◆ hasIndividualGenotype()

bool Group::hasIndividualGenotype ( size_t  individual_position) const
throw (IndexOutOfBoundsException
)

Tell if an Individual has a genotype.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.

Definition at line 490 of file Group.cpp.

◆ hasIndividualSequences()

bool Group::hasIndividualSequences ( size_t  individual_position) const
throw (IndexOutOfBoundsException
)

Tell if the Individual has some sequences.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.

Definition at line 398 of file Group.cpp.

Referenced by getAlphabet(), and hasSequenceData().

◆ hasSequenceData()

bool Group::hasSequenceData ( ) const

Tell if at least one individual has at least one sequence.

Definition at line 577 of file Group.cpp.

References getNumberOfIndividuals(), and hasIndividualSequences().

◆ initIndividualGenotype()

void Group::initIndividualGenotype ( size_t  individual_position,
size_t  loci_number 
)
throw (Exception
)

Initialyze the genotype of an Individual.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.
BadIntegerExceptionif loci_number < 1.
Exceptionif the individual already has a genotype.

Definition at line 465 of file Group.cpp.

◆ operator=()

Group & Group::operator= ( const Group group)

The assignation operator =.

Definition at line 78 of file Group.cpp.

References addIndividual(), getGroupId(), getIndividualAtPosition(), getNumberOfIndividuals(), and setGroupId().

◆ removeIndividualAtPosition()

std::auto_ptr< Individual > Group::removeIndividualAtPosition ( size_t  individual_position)
throw (IndexOutOfBoundsException
)

Remove an Individual from the Group.

Parameters
individual_positionThe position in the Group of the Individual to remove.
Returns
An std::auto_ptr to the removed Individual.

Remove the individual at the specified position and return a pointer to this Individual.

Definition at line 145 of file Group.cpp.

◆ removeIndividualById()

std::auto_ptr< Individual > Group::removeIndividualById ( const std::string &  individual_id)
throw (IndividualNotFoundException
)

Remove an Individual from the Group.

Parameters
individual_idThe id of the Individual to remove.
Returns
An std::auto_ptr to the removed Individual.
Exceptions
IndividualNotFoundExceptionif individual_id is not found.

Search an Individual in the Group by cheking the id and remove it if it is found then return a pointer to this Individual.

Definition at line 130 of file Group.cpp.

◆ setGroupId()

void Group::setGroupId ( size_t  group_id)

Set the id of the Group.

Parameters
group_idThe id of the Group as an size_t.

Definition at line 88 of file Group.cpp.

References id_.

Referenced by operator=().

◆ setGroupName()

void Group::setGroupName ( const std::string &  group_name)

Set the name of the Group.

Parameters
group_nameName of the Group as string.

Definition at line 93 of file Group.cpp.

References name_.

◆ setIndividualCoordAtPosition()

void Group::setIndividualCoordAtPosition ( size_t  individual_position,
const Point2D< double > &  coord 
)
throw (IndexOutOfBoundsException
)

Set the coordinates of an Individual.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.

Definition at line 262 of file Group.cpp.

◆ setIndividualDateAtPosition()

void Group::setIndividualDateAtPosition ( size_t  individual_position,
const Date date 
)
throw (IndexOutOfBoundsException
)

Set the date of an Individual.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.

Definition at line 241 of file Group.cpp.

◆ setIndividualGenotype()

void Group::setIndividualGenotype ( size_t  individual_position,
const MultilocusGenotype genotype 
)
throw (IndexOutOfBoundsException
)

Set the genotype of an Individual.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.

Definition at line 458 of file Group.cpp.

◆ setIndividualLocalityAtPosition()

void Group::setIndividualLocalityAtPosition ( size_t  individual_position,
const Locality< double > *  locality 
)
throw (IndexOutOfBoundsException
)

Set the locality of an Individual.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.

Definition at line 283 of file Group.cpp.

◆ setIndividualMonolocusGenotype()

void Group::setIndividualMonolocusGenotype ( size_t  individual_position,
size_t  locus_position,
const MonolocusGenotype monogen 
)
throw (Exception
)

Set a MonolocusGenotype of an Individual.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.
NullPointerExceptionif the individual has no genotype.
IndexOutOfBoundsExceptionif locus_position excedes the number of locus.

Definition at line 497 of file Group.cpp.

◆ setIndividualMonolocusGenotypeByAlleleId()

void Group::setIndividualMonolocusGenotypeByAlleleId ( size_t  individual_position,
size_t  locus_position,
const std::vector< std::string > &  allele_id,
const LocusInfo locus_info 
)
throw (Exception
)

Set a MonolocusGenotype of an Individual.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.
NullPointerExceptionif the individual has no genotype.
IndexOutOfBoundsExceptionif locus_position excedes the number of locus.
AlleleNotFoundExceptionif at least one id is not found in locus_info.

Definition at line 537 of file Group.cpp.

References bpp::AlleleNotFoundException::getIdentifier().

◆ setIndividualMonolocusGenotypeByAlleleKey()

void Group::setIndividualMonolocusGenotypeByAlleleKey ( size_t  individual_position,
size_t  locus_position,
const std::vector< size_t > &  allele_keys 
)
throw (Exception
)

Set a MonolocusGenotype of an Individual.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.
NullPointerExceptionif the individual has no genotype.
IndexOutOfBoundsExceptionif locus_position excedes the number of locus.
Exceptionif there is no key in allele_keys.

Definition at line 515 of file Group.cpp.

◆ setIndividualSequences()

void Group::setIndividualSequences ( size_t  individual_position,
const MapSequenceContainer &  msc 
)
throw (IndexOutOfBoundsException
)

Set all the sequences by copying an OrderedSequenceContainer.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.

Definition at line 451 of file Group.cpp.

◆ setIndividualSexAtPosition()

void Group::setIndividualSexAtPosition ( size_t  individual_position,
const unsigned short  sex 
)
throw (IndexOutOfBoundsException
)

Set the sex of an Individual.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.

Definition at line 227 of file Group.cpp.

Member Data Documentation

◆ id_

size_t bpp::Group::id_
protected

Definition at line 73 of file Group.h.

Referenced by getGroupId(), and setGroupId().

◆ individuals_

std::vector<Individual*> bpp::Group::individuals_
protected

◆ name_

std::string bpp::Group::name_
protected

Definition at line 74 of file Group.h.

Referenced by getGroupName(), and setGroupName().


The documentation for this class was generated from the following files: