Work in progress: move renderer state to actual class.

This commit is contained in:
2018-03-27 16:31:32 +02:00
parent 8c8d67de73
commit e8f627182f
5 changed files with 100 additions and 77 deletions

View File

@@ -125,26 +125,9 @@ static Animation *getFullyConnectedAnimation(const fmri::LayerData &prevState, c
if (abs(interactions[i]) < EPSILON){
break;
}
result.emplace_back(interactions[i], make_pair((i % shape[1]), i / shape[1]));
result.emplace_back(interactions[i], make_pair((i % shape[1]) / normalizer, i / shape[1]));
}
for (auto entry : result) {
if (prevState.data()[entry.second.first] < EPSILON) {
std::cerr << "Error in data!" << entry.first << " "
<< entry.second.first << " " << entry.second.second
<< " " << prevState.data()[entry.second.first] << " "
<< "\n";
}
}
if (normalizer != 1) {
for (auto& entry : result) {
entry.second.first /= normalizer;
}
}
cerr.flush();
return new ActivityAnimation(result, prevPositions.data(), curPositions.data());
}