[RBM]
- committed local changes git-svn-id: http://moon:8086/svn/software/trunk/projects/RBM@270 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
@@ -222,22 +222,22 @@ void DrawComponent::clear()
|
||||
setData(m_data);
|
||||
}
|
||||
|
||||
const VectorXd& DrawComponent::getData ()
|
||||
const RowVectorXd& DrawComponent::getData ()
|
||||
{
|
||||
return m_data;
|
||||
}
|
||||
|
||||
void DrawComponent::setData (const VectorXd& data)
|
||||
void DrawComponent::setData (const RowVectorXd& data)
|
||||
{
|
||||
m_data = data;
|
||||
DrawData(data);
|
||||
DrawData();
|
||||
}
|
||||
|
||||
void DrawComponent::DrawData (const VectorXd& data)
|
||||
void DrawComponent::DrawData ()
|
||||
{
|
||||
|
||||
double a;
|
||||
VectorXd temp = data;
|
||||
RowVectorXd temp = m_data;
|
||||
double min = +1E12;
|
||||
double max = -1E12;
|
||||
|
||||
@@ -246,13 +246,18 @@ void DrawComponent::DrawData (const VectorXd& data)
|
||||
min = std::min<double>(min, (double)temp[i]);
|
||||
max = std::max<double>(max, (double)temp[i]);
|
||||
}
|
||||
for (int i=0; i < m_width*m_height; i++)
|
||||
|
||||
if (min < 0)
|
||||
{
|
||||
temp[i] -= min;
|
||||
for (int i=0; i < m_width*m_height; i++)
|
||||
{
|
||||
temp[i] -= min;
|
||||
}
|
||||
max -= min;
|
||||
}
|
||||
for (int i=0; i < m_width*m_height; i++)
|
||||
{
|
||||
temp[i] /= (max-min);
|
||||
temp[i] /= max;
|
||||
}
|
||||
|
||||
for (int i=0; i < m_height; i++)
|
||||
|
||||
Reference in New Issue
Block a user