#include <boost/filesystem/fstream.hpp>
namespace fs = boost::filesystem;
+#include "alg/mussa_callback.hpp"
#include "alg/nway_paths.hpp"
#include "alg/conserved_path.hpp"
#include "mussa_exceptions.hpp"
using namespace std;
NwayPaths::NwayPaths()
+ : progress_cb(0)
{
}
threshold = t;
soft_thres = threshold;
win_size = w;
+ progress_cb = 0;
pathz.clear();
//cout << "nway: thres = " << threshold
return win_size;
}
+void NwayPaths::set_progress_callback(analysis_callback cb)
+{
+ progress_cb = cb;
+}
+
+analysis_callback NwayPaths::get_progress_callback() const
+{
+ return progress_cb;
+}
+
// dumbly goes thru and combines path windows exactly adjacent (ie + 1 index)
// doesn't deal with interleaved adjacency
void
//cout << "path number is: " << pathz.size() << endl;
pathz_i = pathz.begin();
+ int path_count = 0;
// only try to extend when pathz isn't empty.
if (pathz_i != pathz.end())
{
ext_path = *pathz_i;
+ ++path_count;
while(pathz_i != pathz.end())
{
// keep track of current path and advance to next path
cur_path = pathz_i;
++pathz_i;
+ ++path_count;
if (pathz_i == pathz.end()) {
end = true;
ext_path = *next_path;
}
}
+ if (progress_cb) {
+ progress_cb("refine", path_count-1, pathz.size());
+ }
}
}
//cout << "r_path number is: " << refined_pathz.size() << endl;