Fleet  0.0.9
Inference in the LOT
Public Types | Public Member Functions | Public Attributes | List of all members
InnerHypothesis Class Reference

#include <InnerHypothesis.h>

Inheritance diagram for InnerHypothesis:
Inheritance graph
[legend]
Collaboration diagram for InnerHypothesis:
Collaboration graph
[legend]

Public Types

using Super = DeterministicLOTHypothesis< InnerHypothesis, BindingTree *, bool, MyGrammar,&grammar >
 
using CCH = CachedCallHypothesis< InnerHypothesis, defaultdatum_t< BindingTree *, std::string >, bool >
 
using output_t = Super::output_t
 
using data_t = Super::data_t
 
using Super = DeterministicLOTHypothesis< InnerHypothesis, CL, CL, Combinators::SKGrammar,&Combinators::skgrammar >
 
using Super = DeterministicLOTHypothesis< InnerHypothesis, Utterance, TruthValue, MyGrammar,&grammar >
 
using CCH = CachedCallHypothesis< InnerHypothesis, Utterance, TruthValue >
 
using Super = LOTHypothesis< this_t, _input_t, _output_t, _Grammar_t, grammar, _datum_t, _data_t, _VirtualMachineState_t >
 
using Super = LOTHypothesis< this_t, _input_t, _output_t, _Grammar_t, grammar, _datum_t, _data_t, _VirtualMachineState_t >
 
using Super = LOTHypothesis< this_t, _input_t, _output_t, _Grammar_t, grammar, _datum_t, _data_t, _VirtualMachineState_t >
 
- Public Types inherited from DeterministicLOTHypothesis< InnerHypothesis, Utterance, TruthValue, MyGrammar,&grammar >
using Super = LOTHypothesis< InnerHypothesis, Utterance, TruthValue, MyGrammar, grammar, defaultdatum_t< Utterance, TruthValue >, std::vector< defaultdatum_t< Utterance, TruthValue > >, typename MyGrammar ::VirtualMachineState_t >
 
using input_t = Super::input_t
 
using output_t = Super::output_t
 
using call_output_t = output_t
 
using VirtualMachineState_t = Super::VirtualMachineState_t
 
- Public Types inherited from LOTHypothesis< InnerHypothesis, Utterance, TruthValue, MyGrammar, grammar, defaultdatum_t< Utterance, TruthValue >, std::vector< defaultdatum_t< Utterance, TruthValue > >, typename MyGrammar ::VirtualMachineState_t >
typedef Bayesable< defaultdatum_t< Utterance, TruthValue >, std::vector< defaultdatum_t< Utterance, TruthValue > > >::datum_t datum_t
 
typedef Bayesable< defaultdatum_t< Utterance, TruthValue >, std::vector< defaultdatum_t< Utterance, TruthValue > > >::data_t data_t
 
using Grammar_t = MyGrammar
 
using input_t = Utterance
 
using output_t = TruthValue
 
using VirtualMachineState_t = typename MyGrammar ::VirtualMachineState_t
 
using ProposalType = std::optional< std::pair< InnerHypothesis, double > >
 
- Public Types inherited from Bayesable< Args... >
typedef Args... datum_t
 
typedef std::vector< Args... > data_t
 
- Public Types inherited from DeterministicLOTHypothesis< InnerHypothesis, CL, CL, Combinators::SKGrammar,&Combinators::skgrammar >
using Super = LOTHypothesis< InnerHypothesis, CL, CL, Combinators::SKGrammar, grammar, defaultdatum_t< CL, CL >, std::vector< defaultdatum_t< CL, CL > >, typename Combinators::SKGrammar ::VirtualMachineState_t >
 
using input_t = Super::input_t
 
using output_t = Super::output_t
 
using call_output_t = output_t
 
using VirtualMachineState_t = Super::VirtualMachineState_t
 
