mems::EvenFasterSumOfPairsBreakpointScorer Class Reference

#include <GreedyBreakpointElimination.h>

List of all members.

Public Member Functions

void applyScoreDifference (boost::multi_array< double, 2 > &lcb_score_diff, boost::multi_array< size_t, 2 > &lcb_removed_count)
 applies a score difference

 EvenFasterSumOfPairsBreakpointScorer (double breakpoint_penalty, double minimum_breakpoint_penalty, boost::multi_array< double, 2 > bp_weight_matrix, boost::multi_array< double, 2 > conservation_weight_matrix, std::vector< TrackingMatch * > tracking_match, mems::PairwiseLCBMatrix &pairwise_adjacency_matrix, std::vector< node_id_t > &n1_descendants, std::vector< node_id_t > &n2_descendants, boost::multi_array< double, 3 > &tm_score_array, boost::multi_array< size_t, 3 > &tm_lcb_id_array, size_t seqI_begin, size_t seqI_end, size_t seqJ_begin, size_t seqJ_end)
size_t getMaxNewMoveCount ()
 returns the maximum number of new moves generated by any LCB removal

size_t getMoveCount ()
 Returns the number of possible moves a search algorithm may make from the current location in LCB search space.

std::vector< mems::TrackingMatch * > getResults ()
 returns the final set of TrackingMatch values which remain after applying greedy breakpoint elimination

bool isValid (std::pair< double, size_t > &the_move)
 checks whether a particular move is a valid move

double operator() (std::pair< double, size_t > &the_move)
 scores a move

bool remove (std::pair< double, size_t > &the_move, bool really_remove, boost::multi_array< double, 2 > &lcb_score_diff, boost::multi_array< size_t, 2 > &lcb_removed_count, bool score_new_moves, std::vector< std::pair< double, size_t > > &new_move_list, size_t &new_move_count)
 call to indicate that the given LCB has been removed returns false if the move was invalid

bool remove (std::pair< double, size_t > &the_move, std::vector< std::pair< double, size_t > > &new_move_list, size_t &new_move_count)
double score ()
 returns the score of the current state

void undoScoreDifference (boost::multi_array< double, 2 > &lcb_score_diff, boost::multi_array< size_t, 2 > &lcb_removed_count)
 undoes a score difference, if it wasn't accepted for example

bool validate ()
 sanity checks all internal data structures


Protected Attributes

double bp_penalty
boost::multi_array< double, 2 > bp_weights
boost::multi_array< double, 2 > conservation_weights
std::vector< TrackingMatch * > deleted_tracking_matches
double min_breakpoint_penalty
std::vector< node_id_tn1_des
std::vector< node_id_tn2_des
mems::PairwiseLCBMatrix pairwise_adjacencies
boost::multi_array< size_t, 2 > pairwise_lcb_count
boost::multi_array< double, 2 > pairwise_lcb_score
std::vector< mems::TrackingMatch * > tracking_matches

Private Attributes

boost::multi_array< std::vector<
std::pair< uint, uint > >, 2 > 
all_id_remaps
std::vector< double > bogus_scores
bool first_time
boost::multi_array< std::vector<
uint >, 2 > 
full_impact_list
boost::multi_array< size_t, 2 > internal_lcb_removed_count [3]
boost::multi_array< double, 2 > internal_lcb_score_diff [3]
std::vector< size_t > lcb_ids
std::vector< size_t > lrc_zeros
std::vector< double > lsd_zeros
std::vector< size_t > my_del_lcbs
const size_t seqI_count
const size_t seqI_first
const size_t seqI_last
const size_t seqJ_count
const size_t seqJ_first
const size_t seqJ_last
boost::multi_array< size_t, 3 > & tm_lcb_id_array
boost::multi_array< double, 3 > & tm_score_array
int using_lsd


Constructor & Destructor Documentation

mems::EvenFasterSumOfPairsBreakpointScorer::EvenFasterSumOfPairsBreakpointScorer double  breakpoint_penalty,
double  minimum_breakpoint_penalty,
boost::multi_array< double, 2 >  bp_weight_matrix,
boost::multi_array< double, 2 >  conservation_weight_matrix,
std::vector< TrackingMatch * >  tracking_match,
mems::PairwiseLCBMatrix pairwise_adjacency_matrix,
std::vector< node_id_t > &  n1_descendants,
std::vector< node_id_t > &  n2_descendants,
boost::multi_array< double, 3 > &  tm_score_array,
boost::multi_array< size_t, 3 > &  tm_lcb_id_array,
size_t  seqI_begin,
size_t  seqI_end,
size_t  seqJ_begin,
size_t  seqJ_end
 

