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

Application's module instantiating the eartyh mover distance algorithm. More...

#include <Earth_mover_distance_module.hpp>

Public Member Functions

virtual bool check_options (std::string &message) const
 Checks that the input options' values are coherent. More...
 

Static Public Member Functions

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

Traits Requirements

typedef ModuleTraits::EMD_distance EMD_distance
 
typedef ModuleTraits::EMD_vertices_accessor EMD_vertices_accessor
 
typedef EMD_vertices_accessor::Vertices_container Vertices_container
 
typedef EMD_vertices_accessor::Vertex_rep Vertex_rep
 
typedef EMD_vertices_accessor::Index_type Index_type
 
typedef EMD_vertices_accessor::Vertices_iterator Vertices_iterator
 

Output Types

typedef SBL::CADS::T_Earth_mover_distance< EMD_vertices_accessor, EMD_distance > EMD_WCC_engine
 
typedef SBL::CADS::T_Earth_mover_distance_with_connectivity_constraints< EMD_vertices_accessor, EMD_distance > EMD_CC_engine
 
typedef EMD_WCC_engine::Transportation_plan Transportation_plan
 
typedef EMD_CC_engine::Transportation_plan Transportation_plan_with_cc
 
typedef SBL::CADS::T_Earth_mover_distance_connectivity_constraints_checker< EMD_WCC_engineEarth_mover_distance_checker
 

Constructors

 T_Earth_mover_distance_module (void)
 Constructs the module. More...
 
 T_Earth_mover_distance_module (const Self &other)
 Constructs the module. More...
 

Input Accessors

Vertices_container *& get_source (void)
 
Vertices_container *& get_demand (void)
 

Output Accessors

const Transportation_plans & get_transportation_plans (void) const
 Const access to the transportation plans. More...
 
Transportation_plans & get_transportation_plans (void)
 Access to the transportation plans. More...
 

Mandatory Requirements

boost::program_options::options_description add_options (void) override
 Virtual method for adding options to the module. More...
 
void run (unsigned verbose, std::ostream &out) override
 Runs the module following the input options. More...
 
bool is_runnable (void) const override
 Checks that all the input options were set. More...
 
void statistics (std::ostream &out) override
 Reports high-level statistics on the module. More...
 
std::string get_name (void) const override
 Returns the name of the package. More...
 

Optional Requirements


std::string get_output_prefix (void) const override
 Returns a prefix that concatains the input line options used when running the module. More...
 
void report (const std::string &prefix) override
 Reports the output and statistics in output files. More...
 

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. More...
 
const std::string & get_module_instance_name (void) const
 Get the name of this instance of this module. More...
 
void set_report_mode (std::ios_base::openmode report_mode)
 Set a report mode, that is open or append modes. More...
 
void set_report_mode (std::ios_base::openmode &report_mode)
 Set a report mode, that is open or append modes. More...
 
const std::ios_base::openmode get_report_mode (void) const
 Get the report mode to be used when reporting. More...
 

Optional Requirements

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

Others

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

Detailed Description

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

Application's module instantiating the eartyh mover distance algorithm.

Application's module instantiating the eartyh mover distance algorithm.

Template Parameters
ModuleTraitsTraits class defining the types required by this module : the EMD_distance parameter is a distance functor between two input points, and the EMD_vertices_accessor is a class defining accessors for the vertices of the input data structures (see SBL::CADS::T_Earth_mover_distance_vertices_accessor_vector or SBL::CADS::T_Earth_mover_distance_vertices_accessor_graph).

Constructor & Destructor Documentation

◆ T_Earth_mover_distance_module() [1/2]

T_Earth_mover_distance_module ( void  )
inline

Constructs the module.

◆ T_Earth_mover_distance_module() [2/2]

T_Earth_mover_distance_module ( const Self other)
inline

Constructs the module.

Member Function Documentation

◆ add_options()

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()

virtual bool check_options ( std::string &  message) const
inlinevirtualinherited

Checks that the input options' values are coherent.