- Public Types inherited from LOTHypothesis< InnerHypothesis, CL, CL, Combinators::SKGrammar, grammar, defaultdatum_t< CL, CL >, std::vector< defaultdatum_t< CL, CL > >, typename Combinators::SKGrammar ::VirtualMachineState_t >
typedef Bayesable< defaultdatum_t< CL, CL >, std::vector< defaultdatum_t< CL, CL > > >::datum_t datum_t
 
typedef Bayesable< defaultdatum_t< CL, CL >, std::vector< defaultdatum_t< CL, CL > > >::data_t data_t
 
using Grammar_t = Combinators::SKGrammar
 
using input_t = CL
 
using output_t = CL
 
using VirtualMachineState_t = typename Combinators::SKGrammar ::VirtualMachineState_t
 
using ProposalType = std::optional< std::pair< InnerHypothesis, double > >
 
- Public Types inherited from DeterministicLOTHypothesis< InnerHypothesis, BindingTree *, bool, MyGrammar,&grammar >
using Super = LOTHypothesis< InnerHypothesis, BindingTree *, bool, MyGrammar, grammar, defaultdatum_t< BindingTree *, bool >, std::vector< defaultdatum_t< BindingTree *, bool > >, typename MyGrammar ::VirtualMachineState_t >
 
using input_t = Super::input_t
 
using output_t = Super::output_t
 
using call_output_t = output_t
 
using VirtualMachineState_t = Super::VirtualMachineState_t
 
- Public Types inherited from LOTHypothesis< InnerHypothesis, BindingTree *, bool, MyGrammar, grammar, defaultdatum_t< BindingTree *, bool >, std::vector< defaultdatum_t< BindingTree *, bool > >, typename MyGrammar ::VirtualMachineState_t >
typedef Bayesable< defaultdatum_t< BindingTree *, bool >, std::vector< defaultdatum_t< BindingTree *, bool > > >::datum_t datum_t
 
typedef Bayesable< defaultdatum_t< BindingTree *, bool >, std::vector< defaultdatum_t< BindingTree *, bool > > >::data_t data_t
 
using Grammar_t = MyGrammar
 
using input_t = BindingTree *
 
using output_t = bool
 
using VirtualMachineState_t = typename MyGrammar ::VirtualMachineState_t
 
using ProposalType = std::optional< std::pair< InnerHypothesis, double > >
 

Public Member Functions

 InnerHypothesis (const InnerHypothesis &c)
 
 InnerHypothesis (const InnerHypothesis &&c)
 
InnerHypothesisoperator= (const InnerHypothesis &c)
 
InnerHypothesisoperator= (const InnerHypothesis &&c)
 
void set_value (Node &v)
 
void set_value (Node &&v)
 
virtual bool cached_call_wrapper (const defaultdatum_t< BindingTree *, std::string > &di) override
 This is how we access the data before calling – needed to say how this interfaces with the data. More...
 
virtual double compute_prior () override
 Compute the prior – defaultly just the PCFG (grammar) prior. More...
 
virtual std::optional< std::pair< InnerHypothesis, double > > propose () const override
 Default proposal is rational-rules style regeneration. More...
 
 InnerHypothesis (std::string s)
 
 InnerHypothesis (const InnerHypothesis &c)
 
 InnerHypothesis (const InnerHypothesis &&c)
 
InnerHypothesisoperator= (const InnerHypothesis &c)
 
InnerHypothesisoperator= (const InnerHypothesis &&c)
 
void set_value (Node &v)
 
void set_value (Node &&v)
 
virtual double compute_prior () override
 Compute the prior – defaultly just the PCFG (grammar) prior. More...
 
virtual ProposalType propose () const override
 Default proposal is rational-rules style regeneration. More...
 
double get_weight_fromcache () const
 This computes the weight of this factor from its cached values. More...
 
virtual TruthValue cached_call_wrapper (const Utterance &di) override
 This is how we access the data before calling – needed to say how this interfaces with the data. More...
 
