/usr/include/pbseq/alignment/utils/RangeUtils.hpp is in libblasr-dev 0~20161219-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | /*
* ============================================================================
*
* Filename: RangeUtils.h
*
* Description: Parse a list of ranges separated by commas.
* Designed for specifying a set of holeNumbers to analyze.
*
* Version: 1.0
* Created: 05/02/2013 12:51:27 PM
* Revision: none
* Compiler: gcc
*
* Author: Yuan Li (yli), yli@pacificbiosciences.com
* Company: Pacific Biosciences
*
* ============================================================================
*/
#include <stdlib.h>
#include <algorithm>
#include "../../pbdata/StringUtils.hpp"
#include "../../pbdata/Types.h"
class Range {
public:
UInt start; // Start position of a range, inclusive
UInt end; // End position of a range, inclusive
Range(UInt pStart);
Range(UInt pStart, UInt pEnd);
bool contains(const UInt & query);
bool operator < (const Range & pRange) const;
};
// Input is a comma-delimited string of ranges.
// e.g. 1,2,3,10-20
bool ParseRanges(string & rangesStr, vector<Range> & ranges);
class Ranges {
public:
std::vector<Range> ranges;
Ranges(std::string rangesStr="");
bool setRanges(std::string rangesStr);
int size();
UInt max();
bool contains(const UInt & query);
};
|