World.h
World(unsigned int numProps)
Initializes a world with a given number of propositions.
Definition: World.cpp:8
A class to represent an assignment of boolean values to propositions. A World can be partially restri...
Definition: World.h:51
bool operator==(const World &w) const
Returns whether this World is equivalent to a given World, by comparing their truth assignment maps...
Definition: World.cpp:59
unsigned int numProps(void) const
Returns the number of propositions declared for this World. Not all of the propositions have necessar...
Definition: World.cpp:25
bool satisfies(const World &w) const
Returns whether this World propositionally satisfies a given World w. Specifically, returns true iff for every proposition p assigned in w, p is assigned in this World and this[p] == w[p].
Definition: World.cpp:30
std::string formula(void) const
Returns a formatted string representation of this World, as a conjunction of literals.
Definition: World.cpp:42
bool operator[](unsigned int i) const
Returns the boolean value of a given proposition in this World. Reports an error if the proposition h...
Definition: World.cpp:12
const boost::unordered_map< unsigned int, bool > & props(void) const
Returns this World's underlying proposition-to-boolean assignment map.
Definition: World.cpp:54