- Public Member Functions inherited from DeterministicLOTHypothesis< InnerHypothesis, Utterance, TruthValue, MyGrammar,&grammar >
virtual output_t call (const input_t x, const output_t &err=output_t{})
 A variant of call that assumes no stochasticity and therefore outputs only a single value. (This uses a nullptr virtual machine pool, so will throw an error on flip) More...
 
- Public Member Functions inherited from LOTHypothesis< InnerHypothesis, Utterance, TruthValue, MyGrammar, grammar, defaultdatum_t< Utterance, TruthValue >, std::vector< defaultdatum_t< Utterance, TruthValue > >, typename MyGrammar ::VirtualMachineState_t >
 LOTHypothesis ()
 
 LOTHypothesis (Node &x)
 
 LOTHypothesis (Node &&x)
 
 LOTHypothesis (std::string s)
 
 LOTHypothesis (const LOTHypothesis &c)
 
 LOTHypothesis (const LOTHypothesis &&c)
 
LOTHypothesisoperator= (const LOTHypothesis &c)
 
LOTHypothesisoperator= (const LOTHypothesis &&c)
 
virtual InnerHypothesis restart () const override
 This is used to restart chains, sampling from prior but ONLY for nodes that are can_resample. More...
 
Nodeget_value ()
 
const Nodeget_value () const
 
void set_value (Node &v, bool should_compile=true)
 Set the value to v. (NOTE: This compiles into a program) More...
 
void set_value (Node &&v, bool should_compile=true)
 
Grammar_tget_grammar () const
 
virtual double compute_single_likelihood (const datum_t &datum) override
 
void compile ()
 
virtual void push_program (Program< VirtualMachineState_t > &s) override
 This puts the code from my node onto s. Used internally in e.g. recursion. More...
 
virtual std::string string (std::string prefix="") const override
 
virtual std::string string (std::string prefix, bool usedot) const
 
virtual size_t hash () const override
 
virtual bool operator== (const InnerHypothesis &h) const override
 Equality is checked on equality of values; note that greater-than is still on posteriors. More...
 
virtual void complete () override
 Modify this hypothesis's value by (randomly) filling in all the gaps. More...
 
virtual int neighbors () const override
 Count the number of neighbors that are possible. (This should be size_t but int is more convenient.) More...
 
virtual void expand_to_neighbor (int k) override
 Modify this hypothesis to become the k'th neighbor. NOTE This does not compile since it might not be complete. More...
 
virtual double neighbor_prior (int k) override
 What is the prior of the k'th neighbor? This does not need to return the full prior, only relative (among ks) More...
 
virtual bool is_evaluable () const override
 A node is "evaluable" if it is complete (meaning no null subnodes) More...
 
size_t recursion_count ()
 Count up how many times I use recursion – we keep a list of recursion here. More...
 
virtual std::string serialize () const override
 Convert this into a string which can be written to a file. More...
 
- Public Member Functions inherited from MCMCable< InnerHypothesis, defaultdatum_t< Utterance, TruthValue >, std::vector< defaultdatum_t< Utterance, TruthValue > > >
 MCMCable ()
 
virtual bool operator!= (const InnerHypothesis &h) const
 
- Public Member Functions inherited from Bayesable< Args... >
 Bayesable ()
 
virtual void clear_bayes ()
 
virtual double compute_likelihood (const data_t &data, const double breakout=-infinity)
 Compute the likelihood of a collection of data, by calling compute_single_likelihood on each. This stops if our likelihood falls below breakout. More...
 
virtual double compute_posterior (const data_t &data, const std::pair< double, double > breakoutpair=std::make_pair(-infinity, 1.0))
 Compute the posterior, by calling prior and likelihood. This includes only a little bit of fanciness, which is that if our prior is -inf, then we don't both computing the likelihood. More...
 
virtual double at_temperature (double t) const
 
auto operator (const Bayesable< datum_t, data_t > &other) const
 
virtual void show (std::string prefix="")
 
