KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
semantics::Semantic_step_proposal Class Reference

#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...
 

Member Typedef Documentation

typedef boost::random::discrete_distribution semantics::Semantic_step_proposal::Proposal_dist

Constructor & Destructor Documentation

semantics::Semantic_step_proposal::Semantic_step_proposal ( )

Member Function Documentation

double semantics::Semantic_step_proposal::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 
)
static

given the current step, compute the probability of proposing it

Parameters
sem_eventpointer to the current semantic event
syn_eventpointer to the current syntactic event
stepthe code of the step being evaluated
Returns
the log probability of proposing the current step code
static const double& semantics::Semantic_step_proposal::min_prob ( )
inlinestatic

a smoothing factor

static const double& semantics::Semantic_step_proposal::mutability_prob ( )
inlinestatic

probability of initiating a move for a subtree

double semantics::Semantic_step_proposal::prob ( )
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

Parameters
semantic_parentthe semantic node which is the starting point
sem_eventptr to the semantic event object currently in use
syn_eventptr to the syntactic event object currently in use
Proposal semantics::Semantic_step_proposal::state ( )
inline

Member Data Documentation

boost::mt19937 semantics::Semantic_step_proposal::urng = boost::mt19937(std::time(0))
static
bool semantics::Semantic_step_proposal::VERBOSE = false
static

Member definitions.


The documentation for this class was generated from the following files: