Structural Bioinformatics Library
Template C++ / Python API for developping structural bioinformatics applications.
T_Nearest_neighbors_graph_builder_module< ModuleTraits > Class Template Reference

Generic manager for reading arguments of the program and run the calculations. More...

#include <Nearest_neighbors_graph_builder_module.hpp>

Static Public Member Functions

static boost::program_options::options_description *& get_options (void)
 Access to the options' description of the module.

Requirements

std::string get_name (void) const override
 Returns the name of the package.
boost::program_options::options_description add_options (void) override
 Virtual method for adding options to the module.
bool check_options (std::string &message) const override
 Checks that the input options' values are coherent.
bool is_runnable (void) const override
 Checks that all the input options were set.
void run (unsigned verbose, std::ostream &out) override
 Runs the module following the input options.
std::string get_output_prefix (void) const override
 Returns a prefix that concatains the input line options used when running the module.
void statistics (std::ostream &out) override
 Reports high-level statistics on the module.
void report (const std::string &prefix) override
 Reports the output and statistics in output files.

Modules Management

void set_module_instance_name (const std::string &module_instance_name)
 Sets a name for this instance of this module. In particular, it will be used in the prefix of output files generated by a collection of modules.
const std::string & get_module_instance_name (void) const
 Get the name of this instance of this module.
void set_report_mode (std::ios_base::openmode report_mode)
 Set a report mode, that is open or append modes.
void set_report_mode (std::ios_base::openmode &report_mode)
 Set a report mode, that is open or append modes.
const std::ios_base::openmode get_report_mode (void) const
 Get the report mode to be used when reporting.

Optional Requirements

void check_filesystem_directory_exists (const std::string &output_prefix)
 To avoid later crash: check filesystem / existence of directory / directory exists.

Others

template<class Self_>
Self_ * clone (const Self_ *s) const
 Clones the object using the copy constructor.
virtual bool is_logical_module (void) const
 Checks that this module defines a logical operator.
virtual bool is_condition_module (void) const
 Checks that this module defines a condition operator.
virtual bool operator() (void)
 Only for condition modules, for returning the predicate value.
virtual bool is_modules_collection (void) const
 Checks that this module defines a collection of modules.

Detailed Description

template<class ModuleTraits>
class SBL::Modules::T_Nearest_neighbors_graph_builder_module< ModuleTraits >

Generic manager for reading arguments of the program and run the calculations.

Template Parameters
ModuleTraitsModel of a traits class defining the types used in the manager (see T_Conformational_clustering_traits).
ModuleInputshould define points_begin and points_end

Member Function Documentation

◆ add_options()

template<class ModuleTraits>
boost::program_options::options_description add_options ( void )
inlineoverridevirtual

Virtual method for adding options to the module.

Reimplemented from T_Module_option_description< Dummy >.

◆ check_filesystem_directory_exists()

void check_filesystem_directory_exists ( const std::string & output_prefix)
inlineinherited

To avoid later crash: check filesystem / existence of directory / directory exists.

◆ check_options()

template<class ModuleTraits>
bool check_options ( std::string & message) const
inlineoverridevirtual

Checks that the input options' values are coherent.

Reimplemented from T_Module_option_description< Dummy >.

◆ clone()

template<class Self_>
Self_ * clone ( const Self_ * s) const
inlineinherited

Clones the object using the copy constructor.

◆ get_module_instance_name()

const std::string & get_module_instance_name ( void ) const
inlineinherited

Get the name of this instance of this module.

◆ get_name()

template<class ModuleTraits>
std::string get_name ( void ) const
inlineoverridevirtual

Returns the name of the package.

Reimplemented from Module_base.

◆ get_options()

template<class Dummy = void>
boost::program_options::options_description *& get_options ( void )
inlinestaticinherited

Access to the options' description of the module.

◆ get_output_prefix()

template<class ModuleTraits>
std::string get_output_prefix ( void ) const
inlineoverridevirtual

Returns a prefix that concatains the input line options used when running the module.

Reimplemented from T_Module_option_description< Dummy >.

◆ get_report_mode()

const std::ios_base::openmode get_report_mode ( void ) const
inlineinherited

Get the report mode to be used when reporting.

◆ is_condition_module()

virtual bool is_condition_module ( void ) const
inlineprotectedvirtualinherited

Checks that this module defines a condition operator.

◆ is_logical_module()

virtual bool is_logical_module ( void ) const
inlineprotectedvirtualinherited

Checks that this module defines a logical operator.

◆ is_modules_collection()

virtual bool is_modules_collection ( void ) const
inlineprotectedvirtualinherited

Checks that this module defines a collection of modules.

◆ is_runnable()

template<class ModuleTraits>
bool is_runnable ( void ) const
inlineoverridevirtual

Checks that all the input options were set.

Reimplemented from Module_base.

◆ operator()()

virtual bool operator() ( void )
inlineprotectedvirtualinherited

Only for condition modules, for returning the predicate value.

◆ report()

template<class ModuleTraits>
void report ( const std::string & prefix)
inlineoverridevirtual

Reports the output and statistics in output files.

Reimplemented from Module_base.

◆ run()

template<class ModuleTraits>
void run ( unsigned verbose,
std::ostream & out )
inlineoverridevirtual

Runs the module following the input options.

Implements Module_base.

◆ set_module_instance_name()

void set_module_instance_name ( const std::string & module_instance_name)
inlineinherited

Sets a name for this instance of this module. In particular, it will be used in the prefix of output files generated by a collection of modules.

◆ set_report_mode() [1/2]

void set_report_mode ( std::ios_base::openmode & report_mode)
inlineinherited

Set a report mode, that is open or append modes.

◆ set_report_mode() [2/2]

void set_report_mode ( std::ios_base::openmode report_mode)
inlineinherited

Set a report mode, that is open or append modes.

◆ statistics()

template<class ModuleTraits>
void statistics ( std::ostream & out)
inlineoverridevirtual

Reports high-level statistics on the module.

Reimplemented from Module_base.