- Public Member Functions inherited from Searchable< InnerHypothesis, Utterance, TruthValue >
virtual InnerHypothesis make_neighbor (int k) const
 Return a new hypothesis which is the k'th neighbor (just calls expand_to_neighbor) NOTE This does not compile since it might not be complete. More...
 
- Public Member Functions inherited from ProgramLoader< typename MyGrammar ::VirtualMachineState_t >
virtual void push_program (Program< typename MyGrammar ::VirtualMachineState_t > &s, const short a)
 
virtual void push_program (Program< typename MyGrammar ::VirtualMachineState_t > &s, const int a)
 
virtual void push_program (Program< typename MyGrammar ::VirtualMachineState_t > &s, const std::string k)
 
- Public Member Functions inherited from CachedCallHypothesis< InnerHypothesis, Utterance, TruthValue >
 CachedCallHypothesis ()
 
void clear_cache ()
 
void cached_call (const std::vector< Utterance > &data, bool break_on_error=true)
 
- Public Member Functions inherited from DeterministicLOTHypothesis< InnerHypothesis, CL, CL, Combinators::SKGrammar,&Combinators::skgrammar >
virtual output_t call (const input_t x, const output_t &err=output_t{})
 A variant of call that assumes no stochasticity and therefore outputs only a single value. (This uses a nullptr virtual machine pool, so will throw an error on flip) More...
 
- Public Member Functions inherited from LOTHypothesis< InnerHypothesis, CL, CL, Combinators::SKGrammar, grammar, defaultdatum_t< CL, CL >, std::vector< defaultdatum_t< CL, CL > >, typename Combinators::SKGrammar ::VirtualMachineState_t >
 LOTHypothesis ()
 
 LOTHypothesis (Node &x)
 
 LOTHypothesis (Node &&x)
 
 LOTHypothesis (std::string s)
 
 LOTHypothesis (const LOTHypothesis &c)
 
 LOTHypothesis (const LOTHypothesis &&c)
 
LOTHypothesisoperator= (const LOTHypothesis &c)
 
LOTHypothesisoperator= (const LOTHypothesis &&c)
 
virtual InnerHypothesis restart () const override
 This is used to restart chains, sampling from prior but ONLY for nodes that are can_resample. More...
 
Nodeget_value ()
 
const Nodeget_value () const
 
void set_value (Node &v, bool should_compile=true)
 Set the value to v. (NOTE: This compiles into a program) More...
 
void set_value (Node &&v, bool should_compile=true)
 
Grammar_tget_grammar () const
 
virtual double compute_single_likelihood (const datum_t &datum) override
 
void compile ()
 
virtual void push_program (Program< VirtualMachineState_t > &s) override
 This puts the code from my node onto s. Used internally in e.g. recursion. More...
 
virtual std::string string (std::string prefix="") const override
 
virtual std::string string (std::string prefix, bool usedot) const
 
virtual size_t hash () const override
 
virtual bool operator== (const InnerHypothesis &h) const override
 Equality is checked on equality of values; note that greater-than is still on posteriors. More...
 
virtual void complete () override
 Modify this hypothesis's value by (randomly) filling in all the gaps. More...
 
virtual int neighbors () const override
 Count the number of neighbors that are possible. (This should be size_t but int is more convenient.) More...
 
virtual void expand_to_neighbor (int k) override
 Modify this hypothesis to become the k'th neighbor. NOTE This does not compile since it might not be complete. More...
 
virtual double neighbor_prior (int k) override
 What is the prior of the k'th neighbor? This does not need to return the full prior, only relative (among ks) More...
 
virtual bool is_evaluable () const override
 A node is "evaluable" if it is complete (meaning no null subnodes) More...
 
size_t recursion_count ()
 Count up how many times I use recursion – we keep a list of recursion here. More...
 
virtual std::string serialize () const override
 Convert this into a string which can be written to a file. More...
 
- Public Member Functions inherited from MCMCable< InnerHypothesis, defaultdatum_t< CL, CL >, std::vector< defaultdatum_t< CL, CL > > >
 MCMCable ()
 
