gatb.core-API-0.0.0
|
Cached implementation of the IHistogram interface. More...
#include <Histogram.hpp>
Public Member Functions | |
HistogramCache (IHistogram *ref, system::ISynchronizer *synchro=0) | |
~HistogramCache () | |
void | inc (u_int16_t index) |
void | inc2D (u_int16_t index1, u_int16_t index2) |
void | save (tools::storage::impl::Group &group) |
void | compute_threshold (int min_auto_threshold) |
u_int16_t | get_solid_cutoff () |
u_int64_t | get_nbsolids_auto () |
float | get_ratio_weak () |
u_int16_t | get_first_peak () |
size_t | getLength () |
size_t | getLength2 () |
u_int64_t & | get (u_int16_t idx) |
u_int64_t & | get2D (u_int16_t idx1, u_int16_t idx2) |
Public Member Functions inherited from IHistogram | |
virtual | ~IHistogram () |
Public Member Functions inherited from ISmartPointer | |
virtual | ~ISmartPointer () |
Public Member Functions inherited from SmartPointer | |
void | use () |
void | forget () |
Additional Inherited Members | |
Protected Member Functions inherited from SmartPointer | |
SmartPointer () | |
virtual | ~SmartPointer () |
Cached implementation of the IHistogram interface.
This implementation is a Proxy design pattern. It allows to modify a IHistogram instance by several threads at the same time. Actually, each thread has a local copy and at the end, all the local copies are merged into the referred instance.
|
inline |
Constructor.
[in] | ref | : the referred instance. |
[in] | synchro | : used for synchronization |
|
inline |
Destructor.
|
inlinevirtual |
Compute first minimum at x0 and firt maximum at x1 (x1>x0).
Implements IHistogram.
|
inlinevirtual |
|
inlinevirtual |
Retrieve the value for x and y of histo2D.
[in] | idx1 | : x value. |
[in] | idx2 | : y value. |
Implements IHistogram.
|
inlinevirtual |
Get the x1 value at the first maximum after x0.
Implements IHistogram.
|
inlinevirtual |
Get the number of kmers for x>x0, aka solid kmers for x0 threshold
Implements IHistogram.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Return the maximum allowed for Y in case of 2D histogram.
Implements IHistogram.
|
inlinevirtual |
Increase the number of kmers occurring X time
[in] | index | : the X value. |
Implements IHistogram.
|
inlinevirtual |
Increase the number of kmers occurring X time in genome and Y times in read
[in] | index1 | : the X value. |
[in] | index2 | : the Y value. |
Implements IHistogram.
|
inlinevirtual |
Save the distribution. It is saved into the bag provided at construction.
Implements IHistogram.