本文整理汇总了C++中libmaus2::autoarray::AutoArray::getN方法的典型用法代码示例。如果您正苦于以下问题:C++ AutoArray::getN方法的具体用法?C++ AutoArray::getN怎么用?C++ AutoArray::getN使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类libmaus2::autoarray::AutoArray
的用法示例。
在下文中一共展示了AutoArray::getN方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: flush
/**
* flush buffers
**/
void flush()
{
for ( uint64_t i = 0; i < buffers.getN(); ++i )
if ( buffers[i].get() )
{
std::cerr << "(" << (i+1) << "/" << buffers.getN();
buffers[i]->flush();
buffers[i].reset();
std::cerr << ")";
}
}
示例2: minOk
static inline uint64_t minOk(
::libmaus2::autoarray::AutoArray < bool > const & ok,
::libmaus2::autoarray::AutoArray < ::libmaus2::graph::TripleEdge > const & triples
)
{
assert ( anyTrue ( ok ) );
bool foundok = false;
uint64_t minidx = 0;
while ( ! foundok )
if ( ok[minidx] )
foundok = true;
else
minidx++;
assert ( ok[minidx] );
::libmaus2::graph::TripleEdge mintrip = triples[minidx];
for ( uint64_t i = 0; i < triples.getN(); ++i )
if ( ok[i] && triples[i] < mintrip )
{
mintrip = triples[i];
minidx = i;
}
return minidx;
}
示例3: anyTrue
static inline bool anyTrue(::libmaus2::autoarray::AutoArray < bool > const & ok)
{
bool t = false;
for ( uint64_t i = 0; i < ok.getN(); ++i )
t = t || ok[i];
return t;
}
示例4: dst
SocketOutputBufferTemplate(
::libmaus2::network::SocketBase * rdst,
int const rtag,
uint64_t const bufsize)
: dst(rdst), tag(rtag), B(bufsize), pa(B.get()), pc(pa), pe(pa+B.getN())
{
}
示例5: SynchronousGenericOutput
/**
* constructor by output stream
*
* @param out output stream
* @param bufsize output buffer size
**/
SynchronousGenericOutput(std::ostream & out, uint64_t const bufsize)
: B(bufsize), pa(B.get()), pc(pa), pe(pa+B.getN()),
W(out),
datawrittentofile(0)
{
}
示例6: writeArray
static void writeArray(::libmaus2::autoarray::AutoArray<data_type,atype> const & A,
std::string const & outputfilename)
{
this_type out(outputfilename,64*1024);
for ( uint64_t i = 0; i < A.getN(); ++i )
out.put(A[i]);
out.flush();
}
示例7: putTerm
/**
* put terminator num
*
* @param num terminator number
**/
void putTerm(uint64_t num)
{
uint8_t * p = termbuf.get() + termbuf.getN();
for ( unsigned int i = 0; i < expo; ++i )
{
*(--p) = (num % base) + 1;
num /= base;
}
assert ( p == termbuf.get() );
for ( unsigned int i = 0; i < expo; ++i )
put( *(p++) );
}
示例8: B
/**
* constructor
*
* @param filename output file name
* @param bufsize size of output buffer in elements
**/
OutputBuffer(std::string const & filename, uint64_t const bufsize)
: B(bufsize), pa(B.get()), pc(pa), pe(pa+B.getN()), W(filename,16)
{
}
示例9: LRU
FileBunchLRU ( std::vector < std::string > const & rfilenames, uint64_t rlrusize = 1024)
: LRU(rlrusize), lrusize(rlrusize), filenames ( rfilenames ), mapping(filenames.size()), rmapping(lrusize), files(lrusize)
{
std::fill ( mapping.get(), mapping.get() + mapping.getN(), lrusize );
}