|
A library for working with phylogenetic and population genetic data.
v0.32.0
|
|
Go to the documentation of this file. 1 #ifndef GENESIS_TREE_FORMATS_NEWICK_INPUT_ITERATOR_H_
2 #define GENESIS_TREE_FORMATS_NEWICK_INPUT_ITERATOR_H_
95 : input_stream_( nullptr )
104 : input_stream_( std::make_shared<utils::InputStream>( source ))
120 : input_stream_( std::make_shared<utils::InputStream>( source ))
121 , reader_( settings )
145 return input_stream_ == other.input_stream_;
150 return !( *
this == other );
156 explicit operator bool()
const
215 if( ! input_stream_ || ! *input_stream_ ) {
226 if( tree_.
empty() ) {
237 std::shared_ptr<utils::InputStream> input_stream_;
247 #endif // include guard
NewickReader & stop_after_semicolon(bool value)
Set whether reading a single tree stops after the semicolon that finishes a Newick tree.
Class for representing phylogenetic trees.
bool empty() const
Return whether the Tree is empty (i.e., has no nodes, edges and links).
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
Tree parse_single_tree(utils::InputStream &input_stream) const
Parse a single tree. Depending on stop_after_semicolon(), stop after the semicolon or continue until ...