vg
tools for working with variation graphs
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
vg::NodeTraversal Class Reference

#include <nodetraversal.hpp>

Public Member Functions

 NodeTraversal (Node *node, bool backward=false)
 
 NodeTraversal ()
 Create a NodeTraversal of no node.
 
bool operator== (const NodeTraversal &other) const
 Equality operator.
 
bool operator!= (const NodeTraversal &other) const
 Inequality operator.
 
bool operator< (const NodeTraversal &other) const
 
NodeTraversal reverse (void) const
 Reverse complement the node traversal, returning a traversal of the same node in the opposite direction.
 

Public Attributes

Nodenode
 What Node is being traversed?
 
bool backward
 In what orientation is it being traversed?
 

Detailed Description

Represents a node traversed in a certain orientation. The default orientation is start to end, but if backward is set, represents the node being traversed end to start. A list of these can serve as an edit-free version of a path, especially if supplemented with a length and an initial node offset. A path node has a left and a right side, which are the start and end of the node if it is forward, or the end and start of the node if it is backward.

Constructor & Destructor Documentation

◆ NodeTraversal() [1/2]

vg::NodeTraversal::NodeTraversal ( Node node,
bool  backward = false 
)
inlineexplicit

Make a NodeTraversal that traverses the given Node in the given orientation. We don't want Node*s to turn into NodeTraversals when we aren't expecting it, so this is explicit.

◆ NodeTraversal() [2/2]

vg::NodeTraversal::NodeTraversal ( )
inline

Create a NodeTraversal of no node.

Member Function Documentation

◆ operator!=()

bool vg::NodeTraversal::operator!= ( const NodeTraversal other) const
inline

Inequality operator.

◆ operator<()

bool vg::NodeTraversal::operator< ( const NodeTraversal other) const
inline

Comparison operator for sorting in sets and maps. Make sure to sort by node ID and not pointer value, because people will expect that.

◆ operator==()

bool vg::NodeTraversal::operator== ( const NodeTraversal other) const
inline

Equality operator.

◆ reverse()

NodeTraversal vg::NodeTraversal::reverse ( void  ) const
inline

Reverse complement the node traversal, returning a traversal of the same node in the opposite direction.

Member Data Documentation

◆ backward

bool vg::NodeTraversal::backward

In what orientation is it being traversed?

◆ node

Node* vg::NodeTraversal::node

What Node is being traversed?


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