libsequence  1.9.5
Sequence::ComplementBase Struct Reference

#include <Sequence/ComplementBase.hpp>

Inherits unary_function< char, void >.

Public Member Functions

void operator() (char &ch) const
 

Detailed Description

a functor to complement a sequence
example use:

//reverse and complement a std::string
#include <string>
#include <algorithm>
int main ()
{
std::string seq;
//fill seq with DNA characters
std::reverse(seq.begin(),seq.end());
std::for_each(seq.begin(),seq.end(),Sequence::ComplementBase());
}

Definition at line 53 of file ComplementBase.hpp.

Member Function Documentation

◆ operator()()

void Sequence::ComplementBase::operator() ( char &  ch) const

Converts ch to the complement of ch. Use with std::for_each to complement a range

Definition at line 30 of file ComplementBase.cc.


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