mosesdecoder/contrib/other-builds/moses2/Scores.h
2015-10-26 23:24:58 +00:00

36 lines
830 B
C++

/*
* Scores.h
*
* Created on: 23 Oct 2015
* Author: hieu
*/
#pragma once
#include <iostream>
#include <string>
#include "TypeDef.h"
#include "util/pool.hh"
class FeatureFunction;
class System;
class Scores {
friend std::ostream& operator<<(std::ostream &, const Scores &);
public:
Scores(util::Pool &pool, size_t numScores);
Scores(util::Pool &pool, size_t numScores, const Scores &origScores);
virtual ~Scores();
SCORE GetTotalScore() const
{ return m_total; }
void CreateFromString(const std::string &str, const FeatureFunction &featureFunction, const System &system);
void PlusEquals(const std::vector<SCORE> &scores, const FeatureFunction &featureFunction, const System &system);
void PlusEquals(const Scores &scores, const System &system);
protected:
SCORE *m_scores;
SCORE m_total;
};