00001
00002
00003
00004
00005
00006
00007
00008 #ifndef SCORE_HPP__
00009 #define SCORE_HPP__
00010
00011 #include <list>
00012 #include <cassert>
00013 #include <boost/shared_ptr.hpp>
00014
00015 #include "ScoredWord.h"
00016
00017 namespace Bayes {
00018
00025 class Score {
00026 public:
00027 boost::shared_ptr<std::list<ScoredWord> > m_ptScoredList;
00030 double m_dListScore;
00032 public:
00033
00037 Score() : m_ptScoredList(new std::list<ScoredWord>), m_dListScore(0)
00038 { assert(m_ptScoredList); }
00039
00048 Score(const boost::shared_ptr< list<ScoredWord> >& ptScoredList,
00049 double dListScore)
00050 : m_ptScoredList(ptScoredList), m_dListScore(dListScore)
00051 { assert(m_ptScoredList); }
00052
00062 std::string str(bool withScoredWords = false) const;
00063 };
00064
00065 }
00066
00067 #endif