ARB
|
#include "ps_tools.hxx"
#include "ps_database.hxx"
#include "ps_candidate.hxx"
#include <cmath>
#include <iostream>
#include <sys/times.h>
Go to the source code of this file.
Macros | |
#define | __THRESHOLD_PERCENTAGE_NEXT_SOURCE_ID_SET 5 |
#define | __THRESHOLD_PERCENTAGE_NEXT_TARGET_ID_SET 95 |
#define | __MIN_PERCENTAGE_SET_MATCH 40 |
#define | __MAX_PERCENTAGE_SET_MATCH 60 |
Functions | |
template<class T > | |
void | PS_print_set_ranges (const char *_set_name, const set< T > &_set, const bool _cr_at_end=true) |
template<class T1 , class T2 > | |
void | PS_print_map_ranges (const char *_map_name, const map< T1, T2 > &_map, const bool _compare_keys=true, const bool _cr_at_end=true) |
static unsigned long int | PS_test_candidate_on_bitmap (float *_filling_level=NULp, PS_BitMap_Counted *_map=NULp) |
static bool | PS_test_sets_on_path (float &_distance) |
static void | PS_find_probe_for_sets (const PS_NodePtr &_ps_node, PS_CandidatePtr _candidate_parent) |
static void | PS_find_probes (const PS_NodePtr &_root_node, const int _round, PS_CandidatePtr _candidate_parent, const float _filling_level) |
static void | PS_calc_next_speciesid_sets () |
void | PS_apply_path_to_bitmap (IDSet &_path, const bool _silent=false, PS_BitMap_Counted *_map=NULp) |
static float | PS_filling_level (PS_CandidatePtr _candidate=NULp) |
void | PS_GNUPlot (const char *_out_prefix, const long _iteration, const IDSet &_path, const ID2IDSet &_noMatches) |
static PS_CandidatePtr | PS_ascend (PS_CandidatePtr _last_candidate) |
static void | PS_descend (PS_CandidatePtr _candidate_parent, const PS_NodePtr &_root_node, unsigned long _depth, const float _filling_level) |
static void | PS_make_map_for_candidate (PS_CandidatePtr _candidate) |
void | PS_get_leaf_candidates (PS_CandidatePtr _candidate_parent, PS_CandidateSet &_leaf_candidates, const bool _ignore_passes_left=false) |
void | PS_get_next_candidates_descend (PS_NodePtr _ps_node, PS_CandidateSet &_leaf_candidates) |
void | PS_get_next_candidates (const PS_NodePtr &_root_node, PS_CandidateSet &_leaf_candidates) |
int | main (int argc, char *argv[]) |
Variables | |
static bool | __VERBOSE = false |
static SpeciesID | __MAX_ID |
static SpeciesID | __MIN_ID |
static SpeciesID | __SPECIES_COUNT |
static unsigned long | __BITS_IN_MAP |
static PS_BitMap_Counted * | __MAP |
static PS_BitMap_Counted * | __PRESET_MAP |
static IDSet | __SOURCE_ID_SET |
static PS_BitSet::IndexSet | __TARGET_ID_SET |
static SpeciesID | __MIN_SETS_ID |
static SpeciesID | __MAX_SETS_ID |
static float | __SOURCE_MIN_MATCH_COUNT |
static float | __SOURCE_MAX_MATCH_COUNT |
static float | __TARGET_MIN_MATCH_COUNT |
static float | __TARGET_MAX_MATCH_COUNT |
static float | __SOURCE_PERFECT_MATCH_COUNT |
static float | __TARGET_PERFECT_MATCH_COUNT |
static unsigned long | __PROBES_COUNTER |
static unsigned long | __PROBES_REMOVED |
static PS_CandidatePtr | __CANDIDATES_ROOT |
static unsigned long | __CANDIDATES_COUNTER |
static unsigned long | __CANDIDATES_TODO |
static unsigned long | __CANDIDATES_FINISHED |
static unsigned long | __MAX_DEPTH |
static IDSet | __PATH |
static char * | __PATH_IN_CANDIDATES |
#define __THRESHOLD_PERCENTAGE_NEXT_SOURCE_ID_SET 5 |
Definition at line 170 of file ps_find_probes.cxx.
Referenced by PS_calc_next_speciesid_sets().
#define __THRESHOLD_PERCENTAGE_NEXT_TARGET_ID_SET 95 |
Definition at line 173 of file ps_find_probes.cxx.
#define __MIN_PERCENTAGE_SET_MATCH 40 |
Definition at line 186 of file ps_find_probes.cxx.
Referenced by PS_find_probes().
#define __MAX_PERCENTAGE_SET_MATCH 60 |
Definition at line 187 of file ps_find_probes.cxx.
Referenced by PS_find_probes().
void PS_print_set_ranges | ( | const char * | _set_name, |
const set< T > & | _set, | ||
const bool | _cr_at_end = true |
||
) |
Definition at line 23 of file ps_find_probes.cxx.
References fflush().
Referenced by PS_calc_next_speciesid_sets().
void PS_print_map_ranges | ( | const char * | _map_name, |
const map< T1, T2 > & | _map, | ||
const bool | _compare_keys = true , |
||
const bool | _cr_at_end = true |
||
) |
Definition at line 59 of file ps_find_probes.cxx.
References fflush().
|
static |
Definition at line 216 of file ps_find_probes.cxx.
References __BITS_IN_MAP, __MAP, __MAX_ID, and __PATH.
Referenced by PS_find_probe_for_sets(), and PS_get_next_candidates_descend().
|
static |
Definition at line 280 of file ps_find_probes.cxx.
References __PATH, __SOURCE_ID_SET, __SOURCE_MAX_MATCH_COUNT, __SOURCE_MIN_MATCH_COUNT, __SOURCE_PERFECT_MATCH_COUNT, __TARGET_ID_SET, __TARGET_MAX_MATCH_COUNT, __TARGET_MIN_MATCH_COUNT, and __TARGET_PERFECT_MATCH_COUNT.
Referenced by PS_find_probe_for_sets().
|
static |
Definition at line 316 of file ps_find_probes.cxx.
References __CANDIDATES_COUNTER, __PATH, __PROBES_COUNTER, __VERBOSE, PS_Candidate::addChild(), PS_Candidate::alreadyUsedNode(), fflush(), PS_Node::getChildrenBegin(), PS_Node::getChildrenEnd(), PS_Node::getNum(), PS_Node::hasProbes(), PS_test_candidate_on_bitmap(), PS_test_sets_on_path(), and status.
Referenced by PS_find_probes().
|
static |
Definition at line 375 of file ps_find_probes.cxx.
References __CANDIDATES_COUNTER, __CANDIDATES_TODO, __MAX_PERCENTAGE_SET_MATCH, __MIN_PERCENTAGE_SET_MATCH, __PATH, __PROBES_COUNTER, __SOURCE_ID_SET, __SOURCE_MAX_MATCH_COUNT, __SOURCE_MIN_MATCH_COUNT, __SOURCE_PERFECT_MATCH_COUNT, __TARGET_ID_SET, __TARGET_MAX_MATCH_COUNT, __TARGET_MIN_MATCH_COUNT, __TARGET_PERFECT_MATCH_COUNT, PS_Candidate::children, fflush(), PS_Node::getChildrenBegin(), PS_Node::getChildrenEnd(), PS_find_probe_for_sets(), PS_print_time_diff(), and PS_Candidate::reduceChildren().
Referenced by PS_descend().
|
static |
Definition at line 412 of file ps_find_probes.cxx.
References __MAP, __MAX_ID, __SOURCE_ID_SET, __SPECIES_COUNT, __TARGET_ID_SET, __THRESHOLD_PERCENTAGE_NEXT_SOURCE_ID_SET, id, and PS_print_set_ranges().
Referenced by PS_descend().
void PS_apply_path_to_bitmap | ( | IDSet & | _path, |
const bool | _silent = false , |
||
PS_BitMap_Counted * | _map = NULp |
||
) |
Definition at line 490 of file ps_find_probes.cxx.
References __MAP, and __MAX_ID.
Referenced by main(), PS_ascend(), PS_descend(), PS_get_next_candidates(), and PS_make_map_for_candidate().
|
static |
Definition at line 547 of file ps_find_probes.cxx.
References __BITS_IN_MAP, and __MAP.
Referenced by PS_ascend(), and PS_descend().
void PS_GNUPlot | ( | const char * | _out_prefix, |
const long | _iteration, | ||
const IDSet & | _path, | ||
const ID2IDSet & | _noMatches | ||
) |
Definition at line 562 of file ps_find_probes.cxx.
References __MAP, buffer, PS_FileBuffer::put(), PS_FileBuffer::reinit(), title, and PS_FileBuffer::WRITEONLY.
Referenced by main().
|
static |
Definition at line 617 of file ps_find_probes.cxx.
References __MAP, __PRESET_MAP, PS_Candidate::parent, PS_Candidate::path, PS_apply_path_to_bitmap(), and PS_filling_level().
Referenced by main(), and PS_descend().
|
static |
Definition at line 642 of file ps_find_probes.cxx.
References __CANDIDATES_FINISHED, __CANDIDATES_TODO, __MAX_DEPTH, PS_Candidate::children, PS_Candidate::depth, fflush(), PS_Candidate::filling_level, PS_Candidate::path, PS_Candidate::print(), PS_apply_path_to_bitmap(), PS_ascend(), PS_calc_next_speciesid_sets(), PS_filling_level(), PS_find_probes(), and PS_print_time_diff().
Referenced by main().
|
static |
Definition at line 716 of file ps_find_probes.cxx.
References __PRESET_MAP, PS_Candidate::map, PS_Candidate::parent, PS_Candidate::path, and PS_apply_path_to_bitmap().
Referenced by PS_get_next_candidates().
void PS_get_leaf_candidates | ( | PS_CandidatePtr | _candidate_parent, |
PS_CandidateSet & | _leaf_candidates, | ||
const bool | _ignore_passes_left = false |
||
) |
Definition at line 731 of file ps_find_probes.cxx.
References PS_Candidate::children.
Referenced by main(), and PS_get_next_candidates().
void PS_get_next_candidates_descend | ( | PS_NodePtr | _ps_node, |
PS_CandidateSet & | _leaf_candidates | ||
) |
Definition at line 747 of file ps_find_probes.cxx.
References __CANDIDATES_COUNTER, __CANDIDATES_FINISHED, __CANDIDATES_TODO, __PATH, __PROBES_COUNTER, __PROBES_REMOVED, __VERBOSE, fflush(), PS_Node::getChildrenBegin(), PS_Node::getChildrenEnd(), PS_Node::getNum(), PS_Node::hasProbes(), PS_test_candidate_on_bitmap(), and PS_Node::removeProbes().
Referenced by PS_get_next_candidates().
void PS_get_next_candidates | ( | const PS_NodePtr & | _root_node, |
PS_CandidateSet & | _leaf_candidates | ||
) |
Definition at line 842 of file ps_find_probes.cxx.
References __CANDIDATES_COUNTER, __CANDIDATES_FINISHED, __CANDIDATES_TODO, __MAX_ID, __MIN_ID, __PATH, __PROBES_COUNTER, __PROBES_REMOVED, fflush(), PS_Node::getChildrenBegin(), PS_Node::getChildrenEnd(), PS_apply_path_to_bitmap(), PS_get_leaf_candidates(), PS_get_next_candidates_descend(), PS_make_map_for_candidate(), and PS_print_time_diff().
Referenced by main().
Definition at line 898 of file ps_find_probes.cxx.
References __BITS_IN_MAP, __CANDIDATES_FINISHED, __CANDIDATES_ROOT, __CANDIDATES_TODO, __MAP, __MAX_DEPTH, __MAX_ID, __MIN_ID, __PRESET_MAP, __VERBOSE, PS_Candidate::false_IDs, fflush(), PS_FileBuffer::get_int(), PS_FileBuffer::get_long(), id, PS_Candidate::load(), NULp, PS_Candidate::path, PS_Candidate::print(), arb_test::print(), PS_apply_path_to_bitmap(), PS_ascend(), PS_descend(), PS_get_leaf_candidates(), PS_get_next_candidates(), PS_GNUPlot(), PS_print_time_diff(), PS_FileBuffer::READONLY, PS_Candidate::save(), and PS_FileBuffer::WRITEONLY.
|
static |
Definition at line 151 of file ps_find_probes.cxx.
Referenced by main(), PS_find_probe_for_sets(), and PS_get_next_candidates_descend().
|
static |
Definition at line 152 of file ps_find_probes.cxx.
Referenced by main(), PS_apply_path_to_bitmap(), PS_calc_next_speciesid_sets(), PS_get_next_candidates(), and PS_test_candidate_on_bitmap().
|
static |
Definition at line 153 of file ps_find_probes.cxx.
Referenced by main(), and PS_get_next_candidates().
|
static |
Definition at line 154 of file ps_find_probes.cxx.
Referenced by PS_calc_next_speciesid_sets().
|
static |
Definition at line 155 of file ps_find_probes.cxx.
Referenced by main(), PS_filling_level(), and PS_test_candidate_on_bitmap().
|
static |
Definition at line 156 of file ps_find_probes.cxx.
Referenced by main(), PS_apply_path_to_bitmap(), PS_ascend(), PS_calc_next_speciesid_sets(), PS_filling_level(), PS_GNUPlot(), and PS_test_candidate_on_bitmap().
|
static |
Definition at line 157 of file ps_find_probes.cxx.
Referenced by main(), PS_ascend(), and PS_make_map_for_candidate().
|
static |
Definition at line 158 of file ps_find_probes.cxx.
Referenced by PS_calc_next_speciesid_sets(), PS_find_probes(), and PS_test_sets_on_path().
|
static |
Definition at line 159 of file ps_find_probes.cxx.
Referenced by PS_calc_next_speciesid_sets(), PS_find_probes(), and PS_test_sets_on_path().
|
static |
Definition at line 175 of file ps_find_probes.cxx.
|
static |
Definition at line 176 of file ps_find_probes.cxx.
|
static |
Definition at line 189 of file ps_find_probes.cxx.
Referenced by PS_find_probes(), and PS_test_sets_on_path().
|
static |
Definition at line 190 of file ps_find_probes.cxx.
Referenced by PS_find_probes(), and PS_test_sets_on_path().
|
static |
Definition at line 191 of file ps_find_probes.cxx.
Referenced by PS_find_probes(), and PS_test_sets_on_path().
|
static |
Definition at line 192 of file ps_find_probes.cxx.
Referenced by PS_find_probes(), and PS_test_sets_on_path().
|
static |
Definition at line 193 of file ps_find_probes.cxx.
Referenced by PS_find_probes(), and PS_test_sets_on_path().
|
static |
Definition at line 194 of file ps_find_probes.cxx.
Referenced by PS_find_probes(), and PS_test_sets_on_path().
|
static |
Definition at line 195 of file ps_find_probes.cxx.
Referenced by PS_find_probe_for_sets(), PS_find_probes(), PS_get_next_candidates(), and PS_get_next_candidates_descend().
|
static |
Definition at line 196 of file ps_find_probes.cxx.
Referenced by PS_get_next_candidates(), and PS_get_next_candidates_descend().
|
static |
Definition at line 197 of file ps_find_probes.cxx.
Referenced by main().
|
static |
Definition at line 198 of file ps_find_probes.cxx.
Referenced by PS_find_probe_for_sets(), PS_find_probes(), PS_get_next_candidates(), and PS_get_next_candidates_descend().
|
static |
Definition at line 199 of file ps_find_probes.cxx.
Referenced by main(), PS_descend(), PS_find_probes(), PS_get_next_candidates(), and PS_get_next_candidates_descend().
|
static |
Definition at line 200 of file ps_find_probes.cxx.
Referenced by main(), PS_descend(), PS_get_next_candidates(), and PS_get_next_candidates_descend().
|
static |
Definition at line 201 of file ps_find_probes.cxx.
Referenced by main(), and PS_descend().
|
static |
Definition at line 208 of file ps_find_probes.cxx.
Referenced by PS_find_probe_for_sets(), PS_find_probes(), PS_get_next_candidates(), PS_get_next_candidates_descend(), PS_test_candidate_on_bitmap(), and PS_test_sets_on_path().
|
static |
Definition at line 213 of file ps_find_probes.cxx.