-autoscale of data during draw. data remains unchanged

git-svn-id: http://moon:8086/svn/software/trunk/projects/RBM@41 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2014-10-25 21:08:57 +00:00
parent 4d1f2f2e0c
commit 376f2dfa35
4 changed files with 31 additions and 23 deletions
+1 -19
View File
@@ -859,25 +859,7 @@ void MainComponent::redrawReconstruction()
void MainComponent::redrawWeights(int index)
{
VectorXd w = m_weights.weights().col(index);
VectorXd temp = w;
double min = +1E12;
double max = -1E12;
for (int i=0; i < m_vNumX*m_vNumY; i++)
{
min = std::min<double>(min, (double)temp[i]);
max = std::max<double>(max, (double)temp[i]);
}
for (int i=0; i < m_vNumX*m_vNumY; i++)
{
temp[i] -= min;
}
for (int i=0; i < m_vNumX*m_vNumY; i++)
{
temp[i] /= (max-min);
}
DrawWeights->setData(temp);
DrawWeights->setData(w);
}
void MainComponent::run()