Structural Bioinformatics Library
Template C++ / Python API for developping structural bioinformatics applications.
T_Greedy_selection< Arrangement, GetWeightOfArrangement, GetOverlappingArrangements > Class Template Reference

Generic greedy selection algorithm of arrangements of cells. More...

#include <Greedy_selection.hpp>

Classes

class  Arrangement_property
 
class  Is_larger_weight
 

Public Types

typedef T_Greedy_selection< Arrangement, GetWeightOfArrangement, GetOverlappingArrangements > Self
 
typedef GetWeightOfArrangement::FT FT
 

Public Member Functions

template<class InputIterator >
 T_Greedy_selection (InputIterator begin, InputIterator end, GetWeightOfArrangement *get_weight=NULL, GetOverlappingArrangements *get_overlap=NULL)
 
 ~T_Greedy_selection (void)
 
Arrangement operator() (void)
 
bool operator() (Vertex v)
 
bool operator() (Arrangement A)
 
template<class OutputIterator >
OutputIterator decrease_number_of_connected_components (OutputIterator out)
 
void reset (void)
 
bool is_selected (Arrangement A) const
 
unsigned size_of_selection (void) const
 
unsigned number_of_remaining_arrangements (void) const
 
const FTweight_of_selection (void) const
 
unsigned number_of_connected_components_in_selection (void) const
 

Detailed Description

template<class Arrangement, class GetWeightOfArrangement, class GetOverlappingArrangements>
class SBL::CADS::T_Greedy_selection< Arrangement, GetWeightOfArrangement, GetOverlappingArrangements >

Generic greedy selection algorithm of arrangements of cells.

Note that the algorithm uses arrangments of cells instead of cells: this is because we do not know for sure what is a cell, but we have to deal in any cases with arrangements.

The algorithm first compute a graph of intersection of the arrangements of cells, allowing to find quickly the changes of weight of the arrangements during the algorithm.

Second it creates a priority queue of the arrangements with respect to their weight, computed from GetWeightOfArrangment. When selecting an arrangement, only the top of the priority queue is inspected: its weight is updated related to the previously selected neighbors, and compared to the next top of the priority queue. If it remains the top, it is the selection and it is added as selected neighbor to its neighbors, otherwise it is reinserted in the priority queue and the next top is inspected.

Member Typedef Documentation

◆ FT

typedef GetWeightOfArrangement::FT FT

◆ Self

typedef T_Greedy_selection<Arrangement, GetWeightOfArrangement, GetOverlappingArrangements> Self

Constructor & Destructor Documentation

◆ T_Greedy_selection()

T_Greedy_selection ( InputIterator  begin,
InputIterator  end,
GetWeightOfArrangement *  get_weight = NULL,
GetOverlappingArrangements *  get_overlap = NULL 
)
inline

◆ ~T_Greedy_selection()

~T_Greedy_selection ( void  )
inline

Member Function Documentation

◆ decrease_number_of_connected_components()

OutputIterator decrease_number_of_connected_components ( OutputIterator  out)
inline

◆ is_selected()

bool is_selected ( Arrangement  A) const
inline

◆ number_of_connected_components_in_selection()

unsigned number_of_connected_components_in_selection ( void  ) const
inline

◆ number_of_remaining_arrangements()

unsigned number_of_remaining_arrangements ( void  ) const
inline

◆ operator()() [1/3]

bool operator() ( Arrangement  A)
inline

◆ operator()() [2/3]

bool operator() ( Vertex  v)
inline

◆ operator()() [3/3]

Arrangement operator() ( void  )
inline

◆ reset()

void reset ( void  )
inline

◆ size_of_selection()

unsigned size_of_selection ( void  ) const
inline

◆ weight_of_selection()

const T_Greedy_selection< Arrangement, GetWeightOfArrangement, GetOverlappingArrangements >::FT & weight_of_selection ( void  ) const
inline