Definition at line 323 of file GreedyBreakpointElimination.cpp.

References all_id_remaps, bogus_scores, full_impact_list, internal_lcb_removed_count, internal_lcb_score_diff, lrc_zeros, lsd_zeros, my_del_lcbs, pairwise_adjacencies, pairwise_lcb_count, pairwise_lcb_score, mems::PairwiseLCBMatrix, seqI_count, seqJ_count, tracking_matches, and using_lsd.


Member Function Documentation

void mems::EvenFasterSumOfPairsBreakpointScorer::applyScoreDifference boost::multi_array< double, 2 > &  lcb_score_diff,
boost::multi_array< size_t, 2 > &  lcb_removed_count
 

applies a score difference

Definition at line 476 of file GreedyBreakpointElimination.cpp.

References pairwise_lcb_count, and pairwise_lcb_score.

Referenced by operator()(), and remove().

size_t mems::EvenFasterSumOfPairsBreakpointScorer::getMaxNewMoveCount  ) 
 

returns the maximum number of new moves generated by any LCB removal

Definition at line 516 of file GreedyBreakpointElimination.cpp.

References seqI_count, and seqJ_count.

size_t mems::EvenFasterSumOfPairsBreakpointScorer::getMoveCount  ) 
 

Returns the number of possible moves a search algorithm may make from the current location in LCB search space.

In this case it's simply the total number of pairwise LCBs

Definition at line 391 of file GreedyBreakpointElimination.cpp.

References pairwise_adjacencies, seqI_first, seqI_last, seqJ_first, and seqJ_last.

vector< TrackingMatch * > mems::EvenFasterSumOfPairsBreakpointScorer::getResults  ) 
 

returns the final set of TrackingMatch values which remain after applying greedy breakpoint elimination

Definition at line 745 of file GreedyBreakpointElimination.cpp.

References deleted_tracking_matches, and tracking_matches.

Referenced by mems::ProgressiveAligner::alignProfileToProfile(), and validate().

bool mems::EvenFasterSumOfPairsBreakpointScorer::isValid std::pair< double, size_t > &  the_move  ) 
 

checks whether a particular move is a valid move

Definition at line 452 of file GreedyBreakpointElimination.cpp.

References internal_lcb_removed_count, internal_lcb_score_diff, lrc_zeros, lsd_zeros, remove(), and using_lsd.

double mems::EvenFasterSumOfPairsBreakpointScorer::operator() std::pair< double, size_t > &  the_move  ) 
 

scores a move

Definition at line 437 of file GreedyBreakpointElimination.cpp.

References applyScoreDifference(), internal_lcb_removed_count, internal_lcb_score_diff, lrc_zeros, lsd_zeros, remove(), score(), undoScoreDifference(), and using_lsd.

bool mems::EvenFasterSumOfPairsBreakpointScorer::remove std::pair< double, size_t > &  the_move,
bool  really_remove,
boost::multi_array< double, 2 > &  lcb_score_diff,
boost::multi_array< size_t, 2 > &  lcb_removed_count,
bool  score_new_moves,
std::vector< std::pair< double, size_t > > &  new_move_list,
size_t &  new_move_count
 

call to indicate that the given LCB has been removed returns false if the move was invalid

Parameters:
really_remove set to false if the move should merely be checked for validity returns false if the move was invalid

Definition at line 524 of file GreedyBreakpointElimination.cpp.

References all_id_remaps, applyScoreDifference(), bogus_scores, deleted_tracking_matches, full_impact_list, lcb_ids, mems::LCB_UNASSIGNED, my_del_lcbs, pairwise_adjacencies, mems::RemoveLCBandCoalesce(), score(), seqI_first, seqI_last, seqJ_first, seqJ_last, tm_lcb_id_array, tm_score_array, uint, mems::undoLcbRemoval(), and undoScoreDifference().

bool mems::EvenFasterSumOfPairsBreakpointScorer::remove std::pair< double, size_t > &  the_move,
std::vector< std::pair< double, size_t > > &  new_move_list,
size_t &  new_move_count
 

Definition at line 464 of file GreedyBreakpointElimination.cpp.

References applyScoreDifference(), internal_lcb_removed_count, internal_lcb_score_diff, lrc_zeros, lsd_zeros, and using_lsd.

Referenced by isValid(), and operator()().

double mems::EvenFasterSumOfPairsBreakpointScorer::score  ) 
 

returns the score of the current state

Definition at line 401 of file GreedyBreakpointElimination.cpp.