Reimplemented in T_Union_of_balls_surface_volume_3_module< ModuleTraits, OutputArchive >, T_Union_of_balls_mesh_3_module< ModuleTraits >, T_Union_of_balls_boundary_patch_shelling_3_module< ModuleTraits, OutputArchive >, T_Union_of_balls_boundary_3_module< ModuleTraits, ExactNT >, T_Tertiary_quaternary_structure_annotator_module< ModuleTraits >, T_Spatial_search_module< ModuleTraits, ApproximatedSpatialSearchEngine >, T_Nearest_neighbors_graph_builder_module< ModuleTraits >, T_Morse_theory_based_analyzer_module< ModuleTraits, MorseSmaleWittenChainComplex >, T_Morse_theory_based_analyzer_module< ModuleTraits, SBL::GT::T_Morse_Smale_Witten_chain_complex_from_vertex_weighted_graph_builder< typename ModuleTraits::Graph, typename ModuleTraits::Get_weight >::Morse_Smale_Witten_chain_complex >, T_Morse_theory_based_analyzer_module< ModuleTraits, SBL::GT::T_Morse_Smale_Witten_chain_complex_from_weighted_graph_builder< typename ModuleTraits::Graph, typename ModuleTraits::Get_weight >::Morse_Smale_Witten_chain_complex >, T_Morse_theory_based_analyzer_module< ModuleTraits, SBL::GT::T_Morse_Smale_Witten_chain_complex_from_NNG_builder< ModuleTraits::Nearest_neighbors_graph, ModuleTraits::Morse_function, ModuleTraits::Distance_graph_function >::Morse_Smale_Witten_chain_complex >, T_Molecular_structure_classifier_module< ModuleTraits >, T_Molecular_interfaces_module< ModuleTraits >, T_Module_conjunction< ModuleOrLoader1, ModuleOrLoader2 >, T_Module_condition< Module, Predicate >, T_Cluster_engine_module< ModuleTraits >, T_Buried_surface_area_without_label_module< ModuleTraits >, T_Buried_surface_area_with_labels_module< ModuleTraits >, T_Alpha_complex_of_molecular_model_module< ModuleTraits >, T_Alignment_structures_module< ModuleTraits, AlignmentEngineStructures >, T_Alignment_sequences_module< ModuleTraits, AlignmentEngineSequences >, T_XTC_file_loader< ConformationType, ConformationBuilder, ESBTLMolecularSystem, PDBLineFormat >, T_Spheres_3_file_loader< Sphere3, Point3 >, T_Radius_annotator_for_particles_with_annotated_name< NT, SetRadius >, T_Points_d_file_loader< PointD >, T_Particle_annotator_collector< ParticleAnnotator1, ParticleAnnotator2 >, T_Name_annotator_for_atoms< SetAnnotatedName >, T_Dynamic_annotator_for_residues< SetDynamicAnnotation >, T_Dynamic_annotator_for_atoms< SetDynamicAnnotation >, T_Transition_graph_loader< InputArchive, TransitionGraphTraits >, T_Protein_representation_loader< Protein_representation_ >, T_Primitive_labels_loader< PartnerLabelsTraits, MediatorLabelsTraits, ExtraLabelsTraits >, T_Numbers_file_loader< FT, Tag >, T_Multiple_archives_xml_archive_file_loader< SecondaryArchive, SecondaryData, SerializedData >, T_Molecular_system_loader< Molecular_system_ >, T_Molecular_system_loader< Molecular_system >, T_Molecular_system_loader< Molecular_covalent_structure_builder_::Molecular_covalent_structure::Particle_info::Particle_traits::Molecular_system >, T_Molecular_covalent_structure_loader_from_MOL< MolecularCovalentStructure >, T_Molecular_covalent_structure_loader< Molecular_covalent_structure_builder_ >, T_Molecular_covalent_structure_loader< SBL::CSB::T_Molecular_covalent_structure_builder_for_proteins< typename Protein_representation_::Polypeptide_chain::Molecular_covalent_structure > >, T_Conformation_loader< Conformation_builder_ >, T_Archive_file_loader< InputArchive, SerializedData >, T_PDB_file_loader< ESBTLMolecularSystem, PDBLineFormat >, No_particle_annotator, T_Name_annotator_for_pseudo_atoms< SetAnnotatedName >, T_Generic_annotator_without_file< AnnotationType, SetAnnotation, GetInstanceName >, T_Generic_annotator< KeyType, AnnotationType, MakeKey, SetAnnotation, GetOptionName, GetOptionHelp, GetOptionDisplayName >, T_Domain_annotator_for_particles< Annotations >, T_Conformations_file_loader< ConformationType, ConformationBuilder, ESBTLMolecularSystem, PDBLineFormat >, and T_Molecular_covalent_structure_loader_from_PDB< ParticleTraits, MolecularCovalentStructure, MolecularCovalentStructureBuilder, PDBLineFormat >.

◆ clone()

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()

std::string get_name ( void  ) const
inlineoverridevirtual

Returns the name of the package.

Reimplemented from Module_base.

◆ get_options()

static boost::program_options::options_description*& get_options ( void  )
inlinestaticinherited

Access to the options' description of the module.

◆ get_output_prefix()

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.

◆ get_transportation_plans() [1/2]

T_Earth_mover_distance_module< ModuleTraits >::Transportation_plans & get_transportation_plans ( void  )
inline

Access to the transportation plans.

◆ get_transportation_plans() [2/2]

const T_Earth_mover_distance_module< ModuleTraits >::Transportation_plans & get_transportation_plans ( void  ) const
inline

Const access to the transportation plans.

◆ 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()

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()

void report ( const std::string &  output_prefix)
inlineoverridevirtual

Reports the output and statistics in output files.

Reimplemented from Module_base.

◆ run()

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()

void statistics ( std::ostream &  out)
inlineoverridevirtual

Reports high-level statistics on the module.

Reimplemented from Module_base.