tek2
Public Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
tek::DNA< N > Class Template Reference

DNA class. More...

#include <dna.hpp>

Public Member Functions

 DNA () noexcept=default
 default constructor
 
 DNA (const DNA &)=default
 default copy constructor
 
 DNA (DNA &&) noexcept=default
 default move constructor
 
 DNA (std::valarray< uint_fast8_t > &&s) noexcept
 construct from sequence
 
uint_fast32_t count () const noexcept
 diviation from the original
 
template<class URBG >
void flip (uint_fast32_t i, URBG &engine) noexcept
 mutate i-th site
 
const char & operator[] (uint_fast32_t i) const noexcept
 get i-th nucleotide
 
uint_fast8_t get (uint_fast32_t i) const noexcept
 get i-th nucleotide as integer
 
std::ostream & write (std::ostream &ost) const
 translate integer to nucleotide character and print
 
uint_fast32_t operator- (const DNA &other) const noexcept
 Hamming distance.
 

Static Private Member Functions

static const char & translate (uint_fast8_t x) noexcept
 translate integer to character
 

Private Attributes

std::bitset< N > has_3bonds_
 {0: AT, 1: GC}
 
std::bitset< N > is_pyrimidine_
 {0: AG, 1: TC}
 

Friends

std::ostream & operator<< (std::ostream &ost, const DNA &x)
 shortcut of write()
 

Detailed Description

template<size_t N>
class tek::DNA< N >

DNA class.


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