MCPcopy Create free account
hub / github.com/arq5x/bedtools2 / CoverageFile

Method CoverageFile

src/coverageFile/coverageFile.cpp:11–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9#include <iomanip>
10
11CoverageFile::CoverageFile(ContextCoverage *context)
12: IntersectFile(context),
13 _depthArray(NULL),
14 _depthArrayCapacity(0),
15 _queryLen(0),
16 _totalQueryLen(0),
17 _hitCount(0),
18 _queryOffset(0),
19 _floatValBuf(NULL)
20{
21 //allocate and initialize depth array.
22 //Use C's malloc and free becauase we want
23 //to be able to realloc.
24 //Not using vector because arrays are faster.
25 size_t newSize = sizeof(size_t) * DEFAULT_DEPTH_CAPACITY;
26 _depthArray = (size_t *)malloc(newSize);
27 memset(_depthArray, 0, newSize);
28 _depthArrayCapacity = DEFAULT_DEPTH_CAPACITY;
29
30 _floatValBuf = new char[floatValBufLen];
31}
32
33CoverageFile::~CoverageFile() {
34 free(_depthArray);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected