Fleet  0.0.9
Inference in the LOT
Public Member Functions | List of all members
Searchable< this_t, Args > Class Template Referenceabstract

#include <Searchable.h>

Public Member Functions

virtual int neighbors () const =0
 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)=0
 Modify this hypothesis to become the k'th neighbor. NOTE This does not compile since it might not be complete. More...
 
virtual this_t 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...
 
virtual double neighbor_prior (int k)=0
 What is the prior of the k'th neighbor? This does not need to return the full prior, only relative (among ks) More...
 
virtual void complete ()=0
 Fill in all the holes in this hypothesis, at random, modifying self. NOTE for LOTHypotheses this will also compile, which is what we need to do for a LOTHypothesis. More...
 
virtual bool is_evaluable () const =0
 Check if we can evaluate this node (meaning compute a prior and posterior). NOTE that this is not the same as whether it has zero neighbors, since lexica might have neighbors but be evalable. More...
 

Detailed Description

template<typename this_t, typename... Args>
class Searchable< this_t, Args >

Author
steven piantadosi
Date
03/02/20

Member Function Documentation

◆ complete()

template<typename this_t, typename... Args>
virtual void Searchable< this_t, Args >::complete ( )
pure virtual

Fill in all the holes in this hypothesis, at random, modifying self. NOTE for LOTHypotheses this will also compile, which is what we need to do for a LOTHypothesis.

Implemented in Lexicon< this_t, _key_t, INNER, _input_t, _output_t, datum_t, _VirtualMachineState_t >, LOTHypothesis< this_t, _input_t, _output_t, _Grammar_t, grammar, _datum_t, _data_t, _VirtualMachineState_t >, Lexicon< MyHypothesis, std::string, InnerHypothesis, BindingTree *, std::string >, Lexicon< MyHypothesis, S, InnerHypothesis, CL, CL, CLDatum >, Lexicon< MyHypothesis, std::string, InnerHypothesis, ignore_t, ignore_t, Utterance >, LOTHypothesis< MyHypothesis, S, S, MyGrammar, grammar, defaultdatum_t< S, S >, std::vector< defaultdatum_t< S, S > >, typename MyGrammar ::VirtualMachineState_t >, LOTHypothesis< InnerHypothesis, BindingTree *, bool, MyGrammar, grammar, defaultdatum_t< BindingTree *, bool >, std::vector< defaultdatum_t< BindingTree *, bool > >, typename MyGrammar ::VirtualMachineState_t >, LOTHypothesis< MyHypothesis, utterance, word, MyGrammar, grammar, defaultdatum_t< utterance, word >, std::vector< defaultdatum_t< utterance, word > >, typename MyGrammar ::VirtualMachineState_t >, LOTHypothesis< InnerHypothesis, CL, CL, Combinators::SKGrammar, grammar, defaultdatum_t< CL, CL >, std::vector< defaultdatum_t< CL, CL > >, typename Combinators::SKGrammar ::VirtualMachineState_t >, LOTHypothesis< MyHypothesis, int, NumberSet, MyGrammar, grammar, std::multiset< int >, std::vector< std::multiset< int > >, typename MyGrammar ::VirtualMachineState_t >, LOTHypothesis< InnerHypothesis, Utterance, TruthValue, MyGrammar, grammar, defaultdatum_t< Utterance, TruthValue >, std::vector< defaultdatum_t< Utterance, TruthValue > >, typename MyGrammar ::VirtualMachineState_t >, and LOTHypothesis< MyHypothesis, set, word, MyGrammar, grammar, defaultdatum_t< set, word >, std::vector< defaultdatum_t< set, word > >, typename MyGrammar ::VirtualMachineState_t >.

◆ expand_to_neighbor()

template<typename this_t, typename... Args>
virtual void Searchable< this_t, Args >::expand_to_neighbor ( int  k)
pure virtual

Modify this hypothesis to become the k'th neighbor. NOTE This does not compile since it might not be complete.

Parameters
k

Implemented in Lexicon< this_t, _key_t, INNER, _input_t, _output_t, datum_t, _VirtualMachineState_t >, Lexicon< MyHypothesis, std::string, InnerHypothesis, BindingTree *, std::string >, Lexicon< MyHypothesis, S, InnerHypothesis, CL, CL, CLDatum >, Lexicon< MyHypothesis, std::string, InnerHypothesis, ignore_t, ignore_t, Utterance >, LOTHypothesis< this_t, _input_t, _output_t, _Grammar_t, grammar, _datum_t, _data_t, _VirtualMachineState_t >, LOTHypothesis< MyHypothesis, S, S, MyGrammar, grammar, defaultdatum_t< S, S >, std::vector< defaultdatum_t< S, S > >, typename MyGrammar ::VirtualMachineState_t >, LOTHypothesis< InnerHypothesis, BindingTree *, bool, MyGrammar, grammar, defaultdatum_t< BindingTree *, bool >, std::vector< defaultdatum_t< BindingTree *, bool > >, typename MyGrammar ::VirtualMachineState_t >, LOTHypothesis< MyHypothesis, utterance, word, MyGrammar, grammar, defaultdatum_t< utterance, word >, std::vector< defaultdatum_t< utterance, word > >, typename MyGrammar ::VirtualMachineState_t >, LOTHypothesis< InnerHypothesis, CL, CL, Combinators::SKGrammar, grammar, defaultdatum_t< CL, CL >, std::vector< defaultdatum_t< CL, CL > >, typename Combinators::SKGrammar ::VirtualMachineState_t >, LOTHypothesis< MyHypothesis, int, NumberSet, MyGrammar, grammar, std::multiset< int >, std::vector< std::multiset< int > >, typename MyGrammar ::VirtualMachineState_t >, LOTHypothesis< InnerHypothesis, Utterance, TruthValue, MyGrammar, grammar, defaultdatum_t< Utterance, TruthValue >, std::vector< defaultdatum_t< Utterance, TruthValue > >, typename MyGrammar ::VirtualMachineState_t >, and LOTHypothesis< MyHypothesis, set, word, MyGrammar, grammar, defaultdatum_t< set, word >, std::vector< defaultdatum_t< set, word > >, typename MyGrammar ::VirtualMachineState_t >.

◆ is_evaluable()

template<typename this_t, typename... Args>
virtual bool Searchable< this_t, Args >::is_evaluable ( ) const
pure virtual

Check if we can evaluate this node (meaning compute a prior and posterior). NOTE that this is not the same as whether it has zero neighbors, since lexica might have neighbors but be evalable.

Implemented in Lexicon< this_t, _key_t, INNER, _input_t, _output_t, datum_t, _VirtualMachineState_t >, Lexicon< MyHypothesis, std::string, InnerHypothesis, BindingTree *, std::string >, Lexicon< MyHypothesis, S, InnerHypothesis, CL, CL, CLDatum >, Lexicon< MyHypothesis, std::string, InnerHypothesis, ignore_t, ignore_t, Utterance >, LOTHypothesis< this_t, _input_t, _output_t, _Grammar_t, grammar, _datum_t, _data_t, _VirtualMachineState_t >, LOTHypothesis< MyHypothesis, S, S, MyGrammar, grammar, defaultdatum_t< S, S >, std::vector< defaultdatum_t< S, S > >, typename MyGrammar ::VirtualMachineState_t >, LOTHypothesis< InnerHypothesis, BindingTree *, bool, MyGrammar, grammar, defaultdatum_t< BindingTree *, bool >, std::vector< defaultdatum_t< BindingTree *, bool > >, typename MyGrammar ::VirtualMachineState_t >, LOTHypothesis< MyHypothesis, utterance, word, MyGrammar, grammar, defaultdatum_t< utterance, word >, std::vector< defaultdatum_t< utterance, word > >, typename MyGrammar ::VirtualMachineState_t >, LOTHypothesis< InnerHypothesis, CL, CL, Combinators::SKGrammar, grammar, defaultdatum_t< CL, CL >, std::vector< defaultdatum_t< CL, CL > >, typename Combinators::SKGrammar ::VirtualMachineState_t >, LOTHypothesis< MyHypothesis, int, NumberSet, MyGrammar, grammar, std::multiset< int >, std::vector< std::multiset< int > >, typename MyGrammar ::VirtualMachineState_t >, LOTHypothesis< InnerHypothesis, Utterance, TruthValue, MyGrammar, grammar, defaultdatum_t< Utterance, TruthValue >, std::vector< defaultdatum_t< Utterance, TruthValue > >, typename MyGrammar ::VirtualMachineState_t >, and LOTHypothesis< MyHypothesis, set, word, MyGrammar, grammar, defaultdatum_t< set, word >, std::vector< defaultdatum_t< set, word > >, typename MyGrammar ::VirtualMachineState_t >.

◆ make_neighbor()

template<typename this_t, typename... Args>
virtual this_t Searchable< this_t, Args >::make_neighbor ( int  k) const
inlinevirtual

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.

Parameters
k
Returns

◆ neighbor_prior()

template<typename this_t, typename... Args>
virtual double Searchable< this_t, Args >::neighbor_prior ( int  k)
pure virtual

What is the prior of the k'th neighbor? This does not need to return the full prior, only relative (among ks)

Parameters
k

Implemented in Lexicon< this_t, _key_t, INNER, _input_t, _output_t, datum_t, _VirtualMachineState_t >, Lexicon< MyHypothesis, std::string, InnerHypothesis, BindingTree *, std::string >, Lexicon< MyHypothesis, S, InnerHypothesis, CL, CL, CLDatum >, Lexicon< MyHypothesis, std::string, InnerHypothesis, ignore_t, ignore_t, Utterance >, LOTHypothesis< this_t, _input_t, _output_t, _Grammar_t, grammar, _datum_t, _data_t, _VirtualMachineState_t >, LOTHypothesis< MyHypothesis, S, S, MyGrammar, grammar, defaultdatum_t< S, S >, std::vector< defaultdatum_t< S, S > >, typename MyGrammar ::VirtualMachineState_t >, LOTHypothesis< InnerHypothesis, BindingTree *, bool, MyGrammar, grammar, defaultdatum_t< BindingTree *, bool >, std::vector< defaultdatum_t< BindingTree *, bool > >, typename MyGrammar ::VirtualMachineState_t >, LOTHypothesis< MyHypothesis, utterance, word, MyGrammar, grammar, defaultdatum_t< utterance, word >, std::vector< defaultdatum_t< utterance, word > >, typename MyGrammar ::VirtualMachineState_t >, LOTHypothesis< InnerHypothesis, CL, CL, Combinators::SKGrammar, grammar, defaultdatum_t< CL, CL >, std::vector< defaultdatum_t< CL, CL > >, typename Combinators::SKGrammar ::VirtualMachineState_t >, LOTHypothesis< MyHypothesis, int, NumberSet, MyGrammar, grammar, std::multiset< int >, std::vector< std::multiset< int > >, typename MyGrammar ::VirtualMachineState_t >, LOTHypothesis< InnerHypothesis, Utterance, TruthValue, MyGrammar, grammar, defaultdatum_t< Utterance, TruthValue >, std::vector< defaultdatum_t< Utterance, TruthValue > >, typename MyGrammar ::VirtualMachineState_t >, and LOTHypothesis< MyHypothesis, set, word, MyGrammar, grammar, defaultdatum_t< set, word >, std::vector< defaultdatum_t< set, word > >, typename MyGrammar ::VirtualMachineState_t >.

◆ neighbors()

template<typename this_t, typename... Args>
virtual int Searchable< this_t, Args >::neighbors ( ) const
pure virtual

Count the number of neighbors that are possible. (This should be size_t but int is more convenient.)

Implemented in Lexicon< this_t, _key_t, INNER, _input_t, _output_t, datum_t, _VirtualMachineState_t >, Lexicon< MyHypothesis, std::string, InnerHypothesis, BindingTree *, std::string >, Lexicon< MyHypothesis, S, InnerHypothesis, CL, CL, CLDatum >, Lexicon< MyHypothesis, std::string, InnerHypothesis, ignore_t, ignore_t, Utterance >, LOTHypothesis< this_t, _input_t, _output_t, _Grammar_t, grammar, _datum_t, _data_t, _VirtualMachineState_t >, LOTHypothesis< MyHypothesis, S, S, MyGrammar, grammar, defaultdatum_t< S, S >, std::vector< defaultdatum_t< S, S > >, typename MyGrammar ::VirtualMachineState_t >, LOTHypothesis< InnerHypothesis, BindingTree *, bool, MyGrammar, grammar, defaultdatum_t< BindingTree *, bool >, std::vector< defaultdatum_t< BindingTree *, bool > >, typename MyGrammar ::VirtualMachineState_t >, LOTHypothesis< MyHypothesis, utterance, word, MyGrammar, grammar, defaultdatum_t< utterance, word >, std::vector< defaultdatum_t< utterance, word > >, typename MyGrammar ::VirtualMachineState_t >, LOTHypothesis< InnerHypothesis, CL, CL, Combinators::SKGrammar, grammar, defaultdatum_t< CL, CL >, std::vector< defaultdatum_t< CL, CL > >, typename Combinators::SKGrammar ::VirtualMachineState_t >, LOTHypothesis< MyHypothesis, int, NumberSet, MyGrammar, grammar, std::multiset< int >, std::vector< std::multiset< int > >, typename MyGrammar ::VirtualMachineState_t >, LOTHypothesis< InnerHypothesis, Utterance, TruthValue, MyGrammar, grammar, defaultdatum_t< Utterance, TruthValue >, std::vector< defaultdatum_t< Utterance, TruthValue > >, typename MyGrammar ::VirtualMachineState_t >, and LOTHypothesis< MyHypothesis, set, word, MyGrammar, grammar, defaultdatum_t< set, word >, std::vector< defaultdatum_t< set, word > >, typename MyGrammar ::VirtualMachineState_t >.


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