Loading...
Searching...
No Matches
BamTools::Algorithms::Sort::ByPosition Struct Reference

Function object for comparing alignments by position. More...

`#include <Sort.h>`

## Public Member Functions

| ByPosition (const Sort::Order &order=Sort::AscendingOrder)
bool | operator() (const BamTools::BamAlignment &lhs, const BamTools::BamAlignment &rhs) const

## Detailed Description

Function object for comparing alignments by position.

Default sort order is Sort::AscendingOrder.

std::vector<BamAlignment> a;
// sort by position, in ascending order (the following two lines are equivalent):
std::sort( a.begin(), a.end(), Sort::ByPosition() );
std::sort( a.begin(), a.end(), Sort::ByPosition(Sort::AscendingOrder) );
// OR sort in descending order
std::sort( a.begin(), a.end(), Sort::ByPosition(Sort::DescendingOrder) );
BamTools::Algorithms::Sort::ByPosition
Function object for comparing alignments by position.
Definition Sort.h:121
BamTools::Algorithms::Sort::DescendingOrder
@ DescendingOrder
Definition Sort.h:37
BamTools::Algorithms::Sort::AscendingOrder
@ AscendingOrder
Definition Sort.h:36

## Constructor & Destructor Documentation

## ByPosition()

BamTools::Algorithms::Sort::ByPosition::ByPosition | ( | const Sort::Order & | order = Sort::AscendingOrder | ) |

inline

## Member Function Documentation

## operator()()

bool BamTools::Algorithms::Sort::ByPosition::operator() | ( | const BamTools::BamAlignment & | lhs,
|  | const BamTools::BamAlignment & | rhs ) const

inline

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

- Sort.h