list<int> new_nodes;
bool some_matches=true;
all_matches.clear();
- for(int sp_i=1; (sp_i < all_comparisons.size()) && (some_matches); sp_i++ )
+ for(vector<FLPs>::size_type sp_i=1;
+ (sp_i < all_comparisons.size()) && (some_matches); sp_i++ )
{
new_nodes.clear();
// --thres
sp_itor_begin.clear();
sp_itor_end.clear();
// set each species list of matches to beginning
- for (int sp_i = 0; sp_i < all_matches.size(); sp_i++)
+ for (list<int>::size_type sp_i = 0; sp_i < all_matches.size(); sp_i++)
{
sp_itor_begin.push_back(all_matches[sp_i].begin());
sp_itor_end.push_back(all_matches[sp_i].end());
path.clear();
path.push_back(base_window_index);
- for (int sp_i = 0; sp_i < sp_itor_begin.size(); sp_i++)
+ for (vector<int>::size_type sp_i = 0; sp_i < sp_itor_begin.size(); sp_i++)
{
path.push_back(*(sp_itor_begin[sp_i]));
}
else
not_advanced = false;
}
+ if (sp_depth == -1) // jumped up to first species, all paths searched
+ return false;
+ else
+ return true;
}
void
Nway_Paths::radiate_path_search(vector<vector<FLPs> > all_comparisons)
{
vector<int> path;
- int win_i, sp_i, window_num;
- bool still_paths, not_advanced;
+ int win_i, window_num;
+ bool still_paths;
vector<list<int> > all_matches;
vector<list<int>::iterator> sp_itor_begin(all_comparisons.size());
vector<list<int>::iterator> sp_itor_end(all_comparisons.size());
int cur_node;
list<int> trans_check_nodes;
- for (int sp_depth=1; sp_depth != path.size()-1; ++sp_depth)
+ for (vector<int>::size_type sp_depth=1; sp_depth != path.size()-1; ++sp_depth)
{
cur_node = path[sp_depth];
- for(int i = sp_depth+1; i != path.size()-1; i++)
+ for(vector<int>::size_type i = sp_depth+1; i != path.size()-1; i++)
{
// --thres
//trans_check_nodes = all_comparisons[sp_depth][i].matches(cur_node);
{
assert (species_num == all_comparisons.size());
vector<int> path;
- int win_i, sp_i, sp_depth, window_num;
- bool still_paths, not_advanced;
+ int win_i, window_num;
+ bool still_paths;
+ list<int> trans_check_nodes;
vector<list<int> > all_matches;
vector<list<int>::iterator> sp_itor_begin(all_comparisons.size());
vector<list<int>::iterator> sp_itor_end(all_comparisons.size());
+
cout << "trans: softhres = " << soft_thres;
cout << ", window = " << win_size << ", ";
// advanced.
set_path_to_cur_sp_itor_track(path, win_i, sp_itor_begin);
+
// if the path is transitive, save the path
if (is_transitive_path(path, all_comparisons, soft_thres))
pathz.push_back(path);
-
// now advance the right iterator
still_paths = advance_sp_itor_track(sp_itor_begin,
sp_itor_end,