KJB
|
#include <Semantic_step_proposal.h>
Public Types | |
typedef boost::shared_ptr < Semantic_step_proposal > | Self_ptr |
typedef Elaboration_tree::Elab_ptr | Elab_ptr |
typedef Elaboration_tree::Elab_ptr_const | Elab_ptr_const |
typedef Syntactic_event::Event_ptr | Syn_event_ptr |
typedef Semantic_step_event::Event_ptr | Sem_event_ptr |
typedef boost::tuple < Step_code_t, Elab_ptr_const, Sem_event_ptr, Syn_event_ptr > | Proposal |
typedef boost::array< Proposal, Step_code::NUM_STEPS > | Proposal_array |
typedef Elaboration_tree::Step_result | Step_result |
typedef boost::random::discrete_distribution | Proposal_dist |
Public Member Functions | |
Semantic_step_proposal () | |
bool | propose (const Elab_ptr_const semantic_parent, const Sem_event_ptr sem_event, const Syn_event_ptr syn_event, const Step_code_t &curr_step, const bool &tree_is_altered, const bool &collins=false) |
generate a proposal and store the result and the log prob More... | |
Proposal | state () |
double | prob () |
Static Public Member Functions | |
static double | evaluate_a_proposal (const Elab_ptr_const semantic_parent, const Sem_event_ptr sem_event, const Syn_event_ptr syn_event, const Step_code_t step, const bool &tree_is_altered, const bool &collins=false) |
given the current step, compute the probability of proposing it More... | |
static const double & | min_prob () |
a smoothing factor More... | |
static const double & | mutability_prob () |
probability of initiating a move for a subtree More... | |
Static Public Attributes | |
static boost::mt19937 | urng = boost::mt19937(std::time(0)) |
static bool | VERBOSE = false |
Member definitions. More... | |
typedef boost::tuple<Step_code_t, Elab_ptr_const, Sem_event_ptr, Syn_event_ptr> semantics::Semantic_step_proposal::Proposal |
typedef boost::array<Proposal, Step_code::NUM_STEPS> semantics::Semantic_step_proposal::Proposal_array |
typedef boost::random::discrete_distribution semantics::Semantic_step_proposal::Proposal_dist |
typedef boost::shared_ptr<Semantic_step_proposal> semantics::Semantic_step_proposal::Self_ptr |
semantics::Semantic_step_proposal::Semantic_step_proposal | ( | ) |
|
static |
given the current step, compute the probability of proposing it
sem_event | pointer to the current semantic event |
syn_event | pointer to the current syntactic event |
step | the code of the step being evaluated |
|
inlinestatic |
a smoothing factor
|
inlinestatic |
probability of initiating a move for a subtree
|
inline |
bool semantics::Semantic_step_proposal::propose | ( | const Elab_ptr_const | semantic_parent, |
const Sem_event_ptr | sem_event, | ||
const Syn_event_ptr | syn_event, | ||
const Step_code_t & | curr_step, | ||
const bool & | tree_is_altered, | ||
const bool & | collins = false |
||
) |
generate a proposal and store the result and the log prob
semantic_parent | the semantic node which is the starting point |
sem_event | ptr to the semantic event object currently in use |
syn_event | ptr to the syntactic event object currently in use |
|
inline |
|
static |
|
static |
Member definitions.