Created
January 3, 2017 16:10
-
-
Save brlauuu/5e201942ba20591809025d98c6eaf400 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "states.h" | |
#include "evaluatables.h" | |
#include <sstream> | |
using namespace std; | |
State::State(vector<ConditionalProbabilityFunction*> const& cpfs) { | |
for (unsigned int i = 0; i < cpfs.size(); ++i) { | |
state.push_back(cpfs[i]->getInitialValue()); | |
} | |
} | |
void State::print(ostream& out) const { | |
for (unsigned int index = 0; index < state.size(); ++index) { | |
out << state[index] << " "; | |
} | |
out << endl; | |
} | |
string ActionState::getName() const { | |
if (scheduledActionFluents.empty()) { | |
return "noop"; | |
} | |
stringstream name; | |
for (unsigned int i = 0; i < scheduledActionFluents.size(); ++i) { | |
name << scheduledActionFluents[i]->fullName << " "; | |
} | |
return name.str(); | |
} | |
void ActionState::print(ostream& out) const { | |
for (unsigned int index = 0; index < state.size(); ++index) { | |
out << state[index] << " "; | |
} | |
out << endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment