Skip to content

Commit

Permalink
Naming convensions
Browse files Browse the repository at this point in the history
  • Loading branch information
cindycia committed May 21, 2018
1 parent cc7a56c commit e342f78
Show file tree
Hide file tree
Showing 19 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion examples/cpp_models/adventurer/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ class MyPlanner: public Planner {
};

int main(int argc, char* argv[]) {
return MyPlanner().runEvaluation(argc, argv);
return MyPlanner().RunEvaluation(argc, argv);
}

2 changes: 1 addition & 1 deletion examples/cpp_models/bridge/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ class MyPlanner: public Planner {
};

int main(int argc, char* argv[]) {
return MyPlanner().runEvaluation(argc, argv);
return MyPlanner().RunEvaluation(argc, argv);
}
2 changes: 1 addition & 1 deletion examples/cpp_models/chain/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ class MyPlanner: public Planner {
};

int main(int argc, char* argv[]) {
return MyPlanner().runEvaluation(argc, argv);
return MyPlanner().RunEvaluation(argc, argv);
}
2 changes: 1 addition & 1 deletion examples/cpp_models/navigation/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class MyPlanner: public Planner {
};

int main(int argc, char* argv[]) {
return MyPlanner().runEvaluation(argc, argv);
return MyPlanner().RunEvaluation(argc, argv);
}


2 changes: 1 addition & 1 deletion examples/cpp_models/pocman/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ class MyPlanner: public Planner {
};

int main(int argc, char* argv[]) {
return MyPlanner().runEvaluation(argc, argv);
return MyPlanner().RunEvaluation(argc, argv);
}
2 changes: 1 addition & 1 deletion examples/cpp_models/reg_demo/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class MyPlanner: public Planner {
};

int main(int argc, char* argv[]) {
return MyPlanner().runEvaluation(argc, argv);
return MyPlanner().RunEvaluation(argc, argv);
}


2 changes: 1 addition & 1 deletion examples/cpp_models/rock_sample/src/fvrs/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ class MyPlanner: public Planner {
};

int main(int argc, char* argv[]) {
return MyPlanner().runEvaluation(argc, argv);
return MyPlanner().RunEvaluation(argc, argv);
}

2 changes: 1 addition & 1 deletion examples/cpp_models/rock_sample/src/rock_sample/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ class MyPlanner: public Planner {
};

int main(int argc, char* argv[]) {
return MyPlanner().runEvaluation(argc, argv);
return MyPlanner().RunEvaluation(argc, argv);
}
2 changes: 1 addition & 1 deletion examples/cpp_models/simple_rock_sample/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ class MyPlanner: public Planner {
};

int main(int argc, char* argv[]) {
return MyPlanner().runEvaluation(argc, argv);
return MyPlanner().RunEvaluation(argc, argv);
}
2 changes: 1 addition & 1 deletion examples/cpp_models/tag/src/laser_tag/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ class MyPlanner: public Planner {
};

int main(int argc, char* argv[]) {
return MyPlanner().runEvaluation(argc, argv);
return MyPlanner().RunEvaluation(argc, argv);
}
2 changes: 1 addition & 1 deletion examples/cpp_models/tag/src/noisy_laser_tag/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ class MyPlanner: public Planner {
};

int main(int argc, char* argv[]) {
return MyPlanner().runEvaluation(argc, argv);
return MyPlanner().RunEvaluation(argc, argv);
}
2 changes: 1 addition & 1 deletion examples/cpp_models/tag/src/tag/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ int main(int argc, char* argv[]) {
return MyPlanner("w/o base lower bounds: TRIVIAL; with base lower bounds: RANDOM, SHR, MODE-MDP, MODE-SP, MAJORITY-MDP, MAJORITY-SP (default to MODE-MDP)",
"TRIVIAL (default)",
"w/o base lower bounds: TRIVIAL, MDP, SP, MANHATTAN; with base lower bounds: LOOKAHEAD -- default to SP",
"TRIVIAL, MDP, SP, MANHATTAN (default to SP)").runEvaluation(argc, argv);
"TRIVIAL, MDP, SP, MANHATTAN (default to SP)").RunEvaluation(argc, argv);
}
2 changes: 1 addition & 1 deletion examples/cpp_models/tiger/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ class MyPlanner: public Planner {
};

