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