bpp-popgen  3.0.0
bpp::Group Class Reference

The Group class. More...

#include <Bpp/PopGen/DataSet/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)
 Add an Individual. More...
 
void addEmptyIndividual (const std::string &individual_id)
 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
 Get the position of an Individual. More...
 
const IndividualgetIndividualById (const std::string &individual_id) const
 Get a reference to an Individual. More...
 
const IndividualgetIndividualAtPosition (size_t individual_position) const
 Get a reference to an Individual by its position. More...
 
std::unique_ptr< IndividualremoveIndividualById (const std::string &individual_id)
 Remove an Individual from the Group. More...
 
std::unique_ptr< IndividualremoveIndividualAtPosition (size_t individual_position)
 Remove an Individual from the Group. More...
 
void deleteIndividualById (const std::string &individual_id)
 Delete an Individual from the Group. More...
 
void deleteIndividualAtPosition (size_t individual_position)
 Delete an Individual from the Group. More...
 
void clear ()
 Clear the Group. More...
 
void setIndividualSexAtPosition (size_t individual_position, const unsigned short sex)
 Set the sex of an Individual. More...
 
unsigned short getIndividualSexAtPosition (size_t individual_position) const
 Get the sex of an Individual. More...
 
void setIndividualDateAtPosition (size_t individual_position, const Date &date)
 Set the date of an Individual. More...
 
const DategetIndividualDateAtPosition (size_t individual_position) const
 Get the date of an Individual. More...
 
void setIndividualCoordAtPosition (size_t individual_position, const Point2D< double > &coord)
 Set the coordinates of an Individual. More...
 
const Point2D< double > & getIndividualCoordAtPosition (size_t individual_position) const
 Get the coordinates of an Individual. More...
 
void setIndividualLocalityAtPosition (size_t individual_position, const Locality< double > *locality)
 Set the locality of an Individual. More...
 
const Locality< double > & getIndividualLocalityAtPosition (size_t individual_position) const
 Get the locality of an Individual. More...
 
void addIndividualSequenceAtPosition (size_t individual_position, size_t sequence_position, const Sequence &sequence)
 Add a sequence to an Individual. More...
 
const SequencegetIndividualSequenceByName (size_t individual_position, const std::string &sequence_name) const
 Get a sequence of an Individual. More...
 
const SequencegetIndividualSequenceAtPosition (size_t individual_position, size_t sequence_position) const
 Get a sequence of an Individual. More...
 
void deleteIndividualSequenceByName (size_t individual_position, const std::string &sequence_name)
 Delete a sequence of an Individual. More...
 
void deleteIndividualSequenceAtPosition (size_t individual_position, size_t sequence_position)
 Delete a sequence of an Individual. More...
 
bool hasIndividualSequences (size_t individual_position) const
 Tell if the Individual has some sequences. More...
 
std::vector< std::string > getIndividualSequencesNames (size_t individual_position) const
 Get the sequences' names from an Individual. More...
 
size_t getIndividualSequencePosition (size_t individual_position, const std::string &sequence_name) const
 Get the position of a sequence in an Individual. More...
 
size_t getIndividualNumberOfSequences (size_t individual_position) const
 Get the number of sequences in an Individual. More...
 
void setIndividualSequences (size_t individual_position, const MapSequenceContainer &msc)
 Set all the sequences by copying an OrderedSequenceContainer. More...
 
void setIndividualGenotype (size_t individual_position, const MultilocusGenotype &genotype)
 Set the genotype of an Individual. More...
 
void initIndividualGenotype (size_t individual_position, size_t loci_number)
 Initialyze the genotype of an Individual. More...
 
void deleteIndividualGenotype (size_t individual_position)
 Delete the genotype of an Individual. More...
 
bool hasIndividualGenotype (size_t individual_position) const
 Tell if an Individual has a genotype. More...
 
void setIndividualMonolocusGenotype (size_t individual_position, size_t locus_position, const MonolocusGenotype &monogen)
 Set a MonolocusGenotype of an Individual. More...
 
void setIndividualMonolocusGenotypeByAlleleKey (size_t individual_position, size_t locus_position, const std::vector< size_t > &allele_keys)
 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)
 Set a MonolocusGenotype of an Individual. More...
 