virtual bool operator!= (const InnerHypothesis &h) const
 
- Public Member Functions inherited from Searchable< InnerHypothesis, CL, CL >
virtual InnerHypothesis make_neighbor (int k) const
 Return a new hypothesis which is the k'th neighbor (just calls expand_to_neighbor) NOTE This does not compile since it might not be complete. More...
 
- Public Member Functions inherited from ProgramLoader< typename Combinators::SKGrammar ::VirtualMachineState_t >
virtual void push_program (Program< typename Combinators::SKGrammar ::VirtualMachineState_t > &s, const short a)
 
virtual void push_program (Program< typename Combinators::SKGrammar ::VirtualMachineState_t > &s, const int a)
 
virtual void push_program (Program< typename Combinators::SKGrammar ::VirtualMachineState_t > &s, const std::string k)
 
- Public Member Functions inherited from DeterministicLOTHypothesis< InnerHypothesis, BindingTree *, bool, MyGrammar,&grammar >
virtual output_t call (const input_t x, const output_t &err=output_t{})
 A variant of call that assumes no stochasticity and therefore outputs only a single value. (This uses a nullptr virtual machine pool, so will throw an error on flip) More...
 
- Public Member Functions inherited from LOTHypothesis< InnerHypothesis, BindingTree *, bool, MyGrammar, grammar, defaultdatum_t< BindingTree *, bool >, std::vector< defaultdatum_t< BindingTree *, bool > >, typename MyGrammar ::VirtualMachineState_t >
 LOTHypothesis ()
 
 LOTHypothesis (Node &x)
 
 LOTHypothesis (Node &&x)
 
 LOTHypothesis (std::string s)
 
 LOTHypothesis (const LOTHypothesis &c)
 
 LOTHypothesis (const LOTHypothesis &&c)
 
LOTHypothesisoperator= (const LOTHypothesis &c)
 
LOTHypothesisoperator= (const LOTHypothesis &&c)
 
virtual InnerHypothesis restart () const override
 This is used to restart chains, sampling from prior but ONLY for nodes that are can_resample. More...
 
Nodeget_value ()
 
const Nodeget_value () const
 
void set_value (Node &v, bool should_compile=true)
 Set the value to v. (NOTE: This compiles into a program) More...
 
void set_value (Node &&v, bool should_compile=true)
 
Grammar_tget_grammar () const
 
virtual double compute_single_likelihood (const datum_t &datum) override
 
void compile ()
 
virtual void push_program (Program< VirtualMachineState_t > &s) override
 This puts the code from my node onto s. Used internally in e.g. recursion. More...
 
virtual std::string string (std::string prefix="") const override
 
virtual std::string string (std::string prefix, bool usedot) const
 
virtual size_t hash () const override
 
virtual bool operator== (const InnerHypothesis &h) const override
 Equality is checked on equality of values; note that greater-than is still on posteriors. More...
 
virtual void complete () override
 Modify this hypothesis's value by (randomly) filling in all the gaps. More...
 
virtual int neighbors () const override
 Count the number of neighbors that are possible. (This should be size_t but int is more convenient.) More...
 
virtual void expand_to_neighbor (int k) override
 Modify this hypothesis to become the k'th neighbor. NOTE This does not compile since it might not be complete. More...
 
virtual double neighbor_prior (int k) override
 What is the prior of the k'th neighbor? This does not need to return the full prior, only relative (among ks) More...
 
virtual bool is_evaluable () const override
 A node is "evaluable" if it is complete (meaning no null subnodes) More...
 
size_t recursion_count ()
 Count up how many times I use recursion – we keep a list of recursion here. More...
 
virtual std::string serialize () const override
 Convert this into a string which can be written to a file. More...
 
- Public Member Functions inherited from MCMCable< InnerHypothesis, defaultdatum_t< BindingTree *, bool >, std::vector< defaultdatum_t< BindingTree *, bool > > >
 MCMCable ()
 
virtual bool operator!= (const InnerHypothesis &h) const
 
- Public Member Functions inherited from Searchable< InnerHypothesis, BindingTree *, bool >
virtual InnerHypothesis make_neighbor (int k) const
 Return a new hypothesis which is the k'th neighbor (just calls expand_to_neighbor) NOTE This does not compile since it might not be complete. More...
 
- Public Member Functions inherited from CachedCallHypothesis< InnerHypothesis, defaultdatum_t< BindingTree *, std::string >, bool >
 CachedCallHypothesis ()
 
void clear_cache ()
 
void cached_call (const std::vector< defaultdatum_t< BindingTree *, std::string > > &data, bool break_on_error=true)
 

Public Attributes

const double MAX_NODES = 40
 
- Public Attributes inherited from LOTHypothesis< InnerHypothesis, Utterance, TruthValue, MyGrammar, grammar, defaultdatum_t< Utterance, TruthValue >, std::vector< defaultdatum_t< Utterance, TruthValue > >, typename MyGrammar ::VirtualMachineState_t >
unsigned long total_instruction_count_last_call
 
unsigned long total_vms_steps
 
Program< VirtualMachineState_tprogram
 
- Public Attributes inherited from Bayesable< Args... >
double prior
 
double likelihood
 
double posterior
 
uintmax_t born
 
size_t born_chain_idx
 
- Public Attributes inherited from ProgramLoader< typename MyGrammar ::VirtualMachineState_t >
bool was_called
 
- Public Attributes inherited from CachedCallHypothesis< InnerHypothesis, Utterance, TruthValue >
std::vector< TruthValuecache
 
bool got_error
 
- Public Attributes inherited from LOTHypothesis< InnerHypothesis, CL, CL, Combinators::SKGrammar, grammar, defaultdatum_t< CL, CL >, std::vector< defaultdatum_t< CL, CL > >, typename Combinators::SKGrammar ::VirtualMachineState_t >
unsigned long total_instruction_count_last_call
 
unsigned long total_vms_steps
 
Program< VirtualMachineState_tprogram
 
- Public Attributes inherited from ProgramLoader< typename Combinators::SKGrammar ::VirtualMachineState_t >
bool was_called
 
- Public Attributes inherited from LOTHypothesis< InnerHypothesis, BindingTree *, bool, MyGrammar, grammar, defaultdatum_t< BindingTree *, bool >, std::vector< defaultdatum_t< BindingTree *, bool > >, typename MyGrammar ::VirtualMachineState_t >
unsigned long total_instruction_count_last_call
 
unsigned long total_vms_steps
 
Program< VirtualMachineState_tprogram
 
- Public Attributes inherited from CachedCallHypothesis< InnerHypothesis, defaultdatum_t< BindingTree *, std::string >, bool >
std::vector< bool > cache
 
bool got_error
 

Additional Inherited Members

- Static Public Member Functions inherited from LOTHypothesis< InnerHypothesis, Utterance, TruthValue, MyGrammar, grammar, defaultdatum_t< Utterance, TruthValue >, std::vector< defaultdatum_t< Utterance, TruthValue > >, typename MyGrammar ::VirtualMachineState_t >
static InnerHypothesis sample ()
 
static InnerHypothesis from_string (Grammar_t *g, std::string s)
 
static InnerHypothesis deserialize (const std::string &s)
 Convert this from a string which was in a file. More...
 
- Static Public Member Functions inherited from MCMCable< InnerHypothesis, defaultdatum_t< Utterance, TruthValue >, std::vector< defaultdatum_t< Utterance, TruthValue > > >
static InnerHypothesis sample ()
 Static function for making a hypothesis. Be careful using this with references because they may not foward right (for reasons that are unclear to me) More...
 
- Static Public Member Functions inherited from Serializable< InnerHypothesis >
static InnerHypothesis deserialize (const std::string &)
 
