output ff name for debugging

This commit is contained in:
Hieu Hoang 2015-12-16 16:53:00 +00:00
parent 06f6db303d
commit ac52c6062f
2 changed files with 12 additions and 0 deletions

View File

@ -32,6 +32,9 @@ public:
FeatureFunctions(System &system);
virtual ~FeatureFunctions();
const std::vector<const FeatureFunction*> &GetFeatureFunctions() const
{ return m_featureFunctions; }
const std::vector<const StatefulFeatureFunction*> &GetStatefulFeatureFunctions() const
{ return m_statefulFeatureFunctions; }

View File

@ -5,6 +5,7 @@
* Author: hieu
*/
#include <boost/foreach.hpp>
#include <vector>
#include <cstddef>
#include <stdio.h>
@ -210,6 +211,14 @@ void Scores::Debug(std::ostream &out, const FeatureFunctions &ffs) const
{
out << m_total << " = ";
if (m_scores) {
BOOST_FOREACH(const FeatureFunction *ff, ffs.GetFeatureFunctions()) {
out << ff->GetName() << ":";
for (size_t i = ff->GetStartInd(); i < (ff->GetStartInd() + ff->GetNumScores()); ++i) {
out << m_scores[i] << " ";
}
}
size_t numScores = ffs.GetNumScores();
for (size_t i = 0; i < numScores; ++i) {
out << m_scores[i] << " ";