#include <Hypergraph.h>
Public Member Functions | |
Graph (Vocab &vocab) | |
void | SetCounts (std::size_t vertices, std::size_t edges) |
Vocab & | MutableVocab () |
Edge * | NewEdge () |
Vertex * | NewVertex () |
const Vertex & | GetVertex (std::size_t index) const |
Edge & | GetEdge (std::size_t index) |
void | Prune (Graph *newGraph, const SparseVector &weights, size_t minEdgeCount) const |
std::size_t | VertexSize () const |
std::size_t | EdgeSize () const |
bool | IsBoundary (const Vocab::Entry *word) const |
Definition at line 213 of file Hypergraph.h.
MosesTuning::Graph::Graph | ( | Vocab & | vocab | ) | [inline] |
Definition at line 216 of file Hypergraph.h.
std::size_t MosesTuning::Graph::EdgeSize | ( | ) | const [inline] |
Definition at line 251 of file Hypergraph.h.
References MosesTuning::FixedAllocator< T >::Size().
Referenced by BOOST_AUTO_TEST_CASE().
Edge& MosesTuning::Graph::GetEdge | ( | std::size_t | index | ) | [inline] |
Definition at line 239 of file Hypergraph.h.
const Vertex& MosesTuning::Graph::GetVertex | ( | std::size_t | index | ) | const [inline] |
Definition at line 235 of file Hypergraph.h.
Referenced by BOOST_AUTO_TEST_CASE(), MosesTuning::HgBleuScorer::HgBleuScorer(), and MosesTuning::Viterbi().
bool MosesTuning::Graph::IsBoundary | ( | const Vocab::Entry * | word | ) | const [inline] |
Definition at line 255 of file Hypergraph.h.
References MosesTuning::Vocab::Bos(), and MosesTuning::Vocab::Eos().
Referenced by MosesTuning::Viterbi().
Vocab& MosesTuning::Graph::MutableVocab | ( | ) | [inline] |
Definition at line 223 of file Hypergraph.h.
Edge* MosesTuning::Graph::NewEdge | ( | ) | [inline] |
Definition at line 227 of file Hypergraph.h.
References MosesTuning::FixedAllocator< T >::New().
Referenced by BOOST_AUTO_TEST_CASE(), and Prune().
Vertex* MosesTuning::Graph::NewVertex | ( | ) | [inline] |
Definition at line 231 of file Hypergraph.h.
References MosesTuning::FixedAllocator< T >::New().
Referenced by BOOST_AUTO_TEST_CASE(), Prune(), and MosesTuning::ReadGraph().
void MosesTuning::Graph::Prune | ( | Graph * | newGraph, | |
const SparseVector & | weights, | |||
size_t | minEdgeCount | |||
) | const |
Definition at line 111 of file Hypergraph.cpp.
References MosesTuning::Edge::AddChild(), MosesTuning::Vertex::AddEdge(), MosesTuning::Edge::AddWord(), MosesTuning::Edge::Children(), MosesTuning::Edge::Features(), MosesTuning::Vertex::GetIncoming(), MosesTuning::kMinScore, NewEdge(), NewVertex(), SetCounts(), MosesTuning::Edge::SetFeatures(), MosesTuning::Vertex::SetSourceCovered(), MosesTuning::FixedAllocator< T >::Size(), UTIL_THROW_IF, and MosesTuning::Edge::Words().
Referenced by BOOST_AUTO_TEST_CASE(), and main().
void MosesTuning::Graph::SetCounts | ( | std::size_t | vertices, | |
std::size_t | edges | |||
) | [inline] |
Definition at line 218 of file Hypergraph.h.
References MosesTuning::FixedAllocator< T >::Init().
Referenced by BOOST_AUTO_TEST_CASE(), Prune(), and MosesTuning::ReadGraph().
std::size_t MosesTuning::Graph::VertexSize | ( | ) | const [inline] |
Definition at line 248 of file Hypergraph.h.
References MosesTuning::FixedAllocator< T >::Size().
Referenced by BOOST_AUTO_TEST_CASE(), MosesTuning::HgBleuScorer::HgBleuScorer(), and MosesTuning::Viterbi().