![]() |
Structural Bioinformatics Library
Template C++ / Python API for developping structural bioinformatics applications.
|
Module comparing two input shelling forests using the ordered forest edit distance Module comparing two input shelling forests using the ordered forest edit distance. More...
#include "Space_filling_model_shelling_diagram_comparison_module.hpp"
Public Types | |
typedef SBL::Modules::T_Space_filling_model_shelling_diagram_comparison_module< ModuleTraits > | Self |
typedef SBL::Modules::Module_base | Base |
Static Public Member Functions | |
static boost::program_options::options_description *& | get_options (void) |
Access to the options' description of the module. More... | |
static bool | has_options (void) |
static void | delete_options (void) |
static void | initialize_options (const std::string &caption) |
Traits Requirements | |
typedef ModuleTraits::Particle_traits | Particle_traits |
Traits class defining the type of particles (atoms or pseudo-atoms) following the concept ParticleTraits. More... | |
typedef ModuleTraits::Atom_shelling_forest | Atom_shelling_forest |
Diagram representing the shelling order of a cell complex. More... | |
Other Types | |
typedef Atom_shelling_forest::Graph | Graph |
Underlaying graph representing the shellign diagram. More... | |
typedef SBL::CADS::T_Ordered_forest_edit_distance< Graph, Get_cost, Is_less_shell > | Ordered_forest_edit_distance |
Generic Forest Edit Distance algorithm for ordered forests. More... | |
typedef Ordered_forest_edit_distance::FT | FT |
Number type of the cost. More... | |
typedef Ordered_forest_edit_distance::Edit_unit_path | Edit_unit_path |
Representation of a unitary edition: type of edition, source vertex, target vertex, cost. More... | |
Input Accessors | |
Atom_shelling_forest *& | get_source_atom_shelling_forest (void) |
Reference to a pointer to the input source atom shelling forest. More... | |
Atom_shelling_forest *& | get_target_atom_shelling_forest (void) |
Reference to a pointer to the input taret atom shelling forest. More... | |
Output Accessors | |
const std::vector< Edit_unit_path > & | get_edit_script (void) const |
Const reference to the output edit script. More... | |
std::vector< Edit_unit_path > & | get_edit_script (void) |
Reference to the output edit script. More... | |
Mandatory Requirements | |
void | run (unsigned verbose, std::ostream &out) |
Runs the module following the input options. More... | |
bool | is_runnable (void) const |
Checks that all the input options were set. More... | |
void | statistics (std::ostream &out) |
Reports high-level statistics on the module. More... | |
Self * | clone (void) const |
Clones the object using the copy constructor. More... | |
std::string | get_name (void) const |
Returns the name of the package. More... | |
Optional Requirements | |
boost::program_options::options_description | add_options (void) const |
Virtual method for adding options to the module. More... | |
bool | check_options (std::string &message) const |
Checks that the input options' values are coherent. More... | |
std::string | get_output_prefix (void) const |
Returns a prefix that concatains the input line options used when running the module. More... | |
void | report (const std::string &prefix) |
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... | |
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... | |
Module comparing two input shelling forests using the ordered forest edit distance Module comparing two input shelling forests using the ordered forest edit distance.
It computes the ordered forest edit distance from the input source shelling forest to the input target shelling forest. It offers two modes of comparison:
The input shelling forests can be set using the methods SBL::Modules::T_Space_filling_model_shelling_diagram_comparison_module::get_source_atom_shelling_forest and SBL::Modules::T_Space_filling_model_shelling_diagram_comparison_module::get_target_atom_shelling_forest that return references to pointers over the input source and target shelling forests.
The output is a edit script that lists unitary editions (deletion, insertion and morphing) with their unitary cost for transforming the source shelling forest to the target shelling forest. Summing all the unitary costs give the total cost of the comparison.
The output edit script is accessible using the method SBL::Modules::T_Space_filling_model_shelling_diagram_comparison_module::get_edit_script that returns a reference over a container of unitary editions of type SBL::Modules::T_Space_filling_model_shelling_diagram_comparison_module::Edit_unit_path.
ModuleTraits | Traits class defining the types SBL::Modules::T_Space_filling_model_shelling_diagram_comparison_module::Particle_traits and SBL::Modules::T_Space_filling_model_shelling_diagram_comparison_module::Atom_shelling_forest. |
typedef ModuleTraits::Atom_shelling_forest Atom_shelling_forest |
Diagram representing the shelling order of a cell complex.
The CellComplex has some requirements for visiting the cells:
3 steps:
– first, defines the cell-complex
– second, attributes the SO to each cell
– third, construct the shelling diagram
Idea: first, find the borders of a patch, i.e the 2-cells incident to a background cell
second, construct a boost graph such that: every border cells are glue on one node, any other cell is represented by a node, and two nodes are linked by an edge if the corresponding cells are adjacents.
third, run dijkstra from the border node: – all cells in the border node have a SO of 0, all other cells have a S0 equals to the distance to the border node.
Now the SO is attributed, we have to construt the SO diagram. To do so, first run a union find algorithm for finding the connected components of cells with the same SO: for each pair of adjacent cells having the same SO, union them.
The SO diagram is initialized with a node for each c.c in union-find
Do the following for each union-find c.c:
– for each cell in a c.c., search for adjacent cells with the next SO: if there is no edge in the SO diagram, ad an edge between the corresponding c.c.
typedef SBL::Modules::Module_base Base |
Representation of a unitary edition: type of edition, source vertex, target vertex, cost.
typedef Ordered_forest_edit_distance::FT FT |
Number type of the cost.
typedef Atom_shelling_forest::Graph Graph |
Underlaying graph representing the shellign diagram.
typedef SBL::CADS::T_Ordered_forest_edit_distance<Graph, Get_cost, Is_less_shell> Ordered_forest_edit_distance |
Generic Forest Edit Distance algorithm for ordered forests.
Forest | Model of a forest as a directed or bidirectional boost::adjacency_list. |
typedef ModuleTraits::Particle_traits Particle_traits |
Traits class defining the type of particles (atoms or pseudo-atoms) following the concept ParticleTraits.
typedef SBL::Modules::T_Space_filling_model_shelling_diagram_comparison_module<ModuleTraits> Self |
|
inlinevirtual |
Virtual method for adding options to the module.
Reimplemented from T_Module_option_description< Dummy >.
|
inlinevirtual |
Checks that the input options' values are coherent.
Reimplemented from T_Module_option_description< Dummy >.
|
inlineinherited |
Clones the object using the copy constructor.
|
inline |
Clones the object using the copy constructor.
|
inlinestaticinherited |
|
inline |
Reference to the output edit script.
|
inline |
Const reference to the output edit script.
|
inlineinherited |
Get the name of this instance of this module.
|
inlinevirtual |
Returns the name of the package.
Reimplemented from Module_base.
|
inlinestaticinherited |
Access to the options' description of the module.
|
inlinevirtual |
Returns a prefix that concatains the input line options used when running the module.
Reimplemented from T_Module_option_description< Dummy >.
|
inlineinherited |
Get the report mode to be used when reporting.
|
inline |
Reference to a pointer to the input source atom shelling forest.
|
inline |
Reference to a pointer to the input taret atom shelling forest.
|
inlinestaticinherited |
|
inlinestaticinherited |
|
inlineprotectedvirtualinherited |
Checks that this module defines a condition operator.
|
inlineprotectedvirtualinherited |
Checks that this module defines a logical operator.
|
inlineprotectedvirtualinherited |
Checks that this module defines a collection of modules.
|
inlinevirtual |
Checks that all the input options were set.
Reimplemented from Module_base.
|
inlineprotectedvirtualinherited |
Only for condition modules, for returning the predicate value.
|
inlinevirtual |
Reports the output and statistics in output files.
Reimplemented from Module_base.
|
inlinevirtual |
Runs the module following the input options.
Implements Module_base.
|
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.
|
inlineinherited |
Set a report mode, that is open or append modes.
|
inlineinherited |
Set a report mode, that is open or append modes.
|
inlinevirtual |
Reports high-level statistics on the module.
Reimplemented from Module_base.