References bp_penalty, bp_weights, conservation_weights, first_time, min_breakpoint_penalty, pairwise_lcb_count, pairwise_lcb_score, score(), seqI_first, seqI_last, seqJ_first, and seqJ_last.

Referenced by operator()(), remove(), and score().

void mems::EvenFasterSumOfPairsBreakpointScorer::undoScoreDifference boost::multi_array< double, 2 > &  lcb_score_diff,
boost::multi_array< size_t, 2 > &  lcb_removed_count
 

undoes a score difference, if it wasn't accepted for example

Definition at line 496 of file GreedyBreakpointElimination.cpp.

References pairwise_lcb_count, and pairwise_lcb_score.

Referenced by operator()(), and remove().

bool mems::EvenFasterSumOfPairsBreakpointScorer::validate  ) 
 

sanity checks all internal data structures

Definition at line 753 of file GreedyBreakpointElimination.cpp.

References mems::ComputeLCBs_v2(), getResults(), mems::IdentifyBreakpoints(), mems::LCB_UNASSIGNED, mems::LcbTrackingMatch< MatchType >::match_id, n1_des, n2_des, mems::LcbTrackingMatch< MatchType >::node_match, pairwise_adjacencies, pairwise_lcb_count, mems::printMatch(), tm_lcb_id_array, and mems::TrackingMatch.


Member Data Documentation

boost::multi_array< std::vector< std::pair< uint, uint > >, 2 > mems::EvenFasterSumOfPairsBreakpointScorer::all_id_remaps [private]
 

Definition at line 560 of file GreedyBreakpointElimination.h.

Referenced by EvenFasterSumOfPairsBreakpointScorer(), and remove().

std::vector< double > mems::EvenFasterSumOfPairsBreakpointScorer::bogus_scores [private]
 

Definition at line 567 of file GreedyBreakpointElimination.h.

Referenced by EvenFasterSumOfPairsBreakpointScorer(), and remove().

double mems::EvenFasterSumOfPairsBreakpointScorer::bp_penalty [protected]
 

Definition at line 539 of file GreedyBreakpointElimination.h.

Referenced by score().

boost::multi_array<double,2> mems::EvenFasterSumOfPairsBreakpointScorer::bp_weights [protected]
 

Definition at line 540 of file GreedyBreakpointElimination.h.

Referenced by score().

boost::multi_array<double,2> mems::EvenFasterSumOfPairsBreakpointScorer::conservation_weights [protected]
 

Definition at line 541 of file GreedyBreakpointElimination.h.

Referenced by score().

std::vector< TrackingMatch* > mems::EvenFasterSumOfPairsBreakpointScorer::deleted_tracking_matches [protected]
 

Definition at line 550 of file GreedyBreakpointElimination.h.

Referenced by getResults(), and remove().

bool mems::EvenFasterSumOfPairsBreakpointScorer::first_time [private]
 

Definition at line 581 of file GreedyBreakpointElimination.h.

Referenced by score().

boost::multi_array< std::vector< uint >, 2 > mems::EvenFasterSumOfPairsBreakpointScorer::full_impact_list [private]
 

Definition at line 561 of file GreedyBreakpointElimination.h.

Referenced by EvenFasterSumOfPairsBreakpointScorer(), and remove().

boost::multi_array< size_t, 2 > mems::EvenFasterSumOfPairsBreakpointScorer::internal_lcb_removed_count[3] [private]
 

Definition at line 563 of file GreedyBreakpointElimination.h.

Referenced by EvenFasterSumOfPairsBreakpointScorer(), isValid(), operator()(), and remove().

boost::multi_array< double, 2 > mems::EvenFasterSumOfPairsBreakpointScorer::internal_lcb_score_diff[3] [private]
 

Definition at line 562 of file GreedyBreakpointElimination.h.

Referenced by EvenFasterSumOfPairsBreakpointScorer(), isValid(), operator()(), and remove().

std::vector< size_t > mems::EvenFasterSumOfPairsBreakpointScorer::lcb_ids [private]
 

Definition at line 569 of file GreedyBreakpointElimination.h.

Referenced by remove().

std::vector< size_t > mems::EvenFasterSumOfPairsBreakpointScorer::lrc_zeros [private]
 

Definition at line 566 of file GreedyBreakpointElimination.h.

Referenced by EvenFasterSumOfPairsBreakpointScorer(), isValid(), operator()(), and remove().

std::vector< double > mems::EvenFasterSumOfPairsBreakpointScorer::lsd_zeros [private]
 

Definition at line 565 of file GreedyBreakpointElimination.h.