int main(int argc, char* argv[]) {
return MyPlanner().runEvaluation(argc, argv);
return MyPlanner().RunEvaluation(argc, argv);
}
2 changes: 1 addition & 1 deletion examples/pomdpx_models/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ class MyPlanner: public Planner {
};

int main(int argc, char* argv[]) {
return MyPlanner().runEvaluation(argc, argv);
return MyPlanner().RunEvaluation(argc, argv);
}
6 changes: 3 additions & 3 deletions include/despot/planner.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ class Planner: public PlannerBase {
/**
* Perform one search-execute-update step
*/
virtual bool runStep(Solver* solver, World* world, Logger* logger);
virtual bool RunStep(Solver* solver, World* world, Logger* logger);

/**
* Run POMDP planning till terminal reached or time out
*/
virtual int runPlanning(int argc, char* argv[]);
virtual int RunPlanning(int argc, char* argv[]);

/**
* Loop the search-execute-update process for a given number of steps
Expand All @@ -42,7 +42,7 @@ class Planner: public PlannerBase {
/**
* Run and evaluate POMDP planning for a given number of rounds
*/
virtual int runEvaluation(int argc, char* argv[]);
virtual int RunEvaluation(int argc, char* argv[]);

/**
* Evaluate the planner by repeating a test problem for multiple trials
Expand Down
4 changes: 2 additions & 2 deletions include/despot/plannerbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ using namespace std;

namespace despot {

void disableBufferedIO(void);
void DisableBufferedIO(void);

enum OptionIndex {
E_UNKNOWN,
Expand Down Expand Up @@ -55,7 +55,7 @@ enum OptionIndex {
E_LOG,
};

option::Descriptor* buildUsage(string lower_bounds_str,
option::Descriptor* BuildUsage(string lower_bounds_str,
string base_lower_bounds_str, string upper_bounds_str,
string base_upper_bounds_str);

Expand Down
2 changes: 1 addition & 1 deletion src/evaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void Planner::EvaluationLoop(DSPOMDP *model, World* world, Belief* belief,
}
}

int Planner::runEvaluation(int argc, char *argv[]) {
int Planner::RunEvaluation(int argc, char *argv[]) {

/* =========================
* initialize parameters
Expand Down
6 changes: 3 additions & 3 deletions src/planner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Planner::~Planner() {
}


bool Planner::runStep(Solver* solver, World* world, Logger* logger) {
bool Planner::RunStep(Solver* solver, World* world, Logger* logger) {

logger->CheckTargetTime();

Expand Down Expand Up @@ -56,13 +56,13 @@ bool Planner::runStep(Solver* solver, World* world, Logger* logger) {

void Planner::PlanningLoop(Solver*& solver, World* world, Logger* logger) {
for (int i = 0; i < Globals::config.sim_len; i++) {
bool terminal = runStep(solver, world, logger);
bool terminal = RunStep(solver, world, logger);
if (terminal)
break;
}
}

int Planner::runPlanning(int argc, char *argv[]) {
int Planner::RunPlanning(int argc, char *argv[]) {

/* =========================
* initialize parameters
Expand Down
6 changes: 3 additions & 3 deletions src/plannerbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ using namespace std;

namespace despot {

void disableBufferedIO(void) {
void DisableBufferedIO(void) {
setbuf(stdout, NULL);
setbuf(stdin, NULL);
setbuf(stderr, NULL);
Expand All @@ -16,7 +16,7 @@ void disableBufferedIO(void) {
setvbuf(stderr, NULL, _IONBF, 0);
}

option::Descriptor* buildUsage(string lower_bounds_str,
option::Descriptor* BuildUsage(string lower_bounds_str,
string base_lower_bounds_str, string upper_bounds_str,
string base_upper_bounds_str) {
static string lb_str =
Expand Down Expand Up @@ -95,7 +95,7 @@ option::Descriptor* buildUsage(string lower_bounds_str,

PlannerBase::PlannerBase(string lower_bounds_str, string base_lower_bounds_str,
string upper_bounds_str, string base_upper_bounds_str) {
usage = buildUsage(lower_bounds_str, base_lower_bounds_str,
usage = BuildUsage(lower_bounds_str, base_lower_bounds_str,
upper_bounds_str, base_upper_bounds_str);
}

Expand Down

0 comments on commit e342f78

Please sign in to comment.