64 const std::string&
id,
68 const unsigned short sex) :
71 date_(new
Date(date)),
72 coord_(new
Point2D<double>(coord)),
112 for (
size_t i = 0; i < keys.size(); i++)
161 for (
size_t i = 0; i < keys.size(); i++)
209 else if (*
date_ != date)
223 throw (
NullPointerException(
"MultiSeqIndividual::getDate: no date associated to this individual."));
242 else if (*
coord_ != coord)
257 else if (this->
getX() != x || this->
getY() != y)
271 throw (
NullPointerException(
"MultiSeqIndividual::getCoord: no coord associated to this individual."));
288 throw (
NullPointerException(
"MultiSeqIndividual::setX: no coord associated to this individual."));
298 throw (
NullPointerException(
"MultiSeqIndividual::setY: no coord associated to this individual."));
308 throw (
NullPointerException(
"MultiSeqIndividual::getX: no coord associated to this individual."));
318 throw (
NullPointerException(
"MultiSeqIndividual::getY: no coord associated to this individual."));
336 throw (
NullPointerException(
"MultiSeqIndividual::getLocality: no locality associated to this individual."));
351 map<string, VectorSequenceContainer*>::const_iterator it;
356 string mes =
"MultiSeqIndividual::getSequence: sequence set not found (" +
id
385 map<string, VectorSequenceContainer*>::const_iterator it;
390 string mes =
"MultiSeqIndividual::getSequence: sequence set not found (" +
id
408 map<string, VectorSequenceContainer*>::const_iterator it;
413 string mes =
"MultiSeqIndividual::getSequence: sequence set not found (" +
id
432 map<string, VectorSequenceContainer*>::const_iterator it;
435 keys.push_back(it->first);
458 map<string, VectorSequenceContainer*>::const_iterator it;
463 string mes =
"MultiSeqIndividual::getSequence: sequence set not found (" +
id
std::vector< const Alphabet * > getAlphabets() const
The BadIdentifierException class.
const Locality< double > * getLocality() const
Get the locality of the MultiSeqIndividual.
double getY() const
Get the Y coordinate of the MultiSeqIndividual.
bool hasSequences() const
Tell if the MultiSeqIndividual has some sequences.
virtual ~MultiSeqIndividual()
Destroy an MultiSeqIndividual.
const MultilocusGenotype * getGenotype() const
Get the genotype.
const Point2D< double > * getCoord() const
Get the coordinates of the Induvidual.
void setLocality(const Locality< double > *locality)
Set the locality of the MultiSeqIndividual.
void setCoord(const Point2D< double > &coord)
Set the coodinates of the MultiSeqIndividual.
const Date * getDate() const
Get the date of the MultiSeqIndividual.
void setY(const double y)
Set the Y coordinate of th MultiSeqIndividual.
unsigned short getSex() const
Get the sex of the MultiSeqIndividual.
void setId(const std::string id)
Set the id of the MultiSeqIndividual.
MultiSeqIndividual()
Build a void new MultiSeqIndividual.
bool hasLocality() const
Tell if this MultiSeqIndividual has a locality.
void setDate(const Date &date)
Set the date of the MultiSeqIndividual.
const Sequence & getSequence(const std::string &id, const std::string &name) const
Get a named sequence from a named sequence set.
std::vector< std::string > getSequencesKeys() const
Get the sequence set ids.
std::string getId() const
Get the id of the MultiSeqIndividual.
void addSequence(const std::string &id, const Sequence &sequence)
Add a sequence in a named sequence set.
bool hasDate() const
Tell if this MultiSeqIndividual has a date.
Point2D< double > * coord_
const VectorSequenceContainer * getVectorSequenceContainer(const std::string &id) const
Get a pointer to the VectorSequenceContainer at a named locus.
bool hasCoord() const
Tell if this MultiSeqIndividual has coordinates.
std::map< std::string, VectorSequenceContainer * > sequences_
MultiSeqIndividual & operator=(const MultiSeqIndividual &ind)
The MultiSeqIndividual copy operator.
void addGenotype(const MultilocusGenotype &genotype)
Add a genotype.
double getX() const
Get the X coordinate of the MultiSeqIndividual.
void setSex(const unsigned short sex)
Set the sex of the MultiSeqIndividual.
void setX(const double x)
Set the X coordinate of the MultiSeqIndividual.
bool hasGenotype() const
Tell if the MultiSeqIndividual has a MultilocusGenotype.
MultilocusGenotype * genotype_
size_t getNumberOfSequences(const std::string &id) const
Get the number of sequences in a sequence set.
const Locality< double > * locality_
size_t getNumberOfSequenceSet() const
Count the number of sequece set.
The MultilocusGenotype class.
virtual const std::string & getName() const=0