本文整理汇总了C++中libmaus2::autoarray::AutoArray::ensureSize方法的典型用法代码示例。如果您正苦于以下问题:C++ AutoArray::ensureSize方法的具体用法?C++ AutoArray::ensureSize怎么用?C++ AutoArray::ensureSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类libmaus2::autoarray::AutoArray
的用法示例。
在下文中一共展示了AutoArray::ensureSize方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: decodeBlock
bool decodeBlock()
{
while ( FBO.file < index.Vfn.size() && FBO.block >= index.blocksPerFile[FBO.file] )
{
FBO.file++;
FBO.block = 0;
FBO.blockoffset = 0; // check this if we change the file format
FBO.offset = 0;
openFile();
}
if ( FBO.file == index.Vfn.size() )
{
PSGI.reset();
PISI.reset();
return false;
}
libmaus2::gamma::GammaDecoder< libmaus2::aio::SynchronousGenericInput<uint64_t> > GD(*PSGI);
uint64_t const bs = GD.decode() + 1;
B.ensureSize(bs);
for ( uint64_t i = 0; i < bs; ++i )
B[i] = GD.decode();
pa = B.begin();
pc = B.begin();
pe = B.begin() + bs;
FBO.block += 1;
return true;
}
示例2: setup
void setup(uint64_t const rn)
{
n = rn;
absort.ensureSize(n);
bbsort.ensureSize(n);
arangesort.ensureSize(n);
brangesort.ensureSize(n);
O.ensureSize(n);
A.ensureSize(n);
F.ensureSize(n);
}
示例3: process
void process(
uint8_t const * qa, uint8_t const * qe,
std::pair<uint8_t const *,uint64_t> const * MA,uint64_t const MAo,
libmaus2::autoarray::AutoArray<uint64_t> & E
)
{
E.ensureSize(MAo);
for ( uint64_t i = 0; i < MAo; ++i )
{
np.align(qa,qe-qa,MA[i].first,MA[i].second);
E [ i ] = np.getTraceContainer().getAlignmentStatistics().getEditDistance();
}
}
示例4: psv
static void psv(iterator SUF, uint64_t const n, ::libmaus2::autoarray::AutoArray< typename std::iterator_traits<iterator>::value_type > & prev)
{
// allocate result array
prev.ensureSize(n);
// do not crash for n==0
if ( n )
prev[0] = n;
for ( uint64_t r = 1; r < n; ++r )
{
int64_t t = r - 1;
while ( (t != n) && (SUF[t] >= SUF[r]) )
t = prev[t];
prev[r] = t;
}
}
示例5: nsv
static void nsv(iterator SUF, uint64_t const n, ::libmaus2::autoarray::AutoArray< typename std::iterator_traits<iterator>::value_type > & next)
{
// allocate result array
next.ensureSize(n);
// do not crash for n==0
if ( n )
{
// initialize next for rank n-1
next[n-1] = n;
}
// compute next for the remaining ranks
for ( int64_t r = static_cast<int64_t>(n)-2; r >= 0; --r )
{
uint64_t t = static_cast<uint64_t>(r) + 1;
while ( (t < n) && (SUF[t] >= SUF[r]) )
t = next[t];
next[r] = t;
}
}