Bifrost
Public Member Functions
BackwardCDBG< Unitig_data_t, Graph_data_t, is_const > Class Template Reference

Wrapper for class neighborIterator to iterate over the predecessors of a reference unitig used in a UnitigMap object. More...

Public Member Functions

 BackwardCDBG (const UnitigMap< U, G, is_const > &um_)
 Constructor. More...
 
bool hasPredecessors () const
 Check if the unitig has at least one predecessor. More...
 
neighborIterator< U, G, is_const > begin () const
 Return an iterator over the predecessors of a reference unitig. More...
 
neighborIterator< U, G, is_const > end () const
 Return an iterator over the past-the-last predecessor of a reference unitig. More...
 

Detailed Description

template<typename Unitig_data_t = void, typename Graph_data_t = void, bool is_const = false>
class BackwardCDBG< Unitig_data_t, Graph_data_t, is_const >

Wrapper for class neighborIterator to iterate over the predecessors of a reference unitig used in a UnitigMap object.

A BackwardCDBG object has 3 template parameters: the type of data associated with the unitigs of the graph, the type of data associated with the graph and a boolean indicating if this is a constant neighborIterator or not. Note that you are supposed to obtain an instance of this class from UnitigMap::getPredecessors() so you shouldn't have to instantiate an object BackwardCDBG and its template parameters yourself. The unitig data and graph data types should be the same as the ones used for the CompactedDBG the iterator is from. No specific order (such as a lexicographic one) is assumed during iteration.

Constructor & Destructor Documentation

◆ BackwardCDBG()

template<typename Unitig_data_t = void, typename Graph_data_t = void, bool is_const = false>
BackwardCDBG< Unitig_data_t, Graph_data_t, is_const >::BackwardCDBG ( const UnitigMap< U, G, is_const > &  um_)
explicit

Constructor.

Parameters
um_is a UnitigMap object: the wrapper will provide an iterator over the predecessors of the UnitigMap reference unitig

Member Function Documentation

◆ begin()

template<typename Unitig_data_t = void, typename Graph_data_t = void, bool is_const = false>
neighborIterator<U, G, is_const> BackwardCDBG< Unitig_data_t, Graph_data_t, is_const >::begin ( ) const

Return an iterator over the predecessors of a reference unitig.

The returned iterator is initialized over the first such predecessor, if there is one.

Returns
an iterator over the predecessors of a reference unitig. It is initialized over the first such predecessor, if there is one.

◆ end()

template<typename Unitig_data_t = void, typename Graph_data_t = void, bool is_const = false>
neighborIterator<U, G, is_const> BackwardCDBG< Unitig_data_t, Graph_data_t, is_const >::end ( ) const

Return an iterator over the past-the-last predecessor of a reference unitig.

Returns
an iterator over the past-the-last predecessor of a reference unitig.

◆ hasPredecessors()

template<typename Unitig_data_t = void, typename Graph_data_t = void, bool is_const = false>
bool BackwardCDBG< Unitig_data_t, Graph_data_t, is_const >::hasPredecessors ( ) const

Check if the unitig has at least one predecessor.

Returns
a boolean indicating if the unitig has at least one predecessor (true) or not (false).

The documentation for this class was generated from the following file: