没有合适的资源?快使用搜索试试~ 我知道了~
Copyright (c) 2004 Broad Institute/Massachusetts Institute of Technology
资源推荐
资源详情
资源评论
// Copyright (c) 2004 Broad Institute/Massachusetts Institute of Technology
#include "math/Functions.h"
#include "ueberal/DynProg.h"
void CScoreMatrix::PrettyPrint( int x, int y, bool shade_only )
{
int i, j;
if (x == -1)
x = m_size;
if (y == -1)
y = 0;
cout << "Printing elements from x=" << x << " to y=" << y << "\n";
for (i=y; i<x; i++) {
cout << "\n";
for (j=y; j<x; j++) {
double val_orig = Get( i, j );
if ( shade_only )
cout << ( val_orig > 0 ? "X" : "." );
else {
if ( val_orig > 0 && val_orig < 1.0 )
val_orig = 1.0;
int val = Min( 99, (int)val_orig );
cout << setw( 3 ) << val << " ";
}
}
#include "math/Functions.h"
#include "ueberal/DynProg.h"
void CScoreMatrix::PrettyPrint( int x, int y, bool shade_only )
{
int i, j;
if (x == -1)
x = m_size;
if (y == -1)
y = 0;
cout << "Printing elements from x=" << x << " to y=" << y << "\n";
for (i=y; i<x; i++) {
cout << "\n";
for (j=y; j<x; j++) {
double val_orig = Get( i, j );
if ( shade_only )
cout << ( val_orig > 0 ? "X" : "." );
else {
if ( val_orig > 0 && val_orig < 1.0 )
val_orig = 1.0;
int val = Min( 99, (int)val_orig );
cout << setw( 3 ) << val << " ";
}
}
}
cout << "\n";
}
CDynamicProgramming::CDynamicProgramming()
{
m_maxGap = -1;
m_badScore = DP_BADSCORE;
m_bScoresPos = false;
}
CDynamicProgramming::~CDynamicProgramming()
{
}
void CDynamicProgramming::SetMaxGap(int x)
{
m_maxGap = x;
}
void CDynamicProgramming::SetScoresArePos(bool b)
{
m_bScoresPos = b;
if (b)
m_badScore = DP_BADSCORE_NEG;
else
cout << "\n";
}
CDynamicProgramming::CDynamicProgramming()
{
m_maxGap = -1;
m_badScore = DP_BADSCORE;
m_bScoresPos = false;
}
CDynamicProgramming::~CDynamicProgramming()
{
}
void CDynamicProgramming::SetMaxGap(int x)
{
m_maxGap = x;
}
void CDynamicProgramming::SetScoresArePos(bool b)
{
m_bScoresPos = b;
if (b)
m_badScore = DP_BADSCORE_NEG;
else
剩余6页未读,继续阅读
资源评论
laosongshuxiaosongsh
- 粉丝: 6
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功