vg
tools for working with variation graphs
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
vg::NodeSide Class Reference

#include <nodeside.hpp>

Public Member Functions

 NodeSide (id_t node, bool is_end=false)
 
 NodeSide ()
 Create a NodeSide for no Node. More...
 
bool operator== (const NodeSide &other) const
 Equality operator. More...
 
bool operator!= (const NodeSide &other) const
 Inequality operator. More...
 
bool operator< (const NodeSide &other) const
 Comparison operator for sets and maps. More...
 
NodeSide flip (void) const
 Reverse complement the node side, obtaining the other side of the same Node. More...
 
Visit to_visit () const
 Convert to a Visit. More...
 

Static Public Member Functions

static pair< NodeSide, NodeSidepair_from_edge (Edge *e)
 Make an edge into a canonically ordered pair of NodeSides. More...
 
static pair< NodeSide, NodeSidepair_from_edge (const Edge &e)
 Make an edge into a canonically ordered pair of NodeSides. More...
 
static pair< NodeSide, NodeSidepair_from_start_edge (id_t start_id, const pair< id_t, bool > &oriented_other)
 
static pair< NodeSide, NodeSidepair_from_end_edge (id_t end_id, const pair< id_t, bool > &oriented_other)
 

Public Attributes

id_t node
 What Node are we a side of? More...
 
bool is_end
 Are we the end side? Or the start side? More...
 

Detailed Description

Represents one side of a Node, identified by ID, for the purposes of indexing edges. TODO: duplicates much of the functionality of NodeTraversal, and causes API duplication to accomodate both. There should only be one.

Constructor & Destructor Documentation

◆ NodeSide() [1/2]

vg::NodeSide::NodeSide ( id_t  node,
bool  is_end = false 
)
inline

Create a NodeSide for the given side of the given Node. We need this to be a converting constructor so we can represent the empty and deleted item keys in a pair_hash_map.

◆ NodeSide() [2/2]

vg::NodeSide::NodeSide ( )
inline

Create a NodeSide for no Node.

Member Function Documentation

◆ flip()

NodeSide vg::NodeSide::flip ( void  ) const
inline

Reverse complement the node side, obtaining the other side of the same Node.

◆ operator!=()

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

Inequality operator.

◆ operator<()

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

Comparison operator for sets and maps.

◆ operator==()

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

Equality operator.

◆ pair_from_edge() [1/2]

static pair<NodeSide, NodeSide> vg::NodeSide::pair_from_edge ( const Edge e)
inlinestatic

Make an edge into a canonically ordered pair of NodeSides.

◆ pair_from_edge() [2/2]

static pair<NodeSide, NodeSide> vg::NodeSide::pair_from_edge ( Edge e)
inlinestatic

Make an edge into a canonically ordered pair of NodeSides.

◆ pair_from_end_edge()

static pair<NodeSide, NodeSide> vg::NodeSide::pair_from_end_edge ( id_t  end_id,
const pair< id_t, bool > &  oriented_other 
)
inlinestatic

Make a canonically ordered pair of NodeSides from an edge off of the end of a node, to another node in the given relative orientation.

◆ pair_from_start_edge()

static pair<NodeSide, NodeSide> vg::NodeSide::pair_from_start_edge ( id_t  start_id,
const pair< id_t, bool > &  oriented_other 
)
inlinestatic

Make a canonically ordered pair of NodeSides from an edge off of the start of a node, to another node in the given relative orientation.

◆ to_visit()

Visit vg::NodeSide::to_visit ( ) const
inline

Convert to a Visit.

Member Data Documentation

◆ is_end

bool vg::NodeSide::is_end

Are we the end side? Or the start side?

◆ node

id_t vg::NodeSide::node

What Node are we a side of?


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