Commit e3784ef4 authored by Mathieu Giraud's avatar Mathieu Giraud

core/dynprog.{cpp,h}: output costs in the format expected by -f and -C

See #2076.
parent cd8d1183
...@@ -90,6 +90,7 @@ void Cost::estimate_K_lambda() ...@@ -90,6 +90,7 @@ void Cost::estimate_K_lambda()
ostream& operator<<(ostream& out, const Cost& cost) ostream& operator<<(ostream& out, const Cost& cost)
{ {
if (cost.debug)
out << "(" << cost.match out << "(" << cost.match
<< ", " << cost.mismatch << ", " << cost.mismatch
<< "/" << cost.insertion << "/" << cost.insertion
...@@ -100,6 +101,13 @@ ostream& operator<<(ostream& out, const Cost& cost) ...@@ -100,6 +101,13 @@ ostream& operator<<(ostream& out, const Cost& cost)
<< ", " << cost.homopolymer << ", " << cost.homopolymer
<< ") " << ") "
<< cost.K << "/" << cost.lambda ; << cost.K << "/" << cost.lambda ;
else
out << "\"" << cost.match
<< ", " << cost.mismatch
<< ", " << cost.insertion
<< ", " << cost.homopolymer
<< ", " << cost.deletion_end
<< "\"" ;
return out; return out;
} }
......
...@@ -26,6 +26,8 @@ typedef struct { ...@@ -26,6 +26,8 @@ typedef struct {
class Cost class Cost
{ {
public: public:
bool debug = false;
int match; int match;
int mismatch; int mismatch;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment