A library for working with phylogenetic and population genetic data.
v0.27.0
convert.hpp File Reference
#include "genesis/utils/text/string.hpp"
#include <iostream>
#include <sstream>
#include <stdexcept>
#include <string>
#include <vector>

Go to the source code of this file.

Namespaces

 genesis
 Container namespace for all symbols of genesis in order to keep them separate when used as a library.
 
 genesis::utils
 

Functions

template<typename T >
convert_from_string (std::string const &str, bool trim=false)
 Generic conversion from string to any data type that is supported by std::stringsteam operator >>. More...
 
template<>
std::string convert_from_string< std::string > (std::string const &str, bool trim)
 Specialization of the generic conversion function for for std::string. More...
 
template<typename ForwardIterator >
std::vector< bool > convert_to_bool (ForwardIterator first, ForwardIterator last, size_t size=0)
 
bool convert_to_bool (std::string const &str)
 
template<typename ForwardIterator >
std::vector< double > convert_to_bool_double (ForwardIterator first, ForwardIterator last, size_t size=0)
 
double convert_to_bool_double (std::string const &str)
 
template<typename ForwardIterator >
std::vector< double > convert_to_double (ForwardIterator first, ForwardIterator last, size_t size=0)
 
double convert_to_double (std::string const &str)
 
template<typename ForwardIterator >
bool is_convertible_to_bool (ForwardIterator first, ForwardIterator last)
 
bool is_convertible_to_bool (std::string const &str)
 
template<typename ForwardIterator >
bool is_convertible_to_bool_double (ForwardIterator first, ForwardIterator last)
 
bool is_convertible_to_bool_double (std::string const &str)
 
template<typename ForwardIterator >
bool is_convertible_to_double (ForwardIterator first, ForwardIterator last)
 
bool is_convertible_to_double (std::string const &str)