From: derek Date: Fri, 30 Sep 2011 20:20:28 +0000 (-0400) Subject: Initial test run of new BamAlgorithms X-Git-Url: https://git.donarmstrong.com/?p=bamtools.git;a=commitdiff_plain;h=038f0e1dda24b2d6765cc8c878b7dbdc5f922ed6 Initial test run of new BamAlgorithms --- diff --git a/src/api/BamAlgorithms.h b/src/api/BamAlgorithms.h new file mode 100644 index 0000000..c62e68e --- /dev/null +++ b/src/api/BamAlgorithms.h @@ -0,0 +1,144 @@ +// *************************************************************************** +// BamAlgorithms.h (c) 2009 Derek Barnett +// Marth Lab, Department of Biology, Boston College +// All rights reserved. +// --------------------------------------------------------------------------- +// Last modified: 29 September 2011 (DB) +// --------------------------------------------------------------------------- +// Provides generic algorithms that are intended to work with BamTools data +// structures. Where possible, these are intended to be STL-compatible. +// *************************************************************************** + +#ifndef BAMALGORITHMS_H +#define BAMALGORITHMS_H + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace BamTools { +namespace Algorithms { + +// ------------------------------------------------------- +// Built-in function objects for comparing BamAlignments + +typedef std::binary_function BamAlignmentComparer; + +// Algorithms::SortByName +// compare alignments by name (default comparison is std::less ) +template