gatb.core-API-1.4.2
Repartitor Class Reference

#include <PartiInfo.hpp>

Inheritance diagram for Repartitor:
Inheritance graph

Public Types

typedef u_int16_t Value
 

Public Member Functions

 Repartitor (int nbpart=0, int minimsize=0, int nbPass=1)
 
 Repartitor (tools::storage::impl::Group &group)
 
 ~Repartitor ()
 
void computeDistrib (const PartiInfo< 5 > &pInfo)
 
Value operator() (u_int64_t minimizerValue)
 
void load (tools::storage::impl::Group &group)
 
void save (tools::storage::impl::Group &group)
 
void printInfo ()
 
size_t getNbPasses () const
 
uint32_t * getMinimizerFrequencies ()
 
void setMinimizerFrequencies (uint32_t *freq)
 
- Public Member Functions inherited from SmartPointer
void use ()
 
void forget ()
 
- Public Member Functions inherited from ISmartPointer
virtual ~ISmartPointer ()
 

Additional Inherited Members

- Protected Member Functions inherited from SmartPointer
 SmartPointer ()
 
virtual ~SmartPointer ()
 

Detailed Description

Class providing hash values for minimizers.

Minimizer (of size m) values are gathered in N partitions, so a function from 4^m values to N values is built. This function is built thanks to a PartiInfo object that is built while scanning a part of the input bank (ie. information about minimizers distribution is built then).

The hash value is got through the operator() method.

It is possible to save/load an instance of this class; this may be useful for having the same partition as the solid kmers for other purpose (like debloom for instance).

Note: this class could be renamed in the future to emphasize it essentially provides a hash function service.

Member Typedef Documentation

typedef u_int16_t Value

Hash value type.

Constructor & Destructor Documentation

Repartitor ( int  nbpart = 0,
int  minimsize = 0,
int  nbPass = 1 
)
inline

Constructor

Parameters
[in]nbpart: hash value will be in range [0..nbpart-1]
[in]minimsize: size of the minimizers.

Constructor

~Repartitor ( )
inline

Destructor

Member Function Documentation

void computeDistrib ( const PartiInfo< 5 > &  pInfo)

Compute the hash function for the minimizer.

Parameters
[in]pInfo: information about the distribution of the minimizers.
uint32_t* getMinimizerFrequencies ( )
inline

Get a buffer on minimizer frequencies.

size_t getNbPasses ( ) const
inline

Get the number of passes used to split the input bank.

void load ( tools::storage::impl::Group group)

Load the repartition table from a storage object.

Parameters
[in]group: group where the repartition table has to be loaded
Value operator() ( u_int64_t  minimizerValue)
inline

Returns the hash value for the given minimizer value.

Parameters
[in]minimizerValue: minimizer value as an integer.
Returns
hash value for the given minimizer.
void printInfo ( )

For debug purpose.

void save ( tools::storage::impl::Group group)

Save the repartition table into a storage object.

Parameters
[in]group: group where the repartition table has to be saved
void setMinimizerFrequencies ( uint32_t *  freq)
inline

Set the minimizer frequencies.


The documentation for this class was generated from the following files: