vg
tools for working with variation graphs
|
#include <nodetraversal.hpp>
Public Member Functions | |
NodeTraversal (Node *node, bool backward=false) | |
NodeTraversal () | |
Create a NodeTraversal of no node. More... | |
bool | operator== (const NodeTraversal &other) const |
Equality operator. More... | |
bool | operator!= (const NodeTraversal &other) const |
Inequality operator. More... | |
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. More... | |
Public Attributes | |
Node * | node |
What Node is being traversed? More... | |
bool | backward |
In what orientation is it being traversed? More... | |
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.
|
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.
|
inline |
Create a NodeTraversal of no node.
|
inline |
Inequality operator.
|
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.
|
inline |
Equality operator.
|
inline |
Reverse complement the node traversal, returning a traversal of the same node in the opposite direction.
bool vg::NodeTraversal::backward |
In what orientation is it being traversed?