![]() |
Structural Bioinformatics Library
Template C++ / Python API for developping structural bioinformatics applications.
|
Earth mover distance algorithm using lp_solve software for solving linear program problems. More...
#include <Earth_mover_distance.hpp>
Public Types | |
typedef T_Earth_mover_distance< VerticesAccessor, DistanceFunctor > | Self |
typedef VerticesAccessor | Vertices_accessor |
typedef VerticesAccessor::Vertices_container | Vertices_container |
typedef DistanceFunctor | Distance_functor |
typedef VerticesAccessor::Vertex_rep | Vertex_rep |
typedef Distance_functor::FT | FT_flow_cost |
typedef VerticesAccessor::FT | FT_mass |
typedef VerticesAccessor::Index_type | Index_type |
typedef VerticesAccessor::Vertex_value | Vertex_value |
typedef VerticesAccessor::Vertices_iterator | Vertices_iterator |
typedef std::map< Vertex_rep, FT_mass > | Vertex_to_corrected_mass_map |
typedef T_Earth_mover_distance_transportation_plan< Vertex_rep, FT_flow_cost > | Transportation_plan |
typedef Transportation_plan::EMD_CC_stat_triple | EMD_CC_stat_triple |
Public Member Functions | |
T_Earth_mover_distance (const Distance_functor &dist=Distance_functor()) | |
Transportation_plan | operator() (Vertices_container &source, Vertices_container &demand, const std::string &filename_prefix="linear_program_solver") const |
Static Public Member Functions | |
static void | set_verbose_mode (unsigned verbose) |
static void | set_log (std::ostream &out) |
static void | set_solver (EMD_LP_solver_enum solver) |
Static Public Attributes | |
static std::string | s_lp_solver_string = "lp_solve" |
static EMD_LP_solver_enum | s_lp_solver = EMD_LP_solver_LP_SOLVE |
static EMD_LP_format_enum | s_lp_format = EMD_LP_format_MPS |
Earth mover distance algorithm using lp_solve software for solving linear program problems.
It is designed as a generic functor implementing the earth mover distance algorithm between two data structures. It is able to handle any type of data structure through the parameter VerticesAccessor that provides the base methods for traversing the set of points of the source and the demand. The distance between points of the source and the demand is also editable and is provided as a template parameter.
VerticesAccessor | Base data structure defining the types and accessors related to the input data structures that are required by this algorithm. See classes SBL::CADS::T_Earth_mover_distance_vertices_accessor_vector and SBL::CADS::T_Earth_mover_distance_vertices_accessor_graph for two examples of use, one where the input data structures are simple containers of weighted points, and the other one where the input data structures are graphs connecting those weighted points. |
DistanceFunctor | Functor defining the number type used for representing the distance and returning a distance between two input points. By default, the algorithm is instantiated with the class T_EMD_distance_default which returns a null distance for any pair of points. |
typedef DistanceFunctor Distance_functor |
typedef Distance_functor::FT FT_flow_cost |
typedef VerticesAccessor::FT FT_mass |
typedef VerticesAccessor::Index_type Index_type |
typedef T_Earth_mover_distance<VerticesAccessor, DistanceFunctor> Self |
typedef VerticesAccessor::Vertex_rep Vertex_rep |
typedef std::map<Vertex_rep, FT_mass> Vertex_to_corrected_mass_map |
typedef VerticesAccessor::Vertex_value Vertex_value |
typedef VerticesAccessor Vertices_accessor |
typedef VerticesAccessor::Vertices_container Vertices_container |
typedef VerticesAccessor::Vertices_iterator Vertices_iterator |
|
inline |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
static |
|
static |
|
static |