|
A library for working with phylogenetic and population genetic data.
v0.32.0
|
|
Go to the documentation of this file. 1 #ifndef GENESIS_UTILS_FORMATS_NEXUS_TAXA_H_
2 #define GENESIS_UTILS_FORMATS_NEXUS_TAXA_H_
51 bool operator == ( NexusTaxa
const& lhs, NexusTaxa
const& rhs );
52 bool operator != ( NexusTaxa
const& lhs, NexusTaxa
const& rhs );
91 swap( taxa_, other.taxa_ );
102 return lhs.taxa_ == rhs.taxa_;
107 return !(lhs == rhs);
118 return taxa_.empty();
139 return taxa_.cbegin();
158 void add_taxa( std::vector<std::string>
const& taxa )
165 taxa_.insert( taxa_.end(), taxa.begin(), taxa.end() );
166 std::sort( taxa_.begin(), taxa_.end() );
187 os <<
" dimensions ntax=" << taxa_.size() <<
";\n";
188 os <<
" taxlabels\n";
189 for(
auto& taxon : taxa_ ) {
190 os <<
" " << taxon <<
"\n";
217 #endif // include guard
Provides some valuable algorithms that are not part of the C++ 11 STL.
void add_taxon(std::string const &name)
container::const_iterator const_iterator
void swap(Color &lhs, Color &rhs)
bool has_taxon(std::string const &name) const
std::vector< std::string > container
void swap(NexusTaxa &lhs, NexusTaxa &rhs)
void to_stream(std::ostream &os) const override
friend bool operator!=(NexusTaxa const &lhs, NexusTaxa const &rhs)
void add_taxa(std::vector< std::string > const &taxa)
friend bool operator==(NexusTaxa const &lhs, NexusTaxa const &rhs)
bool operator!=(Color const &lhs, Color const &rhs)
void swap(NexusTaxa &other)
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
bool operator==(Color const &lhs, Color const &rhs)
const_iterator end() const
std::string block_name() const override
bool contains(const C &v, const T &x)
Returns whether a container object has a certain element.
std::vector< T >::iterator insert_sorted(std::vector< T > &vec, T const &item)
Insert into a vector vec, sorted by the value of the item. The vector must already be sorted.
virtual ~NexusTaxa() override=default
const_iterator begin() const
NexusTaxa & operator=(NexusTaxa const &)=default