const MonolocusGenotypegetIndividualMonolocusGenotype (size_t individual_position, size_t locus_position) const
 Get a MonolocusGenotype of an Individual. More...
 
bool hasSequenceData () const
 Tell if at least one individual has at least one sequence. More...
 
const AlphabetgetAlphabet () const
 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)

Add an empty Individual to the Group.

Exceptions
BadIdentifierExceptionif individual_id is already in use.

Definition at line 110 of file Group.cpp.

References getNumberOfIndividuals(), and individuals_.

◆ addIndividual()

void Group::addIndividual ( const Individual ind)

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.

References bpp::Individual::getId(), getIndividualPosition(), and individuals_.

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

◆ addIndividualSequenceAtPosition()

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

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 303 of file Group.cpp.

References bpp::AlphabetMismatchException::getAlphabets(), bpp::BadIdentifierException::getIdentifier(), getNumberOfIndividuals(), and individuals_.

◆ 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)

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.

References getNumberOfIndividuals(), and removeIndividualAtPosition().

◆ deleteIndividualById()

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

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.

References removeIndividualById().

◆ deleteIndividualGenotype()

void Group::deleteIndividualGenotype ( size_t  individual_position)

Delete the genotype of an Individual.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.

Definition at line 482 of file Group.cpp.

References getNumberOfIndividuals(), and individuals_.

◆ deleteIndividualSequenceAtPosition()

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

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 379 of file Group.cpp.

References getNumberOfIndividuals(), bpp::SequenceNotFoundException::getSequenceId(), and individuals_.

◆ deleteIndividualSequenceByName()

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

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 361 of file Group.cpp.

References getNumberOfIndividuals(), bpp::SequenceNotFoundException::getSequenceId(), and individuals_.

◆ getAlphabet()

const Alphabet * Group::getAlphabet ( ) const

Get the alphabet used for the sequences.

Definition at line 586 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 bpp::DataSet::addGroup(), and 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_.

Referenced by bpp::DataSet::getGroupName().

◆ 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 596 of file Group.cpp.

References count(), and 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 607 of file Group.cpp.

References count(), and individuals_.

◆ getIndividualAtPosition()

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

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.

References individuals_.

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

◆ getIndividualById()

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

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.

References getIndividualAtPosition(), and individuals_.

◆ getIndividualCoordAtPosition()

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

Get the coordinates of an Individual.

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

Definition at line 268 of file Group.cpp.

References getNumberOfIndividuals(), and individuals_.

◆ getIndividualDateAtPosition()

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

Get the date of an Individual.

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

Definition at line 247 of file Group.cpp.

References getNumberOfIndividuals(), and individuals_.

◆ getIndividualLocalityAtPosition()

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

Get the locality of an Individual.

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

Definition at line 289 of file Group.cpp.

References getNumberOfIndividuals(), and individuals_.

◆ getIndividualMonolocusGenotype()

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

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 558 of file Group.cpp.

References bpp::IndexOutOfBoundsException::getBadIndex(), bpp::IndexOutOfBoundsException::getBounds(), getNumberOfIndividuals(), and individuals_.

◆ getIndividualNumberOfSequences()

size_t Group::getIndividualNumberOfSequences ( size_t  individual_position) const

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 436 of file Group.cpp.

References getNumberOfIndividuals(), and individuals_.

◆ getIndividualPosition()

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

Get the position of an Individual.

Exceptions
IndividualNotFoundExceptionif individual_id is not found.

Definition at line 120 of file Group.cpp.

References getNumberOfIndividuals(), and individuals_.

Referenced by addIndividual(), and removeIndividualById().

◆ getIndividualSequenceAtPosition()

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

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 343 of file Group.cpp.

References getNumberOfIndividuals(), bpp::SequenceNotFoundException::getSequenceId(), and individuals_.

◆ getIndividualSequenceByName()

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

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 325 of file Group.cpp.

References getNumberOfIndividuals(), bpp::SequenceNotFoundException::getSequenceId(), and individuals_.

◆ getIndividualSequencePosition()

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

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 418 of file Group.cpp.

References getNumberOfIndividuals(), bpp::SequenceNotFoundException::getSequenceId(), and individuals_.

◆ getIndividualSequencesNames()

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

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 404 of file Group.cpp.

References getNumberOfIndividuals(), and individuals_.

◆ getIndividualSexAtPosition()

unsigned short Group::getIndividualSexAtPosition ( size_t  individual_position) const

Get the sex of an Individual.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.

Definition at line 233 of file Group.cpp.

References getNumberOfIndividuals(), and individuals_.

◆ 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 209 of file Group.cpp.

References getNumberOfIndividuals(), and individuals_.

◆ getNumberOfIndividuals()

◆ hasIndividualGenotype()

bool Group::hasIndividualGenotype ( size_t  individual_position) const

Tell if an Individual has a genotype.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.

Definition at line 489 of file Group.cpp.

References getNumberOfIndividuals(), and individuals_.

◆ hasIndividualSequences()

bool Group::hasIndividualSequences ( size_t  individual_position) const

Tell if the Individual has some sequences.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.

Definition at line 397 of file Group.cpp.

References getNumberOfIndividuals(), and individuals_.

Referenced by getAlphabet(), and hasSequenceData().

◆ hasSequenceData()

bool Group::hasSequenceData ( ) const

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

Definition at line 576 of file Group.cpp.

References getNumberOfIndividuals(), and hasIndividualSequences().

◆ initIndividualGenotype()

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

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 464 of file Group.cpp.

References bpp::BadIntegerException::getBadInteger(), getNumberOfIndividuals(), and individuals_.

◆ 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::unique_ptr< Individual > Group::removeIndividualAtPosition ( size_t  individual_position)

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.

References individuals_.

Referenced by deleteIndividualAtPosition().

◆ removeIndividualById()

std::unique_ptr< Individual > Group::removeIndividualById ( const std::string &  individual_id)

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.

References getIndividualPosition(), and individuals_.

Referenced by deleteIndividualById().

◆ 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 
)

Set the coordinates of an Individual.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.

Definition at line 261 of file Group.cpp.

References getNumberOfIndividuals(), and individuals_.

◆ setIndividualDateAtPosition()

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

Set the date of an Individual.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.

Definition at line 240 of file Group.cpp.

References getNumberOfIndividuals(), and individuals_.

◆ setIndividualGenotype()

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

Set the genotype of an Individual.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.

Definition at line 457 of file Group.cpp.

References getNumberOfIndividuals(), and individuals_.

◆ setIndividualLocalityAtPosition()

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

Set the locality of an Individual.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.

Definition at line 282 of file Group.cpp.

References getNumberOfIndividuals(), and individuals_.

◆ setIndividualMonolocusGenotype()

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

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 496 of file Group.cpp.

References bpp::IndexOutOfBoundsException::getBadIndex(), bpp::IndexOutOfBoundsException::getBounds(), getNumberOfIndividuals(), and individuals_.

◆ setIndividualMonolocusGenotypeByAlleleId()

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

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 536 of file Group.cpp.

References bpp::IndexOutOfBoundsException::getBadIndex(), bpp::IndexOutOfBoundsException::getBounds(), bpp::AlleleNotFoundException::getIdentifier(), getNumberOfIndividuals(), and individuals_.

◆ setIndividualMonolocusGenotypeByAlleleKey()

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

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 514 of file Group.cpp.

References bpp::IndexOutOfBoundsException::getBadIndex(), bpp::IndexOutOfBoundsException::getBounds(), getNumberOfIndividuals(), and individuals_.

◆ setIndividualSequences()

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

Set all the sequences by copying an OrderedSequenceContainer.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.

Definition at line 450 of file Group.cpp.

References getNumberOfIndividuals(), and individuals_.

◆ setIndividualSexAtPosition()

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

Set the sex of an Individual.

Exceptions
IndexOutOfBoundsExceptionif individual_position excedes the number of individuals.

Definition at line 226 of file Group.cpp.

References getNumberOfIndividuals(), and individuals_.

Member Data Documentation

◆ id_

size_t bpp::Group::id_
protected

Definition at line 73 of file Group.h.

Referenced by getGroupId(), and setGroupId().

◆ individuals_

◆ 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: