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

#include <dinucleotide_machine.hpp>

Public Member Functions

 DinucleotideMachine ()
 
 ~DinucleotideMachine ()=default
 
uint32_t init_state () const
 Return an empty dinucleotide set. More...
 
uint32_t update_state (uint32_t state, char next) const
 
uint32_t merge_state (uint32_t state_1, uint32_t state_2) const
 Get the union of two dinucleotide sets. More...
 
bool matches (uint32_t state, const char *dinucleotide) const
 Return true if the set includes this dinucleotide. Only valid for dinucleotides of ACGT (never N). More...
 
bool matches (uint32_t state, const string &dinucleotide) const
 Same semantics as above. More...
 

Private Attributes

uint32_t transition_table [256]
 
uint32_t nt_table [256]
 

Constructor & Destructor Documentation

◆ DinucleotideMachine()

vg::DinucleotideMachine::DinucleotideMachine ( )

◆ ~DinucleotideMachine()

vg::DinucleotideMachine::~DinucleotideMachine ( )
default

Member Function Documentation

◆ init_state()

uint32_t vg::DinucleotideMachine::init_state ( ) const

Return an empty dinucleotide set.

◆ matches() [1/2]

bool vg::DinucleotideMachine::matches ( uint32_t  state,
const char *  dinucleotide 
) const

Return true if the set includes this dinucleotide. Only valid for dinucleotides of ACGT (never N).

◆ matches() [2/2]

bool vg::DinucleotideMachine::matches ( uint32_t  state,
const string &  dinucleotide 
) const

Same semantics as above.

◆ merge_state()

uint32_t vg::DinucleotideMachine::merge_state ( uint32_t  state_1,
uint32_t  state_2 
) const

Get the union of two dinucleotide sets.

◆ update_state()

uint32_t vg::DinucleotideMachine::update_state ( uint32_t  state,
char  next 
) const

Get the dinucleotide set that results from extending the set by the given character Ns are valid, but will result in no matches

Member Data Documentation

◆ nt_table

uint32_t vg::DinucleotideMachine::nt_table[256]
private

◆ transition_table

uint32_t vg::DinucleotideMachine::transition_table[256]
private

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