c++/EEDB/Tools/Paraclu.cpp
///////////////////////////////////////////////////////////////////////////////////////////
//
// re-interpretation of paraclu, should behave the same but new "cut/select" idea
//   works only on left-side recursion and adds concept of "best_cluster" to the 
//   depth-first search. no need for min_stability cutoff
//
///////////////////////////////////////////////////////////////////////////////////////////
re-interpretation of paraclu, should behave the same but new "cut/select" idea
works only on left-side recursion and adds concept of "best_cluster" to the
depth-first search. no need for min_stability cutoff
re - interpretation of paraclu should behave the same but new " cut / select " idea works only on left - side recursion and adds concept of " best_cluster " to the depth - first search . no need for min_stability cutoff
void  EEDB::Tools::Paraclu::_process_cluster_range_best(FeatureLink *beg, FeatureLink *end) {  
  if(_best_cluster) {
    delete _best_cluster;
    _best_cluster = NULL;
  }
  _best_cluster = new EEDB::Tools::Paraclu::Cluster;
  _recurse_cluster_range(beg, end, -infinity);
  if(_best_cluster->totalValue >= _min_cutoff_value) {
    EEDB::Feature *feature = _generate_cluster(_best_cluster);
    _output_buffer->insert_feature(feature);
  } else {
    _recover_singletons(_best_cluster->beg, _best_cluster->end);
  }
  _discard_region(beg, _best_cluster->end);
}
void EEDB :: Tools :: Paraclu :: _process_cluster_range_best ( FeatureLink * beg , FeatureLink * end ) { if ( _best_cluster ) { delete _best_cluster ; _best_cluster = NULL ; } _best_cluster = new EEDB :: Tools :: Paraclu :: Cluster ; _recurse_cluster_range ( beg , end , - infinity ) ; if ( _best_cluster -> totalValue >= _min_cutoff_value ) { EEDB :: Feature * feature = _generate_cluster ( _best_cluster ) ; _output_buffer -> insert_feature ( feature ) ; } else { _recover_singletons ( _best_cluster -> beg , _best_cluster -> end ) ; } _discard_region ( beg , _best_cluster -> end ) ; }
re-interpretation of paraclu, should behave the same but new "cut/select" idea
works only on left-side recursion and adds concept of "best_cluster" to the
depth-first search.
re - interpretation of paraclu should behave the same but new " cut / select " idea works only on left - side recursion and adds concept of " best_cluster " to the depth - first search .
//if((_best_cluster->totalValue >= _min_cutoff_value) && (_best_cluster->stability >= _min_stability)) { //if((cluster_length <= _max_cluster_length) && (stability ) && (maxDensity > minDensity)) { //printf("cluster %s\n", feature->chrom_location().c_str());