#include <Node.h>
Public Member Functions | |
Node (const std::string &label, NodeType type) | |
~Node () | |
const std::string & | GetLabel () const |
NodeType | GetType () const |
const std::vector< Node * > & | GetChildren () const |
const std::vector< Node * > & | GetParents () const |
float | GetPcfgScore () const |
const Span & | GetSpan () const |
const Span & | GetComplementSpan () const |
const std::vector< const Subgraph * > & | GetRules () const |
void | SetChildren (const std::vector< Node * > &c) |
void | SetParents (const std::vector< Node * > &p) |
void | SetPcfgScore (float s) |
void | SetSpan (const Span &s) |
void | SetComplementSpan (const Span &cs) |
void | AddChild (Node *c) |
void | AddParent (Node *p) |
void | AddRule (const Subgraph *s) |
bool | IsSink () const |
bool | IsPreterminal () const |
void | PropagateIndex (int) |
std::vector< std::string > | GetTargetWords () const |
template<typename OutputIterator > | |
void | GetTreeAncestors (OutputIterator result, bool includeSelf=false) |
Static Public Member Functions | |
template<typename InputIterator > | |
static Node * | LowestCommonAncestor (InputIterator first, InputIterator last) |
Definition at line 40 of file Node.h.
Moses::GHKM::Node::Node | ( | const std::string & | label, | |
NodeType | type | |||
) | [inline] |
void Moses::GHKM::Node::AddChild | ( | Node * | c | ) | [inline] |
Definition at line 91 of file Node.h.
Referenced by Moses::GHKM::AlignmentGraph::AlignmentGraph().
void Moses::GHKM::Node::AddParent | ( | Node * | p | ) | [inline] |
Definition at line 94 of file Node.h.
Referenced by Moses::GHKM::AlignmentGraph::AlignmentGraph().
void Moses::GHKM::Node::AddRule | ( | const Subgraph * | s | ) | [inline] |
Definition at line 97 of file Node.h.
Referenced by Moses::GHKM::AlignmentGraph::ExtractMinimalRules().
const std::vector<Node*>& Moses::GHKM::Node::GetChildren | ( | ) | const [inline] |
const Span& Moses::GHKM::Node::GetComplementSpan | ( | ) | const [inline] |
const std::string& Moses::GHKM::Node::GetLabel | ( | ) | const [inline] |
Definition at line 50 of file Node.h.
Referenced by Moses::GHKM::ScfgRule::ScfgRule().
const std::vector<Node*>& Moses::GHKM::Node::GetParents | ( | ) | const [inline] |
Definition at line 59 of file Node.h.
Referenced by Moses::GHKM::ComposedRule::AttemptComposition(), and Moses::GHKM::ScfgRule::ScfgRule().
const std::vector<const Subgraph*>& Moses::GHKM::Node::GetRules | ( | ) | const [inline] |
const Span& Moses::GHKM::Node::GetSpan | ( | ) | const [inline] |
Definition at line 65 of file Node.h.
Referenced by Moses::GHKM::AlignmentGraph::ExtractMinimalRules(), and Moses::GHKM::ScfgRule::ScfgRule().
std::vector< std::string > Moses::GHKM::Node::GetTargetWords | ( | ) | const |
Definition at line 53 of file Node.cpp.
Referenced by Moses::GHKM::ScfgRule::ScfgRule().
void Moses::GHKM::Node::GetTreeAncestors | ( | OutputIterator | result, | |
bool | includeSelf = false | |||
) | [inline] |
Definition at line 139 of file Node.h.
References Moses::GHKM::TARGET, and Moses::GHKM::TREE.
Referenced by LowestCommonAncestor().
NodeType Moses::GHKM::Node::GetType | ( | ) | const [inline] |
Definition at line 53 of file Node.h.
Referenced by Moses::GHKM::ComposedRule::AttemptComposition(), Moses::GHKM::ComposedRule::CreateSubgraph(), Moses::GHKM::AlignmentGraph::ExtractMinimalRules(), and Moses::GHKM::ScfgRule::ScfgRule().
bool Moses::GHKM::Node::IsPreterminal | ( | ) | const |
Node * Moses::GHKM::Node::LowestCommonAncestor | ( | InputIterator | first, | |
InputIterator | last | |||
) | [inline, static] |
Definition at line 156 of file Node.h.
References GetTreeAncestors(), index, and Moses::GHKM::SOURCE.
void Moses::GHKM::Node::SetChildren | ( | const std::vector< Node * > & | c | ) | [inline] |
void Moses::GHKM::Node::SetComplementSpan | ( | const Span & | cs | ) | [inline] |
void Moses::GHKM::Node::SetParents | ( | const std::vector< Node * > & | p | ) | [inline] |