vg
tools for working with variation graphs
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
vg::PhasedGenome::iterator Class Reference

#include <phased_genome.hpp>

Public Types

using value_type = NodeTraversal
 

Public Member Functions

 iterator ()
 Default constructor. More...
 
 iterator (const iterator &other)
 Copy constructor. More...
 
 ~iterator ()
 Destructor. More...
 
iteratoroperator= (const iterator &other)
 
bool operator== (const iterator &other) const
 
bool operator!= (const iterator &other) const
 
iterator operator++ ()
 
iterator operator++ (int)
 
NodeTraversal operator* ()
 
int which_haplotype ()
 

Private Member Functions

 iterator (size_t rank, int haplotype_number, HaplotypeNode *haplo_node)
 

Private Attributes

size_t rank
 Ordinal position along the haplotype (to distinguish the same node with multiple copies) More...
 
int haplotype_number
 The ID of the haplotype. More...
 
HaplotypeNodehaplo_node
 The position along the haplotype. More...
 

Friends

class PhasedGenome
 
class Haplotype
 

Detailed Description

Unidirectional iterator to obtain the NodeTraversals of a haplotype. Can be come invalid if the PhasedGenome is edited while iterating.

Member Typedef Documentation

◆ value_type

Constructor & Destructor Documentation

◆ iterator() [1/3]

vg::PhasedGenome::iterator::iterator ( size_t  rank,
int  haplotype_number,
HaplotypeNode haplo_node 
)
private

◆ iterator() [2/3]

vg::PhasedGenome::iterator::iterator ( )

Default constructor.

◆ iterator() [3/3]

vg::PhasedGenome::iterator::iterator ( const iterator other)

Copy constructor.

◆ ~iterator()

vg::PhasedGenome::iterator::~iterator ( )

Destructor.

Member Function Documentation

◆ operator!=()

bool vg::PhasedGenome::iterator::operator!= ( const iterator other) const
inline

◆ operator*()

NodeTraversal vg::PhasedGenome::iterator::operator* ( )
inline

◆ operator++() [1/2]

iterator vg::PhasedGenome::iterator::operator++ ( )
inline

◆ operator++() [2/2]

iterator vg::PhasedGenome::iterator::operator++ ( int  )
inline

◆ operator=()

iterator& vg::PhasedGenome::iterator::operator= ( const iterator other)
inline

◆ operator==()

bool vg::PhasedGenome::iterator::operator== ( const iterator other) const
inline

◆ which_haplotype()

int vg::PhasedGenome::iterator::which_haplotype ( )
inline

Friends And Related Function Documentation

◆ Haplotype

friend class Haplotype
friend

◆ PhasedGenome

friend class PhasedGenome
friend

Member Data Documentation

◆ haplo_node

HaplotypeNode* vg::PhasedGenome::iterator::haplo_node
private

The position along the haplotype.

◆ haplotype_number

int vg::PhasedGenome::iterator::haplotype_number
private

The ID of the haplotype.

◆ rank

size_t vg::PhasedGenome::iterator::rank
private

Ordinal position along the haplotype (to distinguish the same node with multiple copies)


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