Referenced by EvenFasterSumOfPairsBreakpointScorer(), isValid(), operator()(), and remove().

double mems::EvenFasterSumOfPairsBreakpointScorer::min_breakpoint_penalty [protected]
 

Definition at line 552 of file GreedyBreakpointElimination.h.

Referenced by score().

std::vector< size_t > mems::EvenFasterSumOfPairsBreakpointScorer::my_del_lcbs [private]
 

Definition at line 568 of file GreedyBreakpointElimination.h.

Referenced by EvenFasterSumOfPairsBreakpointScorer(), and remove().

std::vector<node_id_t> mems::EvenFasterSumOfPairsBreakpointScorer::n1_des [protected]
 

Definition at line 544 of file GreedyBreakpointElimination.h.

Referenced by validate().

std::vector<node_id_t> mems::EvenFasterSumOfPairsBreakpointScorer::n2_des [protected]
 

Definition at line 545 of file GreedyBreakpointElimination.h.

Referenced by validate().

mems::PairwiseLCBMatrix mems::EvenFasterSumOfPairsBreakpointScorer::pairwise_adjacencies [protected]
 

Definition at line 543 of file GreedyBreakpointElimination.h.

Referenced by EvenFasterSumOfPairsBreakpointScorer(), getMoveCount(), remove(), and validate().

boost::multi_array< size_t, 2 > mems::EvenFasterSumOfPairsBreakpointScorer::pairwise_lcb_count [protected]
 

Definition at line 547 of file GreedyBreakpointElimination.h.

Referenced by applyScoreDifference(), EvenFasterSumOfPairsBreakpointScorer(), score(), undoScoreDifference(), and validate().

boost::multi_array< double, 2 > mems::EvenFasterSumOfPairsBreakpointScorer::pairwise_lcb_score [protected]
 

Definition at line 548 of file GreedyBreakpointElimination.h.

Referenced by applyScoreDifference(), EvenFasterSumOfPairsBreakpointScorer(), score(), and undoScoreDifference().

const size_t mems::EvenFasterSumOfPairsBreakpointScorer::seqI_count [private]
 

Definition at line 556 of file GreedyBreakpointElimination.h.

Referenced by EvenFasterSumOfPairsBreakpointScorer(), and getMaxNewMoveCount().

const size_t mems::EvenFasterSumOfPairsBreakpointScorer::seqI_first [private]
 

Definition at line 575 of file GreedyBreakpointElimination.h.

Referenced by getMoveCount(), remove(), and score().

const size_t mems::EvenFasterSumOfPairsBreakpointScorer::seqI_last [private]
 

Definition at line 577 of file GreedyBreakpointElimination.h.

Referenced by getMoveCount(), remove(), and score().

const size_t mems::EvenFasterSumOfPairsBreakpointScorer::seqJ_count [private]
 

Definition at line 557 of file GreedyBreakpointElimination.h.

Referenced by EvenFasterSumOfPairsBreakpointScorer(), and getMaxNewMoveCount().

const size_t mems::EvenFasterSumOfPairsBreakpointScorer::seqJ_first [private]
 

Definition at line 576 of file GreedyBreakpointElimination.h.

Referenced by getMoveCount(), remove(), and score().

const size_t mems::EvenFasterSumOfPairsBreakpointScorer::seqJ_last [private]
 

Definition at line 578 of file GreedyBreakpointElimination.h.

Referenced by getMoveCount(), remove(), and score().

boost::multi_array< size_t, 3 >& mems::EvenFasterSumOfPairsBreakpointScorer::tm_lcb_id_array [private]
 

Definition at line 572 of file GreedyBreakpointElimination.h.

Referenced by remove(), and validate().

boost::multi_array< double, 3 >& mems::EvenFasterSumOfPairsBreakpointScorer::tm_score_array [private]
 

Definition at line 571 of file GreedyBreakpointElimination.h.

Referenced by remove().

std::vector< mems::TrackingMatch* > mems::EvenFasterSumOfPairsBreakpointScorer::tracking_matches [protected]
 

Definition at line 542 of file GreedyBreakpointElimination.h.

Referenced by EvenFasterSumOfPairsBreakpointScorer(), and getResults().

int mems::EvenFasterSumOfPairsBreakpointScorer::using_lsd [private]
 

Definition at line 564 of file GreedyBreakpointElimination.h.

Referenced by EvenFasterSumOfPairsBreakpointScorer(), isValid(), operator()(), and remove().


The documentation for this class was generated from the following files:
Generated on Fri Mar 14 06:01:40 2008 for libMems by doxygen 1.3.6