- Static Public Member Functions inherited from LOTHypothesis< InnerHypothesis, CL, CL, Combinators::SKGrammar, grammar, defaultdatum_t< CL, CL >, std::vector< defaultdatum_t< CL, CL > >, typename Combinators::SKGrammar ::VirtualMachineState_t >
static InnerHypothesis sample ()
 
static InnerHypothesis from_string (Grammar_t *g, std::string s)
 
static InnerHypothesis deserialize (const std::string &s)
 Convert this from a string which was in a file. More...
 
- Static Public Member Functions inherited from MCMCable< InnerHypothesis, defaultdatum_t< CL, CL >, std::vector< defaultdatum_t< CL, CL > > >
static InnerHypothesis sample ()
 Static function for making a hypothesis. Be careful using this with references because they may not foward right (for reasons that are unclear to me) More...
 
- Static Public Member Functions inherited from LOTHypothesis< InnerHypothesis, BindingTree *, bool, MyGrammar, grammar, defaultdatum_t< BindingTree *, bool >, std::vector< defaultdatum_t< BindingTree *, bool > >, typename MyGrammar ::VirtualMachineState_t >
static InnerHypothesis sample ()
 
static InnerHypothesis from_string (Grammar_t *g, std::string s)
 
static InnerHypothesis deserialize (const std::string &s)
 Convert this from a string which was in a file. More...
 
- Static Public Member Functions inherited from MCMCable< InnerHypothesis, defaultdatum_t< BindingTree *, bool >, std::vector< defaultdatum_t< BindingTree *, bool > > >
static InnerHypothesis sample ()
 Static function for making a hypothesis. Be careful using this with references because they may not foward right (for reasons that are unclear to me) More...
 
- Static Public Attributes inherited from LOTHypothesis< InnerHypothesis, Utterance, TruthValue, MyGrammar, grammar, defaultdatum_t< Utterance, TruthValue >, std::vector< defaultdatum_t< Utterance, TruthValue > >, typename MyGrammar ::VirtualMachineState_t >
static const char SerializationDelimiter
 
static const size_t MAX_NODES
 
- Static Public Attributes inherited from LOTHypothesis< InnerHypothesis, CL, CL, Combinators::SKGrammar, grammar, defaultdatum_t< CL, CL >, std::vector< defaultdatum_t< CL, CL > >, typename Combinators::SKGrammar ::VirtualMachineState_t >
static const char SerializationDelimiter
 
static const size_t MAX_NODES
 
- Static Public Attributes inherited from LOTHypothesis< InnerHypothesis, BindingTree *, bool, MyGrammar, grammar, defaultdatum_t< BindingTree *, bool >, std::vector< defaultdatum_t< BindingTree *, bool > >, typename MyGrammar ::VirtualMachineState_t >
static const char SerializationDelimiter
 
static const size_t MAX_NODES
 
- Protected Attributes inherited from LOTHypothesis< InnerHypothesis, Utterance, TruthValue, MyGrammar, grammar, defaultdatum_t< Utterance, TruthValue >, std::vector< defaultdatum_t< Utterance, TruthValue > >, typename MyGrammar ::VirtualMachineState_t >
Node value
 
- Protected Attributes inherited from LOTHypothesis< InnerHypothesis, CL, CL, Combinators::SKGrammar, grammar, defaultdatum_t< CL, CL >, std::vector< defaultdatum_t< CL, CL > >, typename Combinators::SKGrammar ::VirtualMachineState_t >
Node value
 
- Protected Attributes inherited from LOTHypothesis< InnerHypothesis, BindingTree *, bool, MyGrammar, grammar, defaultdatum_t< BindingTree *, bool >, std::vector< defaultdatum_t< BindingTree *, bool > >, typename MyGrammar ::VirtualMachineState_t >
Node value
 

Detailed Description

Author
piantado
Date
04/05/20

Member Typedef Documentation

◆ CCH [1/2]

◆ CCH [2/2]

◆ data_t

◆ output_t

