mosesdecoder/contrib/other-builds/moses2/ArcLists.h
2016-08-03 11:10:35 +01:00

42 lines
735 B
C++

/*
* ArcList.h
*
* Created on: 26 Oct 2015
* Author: hieu
*/
#pragma once
#include <vector>
#include <boost/unordered_map.hpp>
namespace Moses2
{
class HypothesisBase;
typedef std::vector<const HypothesisBase*> ArcList;
class ArcLists
{
public:
ArcLists();
virtual ~ArcLists();
void AddArc(bool added, const HypothesisBase *currHypo,
const HypothesisBase *otherHypo);
void Sort();
void Delete(const HypothesisBase *hypo);
const ArcList &GetArcList(const HypothesisBase *hypo) const;
protected:
typedef boost::unordered_map<const HypothesisBase*, ArcList*> Coll;
Coll m_coll;
ArcList &GetArcList(const HypothesisBase *hypo);
ArcList &GetAndDetachArcList(const HypothesisBase *hypo);
};
}