Update mussa to build on ubuntu 10.04 with qt 4.6.2 +boost 1.40.0.1
[mussa.git] / alg / flp.cpp
index 56a0a0828fa469a62637df8d858778ba212052a6..8c425d59666ad73a081b1efc810edb74c1710386 100644 (file)
@@ -40,14 +40,18 @@ ostream &operator<<(ostream& out, const FLPs::match& m)
 FLPs::FLPs() :
   window_size(0),
   hard_threshold(0),
-  all_matches(0)
+  all_matches(0),
+  seqcomp_i(seqcomp_not_running),
+  seqcomp_end(seqcomp_not_running)
 {
 }
 
 FLPs::FLPs(const FLPs& o) :
   window_size(o.window_size),
   hard_threshold(o.hard_threshold),
-  all_matches(o.all_matches)
+  all_matches(o.all_matches),
+  seqcomp_i(o.seqcomp_i),
+  seqcomp_end(o.seqcomp_end)
 {
 }
 
@@ -281,3 +285,11 @@ FLPs::load(fs::path file_path)
   
 }
 
+float FLPs::progress() const
+{
+  if (seqcomp_end == FLPs::seqcomp_not_running) {
+    return FLPs::seqcomp_not_running;
+  } else {
+    return static_cast<float>(seqcomp_i)/static_cast<float>(seqcomp_end);
+  }
+}