◆ Super [1/6]

◆ Super [2/6]

using DeterministicLOTHypothesis< this_t, _input_t, _output_t, _Grammar_t, grammar, _datum_t, _data_t, _VirtualMachineState_t >::Super = LOTHypothesis<this_t, _input_t, _output_t, _Grammar_t, grammar, _datum_t, _data_t, _VirtualMachineState_t>

◆ Super [3/6]

◆ Super [4/6]

using DeterministicLOTHypothesis< this_t, _input_t, _output_t, _Grammar_t, grammar, _datum_t, _data_t, _VirtualMachineState_t >::Super = LOTHypothesis<this_t, _input_t, _output_t, _Grammar_t, grammar, _datum_t, _data_t, _VirtualMachineState_t>

◆ Super [5/6]

◆ Super [6/6]

using DeterministicLOTHypothesis< this_t, _input_t, _output_t, _Grammar_t, grammar, _datum_t, _data_t, _VirtualMachineState_t >::Super = LOTHypothesis<this_t, _input_t, _output_t, _Grammar_t, grammar, _datum_t, _data_t, _VirtualMachineState_t>

Constructor & Destructor Documentation

◆ InnerHypothesis() [1/5]

InnerHypothesis::InnerHypothesis ( const InnerHypothesis c)
inline

◆ InnerHypothesis() [2/5]

InnerHypothesis::InnerHypothesis ( const InnerHypothesis &&  c)
inline

◆ InnerHypothesis() [3/5]

InnerHypothesis::InnerHypothesis ( std::string  s)
inline

◆ InnerHypothesis() [4/5]

InnerHypothesis::InnerHypothesis ( const InnerHypothesis c)
inline

◆ InnerHypothesis() [5/5]

InnerHypothesis::InnerHypothesis ( const InnerHypothesis &&  c)
inline

Member Function Documentation

◆ cached_call_wrapper() [1/2]

virtual bool InnerHypothesis::cached_call_wrapper ( const defaultdatum_t< BindingTree *, std::string > &  di)
inlineoverridevirtual

This is how we access the data before calling – needed to say how this interfaces with the data.

Parameters
di
Returns

Reimplemented from CachedCallHypothesis< InnerHypothesis, defaultdatum_t< BindingTree *, std::string >, bool >.

◆ cached_call_wrapper() [2/2]

virtual TruthValue InnerHypothesis::cached_call_wrapper ( const Utterance di)
inlineoverridevirtual

This is how we access the data before calling – needed to say how this interfaces with the data.

Parameters
di
Returns

Reimplemented from CachedCallHypothesis< InnerHypothesis, Utterance, TruthValue >.

◆ compute_prior() [1/2]

virtual double InnerHypothesis::compute_prior ( )
inlineoverridevirtual

◆ compute_prior() [2/2]

virtual double InnerHypothesis::compute_prior ( )
inlineoverridevirtual

◆ get_weight_fromcache()

double InnerHypothesis::get_weight_fromcache ( ) const
inline

This computes the weight of this factor from its cached values.

Returns

◆ operator=() [1/4]

◆ operator=() [2/4]

◆ operator=() [3/4]

◆ operator=() [4/4]

◆ propose() [1/2]

virtual ProposalType InnerHypothesis::propose ( ) const
inlineoverridevirtual

◆ propose() [2/2]

virtual std::optional<std::pair<InnerHypothesis,double> > InnerHypothesis::propose ( ) const
inlineoverridevirtual

◆ set_value() [1/4]

void InnerHypothesis::set_value ( Node v)
inline

◆ set_value() [2/4]

void InnerHypothesis::set_value ( Node &&  v)
inline

◆ set_value() [3/4]

void InnerHypothesis::set_value ( Node v)
inline

◆ set_value() [4/4]

void InnerHypothesis::set_value ( Node &&  v)
inline

Member Data Documentation

◆ MAX_NODES

const double InnerHypothesis::MAX_NODES = 40

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