39 #ifndef _POLYMORPHYSMMULTIGCONTAINER_H_
40 #define _POLYMORPHYSMMULTIGCONTAINER_H_
147 void setGroupId(
size_t position,
size_t group_id);
The MultilocusGenotype class.
The PolymorphismMultiGContainer class.
void clear()
Clear the container.
void addGroupName(size_t group_id, std::string name)
Inserts a name for the given group id.
void deleteMultilocusGenotype(size_t position)
Delete a MultilocusGenotype.
~PolymorphismMultiGContainer()
Destroy a PolymorphismMultilocusGenotypeContainer.
size_t getGroupId(size_t position) const
Get the Group id of a MultilocusGenotype.
PolymorphismMultiGContainer & operator=(const PolymorphismMultiGContainer &pmgc)
The assignation operator=.
PolymorphismMultiGContainer()
Build a new PolymorphismMultilocusGenotypeContainer.
const MultilocusGenotype * getMultilocusGenotype(size_t position) const
Get a MultilocusGenotype at a position.
bool groupExists(size_t group) const
Tell if a group exists.
void setGroupId(size_t position, size_t group_id)
Set the Group id of a MultilocusGenotype.
std::map< size_t, std::string > groups_names_
size_t getNumberOfLoci() const
Get the number of loci if the MultilocusGenotypes are aligned.
std::string getGroupName(size_t group_id) const
Get the group name for a given group id or just the id if not available juste return it's id.
std::vector< std::string > getAllGroupsNames() const
Get the groups names or ids if not available.
void addMultilocusGenotype(const MultilocusGenotype &mg, size_t group)
Add a MultilocusGenotype to the container.
std::vector< size_t > groups_
std::set< size_t > getAllGroupsIds() const
Get the groups' ids.
MultilocusGenotype * removeMultilocusGenotype(size_t position)
Remove a MultilocusGenotype.
bool isAligned() const
Tell if the MultilocusGenotypes are aligned (i.e. same size).
std::vector< MultilocusGenotype * > multilocusGenotypes_
size_t getLocusGroupSize(size_t group, size_t locus_position) const
Get the size of a group for a given locus.
size_t size() const
Get the number of MultilocusGenotype.
size_t getGroupSize(size_t group) const
Get group size.
void setGroupName(size_t group_id, std::string name)
Set the name for the given group id.
size_t getNumberOfGroups() const
Get the number of groups.