gatb.core-API-0.0.0
|
Framework class for implementing algorithm. More...
#include <Algorithm.hpp>
Public Member Functions | |
Algorithm (const std::string &name, int nbCores=-1, gatb::core::tools::misc::IProperties *input=0) | |
virtual | ~Algorithm () |
std::string | getName () const |
void | run () |
virtual void | execute ()=0 |
virtual IProperties * | getInput () |
virtual IProperties * | getOutput () |
virtual IProperties * | getInfo () |
virtual dp::IDispatcher * | getDispatcher () |
virtual TimeInfo & | getTimeInfo () |
virtual IProperties * | getSystemInfo () |
template<typename Item > | |
dp::Iterator< Item > * | createIterator (dp::Iterator< Item > *iter, size_t nbIterations=0, const char *message=0, dp::IteratorListener *listener=0) |
virtual dp::IteratorListener * | createIteratorListener (size_t nbIterations, const char *message) |
Public Member Functions inherited from SmartPointer | |
void | use () |
void | forget () |
Public Member Functions inherited from ISmartPointer | |
virtual | ~ISmartPointer () |
Static Public Member Functions | |
template<template< size_t > class Functor> | |
static int | mainloop (tools::misc::IOptionsParser *parser, int argc, char *argv[]) |
Protected Member Functions | |
std::string | getUriByKey (const std::string &key) |
std::string | getUri (const std::string &str) |
void | setInput (IProperties *input) |
Protected Member Functions inherited from SmartPointer | |
SmartPointer () | |
virtual | ~SmartPointer () |
Framework class for implementing algorithm.
Algorithm | ( | const std::string & | name, |
int | nbCores = -1 , |
||
gatb::core::tools::misc::IProperties * | input = 0 |
||
) |
Constructor.
[in] | name | name of the algorithm. |
[in] | nbCores | : number of cores to be used for this algorithm. |
[in] | input | : extra options for configuring the algorithm. |
|
virtual |
Destructor.
|
inline |
Create an iterator for the given iterator. If the verbosity is enough, progress bar information can be displayed.
[in] | iter | : object to be encapsulated by a potential progress information |
[in] | nbIterations | : number of iterations to be done. |
[in] | message | : message used if progress information has to be displayed |
[in] | listener | : listener to be used; if null, a new one is created |
|
virtual |
Creates an iterator listener according to the verbosity level.
[in] | nbIterations | : number of iterations to be done |
[in] | message | : progression message |
|
pure virtual |
Execution of the algorithm. Abstract method, must be refined in subclasses.
Implemented in SortingCountAlgorithm< span >, MPHFAlgorithm< span, Abundance_t, NodeState_t >, DebloomAlgorithm< span >, BranchingAlgorithm< span, Node, Edge, Graph_t >, BankConverterAlgorithm, and UnitigsConstructionAlgorithm< span >.
|
inlinevirtual |
Get an option parser configured with recognized options for the tool
|
inlinevirtual |
Get statistics information about the execution of the tool
|
inlinevirtual |
Get the parsed options as a properties instance
|
inline |
Get tool name
|
inlinevirtual |
Get output results as a properties instance
|
inlinevirtual |
Get information about operating system resources used during the execution.
|
inlinevirtual |
|
inlineprotected |
Computes the uri from an uri (ie add a prefix if any).
|
inlineprotected |
Computes the uri from an uri (ie add a prefix if any).
|
inlinestatic |
Utility function for easily running a kmers based algorithms. It ensures that the correct instance of the provided functor is launched, according to the kmer size (known at runtime).
void run | ( | ) |
Run the algorithm, ie. call 'execute'.
|
inlineprotected |
Setters.