Revert "Improve namespace names"

This reverts commit 973df43fe0.

On a second thought, namespaces are close to classes in the sense that both encapsulate data, so they should both use Pascal case notation.
This commit is contained in:
Tiago Gomes
2013-02-08 21:01:53 +00:00
parent 264ef7a067
commit 6a1a209ee3
33 changed files with 381 additions and 382 deletions

View File

@@ -47,7 +47,7 @@ main (int argc, const char* argv[])
if (horus::FactorGraph::printFactorGraph()) {
fg.print();
}
if (horus::globals::verbosity > 0) {
if (horus::Globals::verbosity > 0) {
std::cout << "factor graph contains " ;
std::cout << fg.nrVarNodes() << " variables and " ;
std::cout << fg.nrFacNodes() << " factors " << std::endl;
@@ -80,7 +80,7 @@ readHorusFlags (int argc, const char* argv[])
std::cerr << USAGE << std::endl;
exit (EXIT_FAILURE);
}
horus::util::setHorusFlag (leftArg, rightArg);
horus::Util::setHorusFlag (leftArg, rightArg);
}
return i + 1;
}
@@ -116,13 +116,13 @@ readQueryAndEvidence (
for (int i = start; i < argc; i++) {
const std::string& arg = argv[i];
if (arg.find ('=') == std::string::npos) {
if (horus::util::isInteger (arg) == false) {
if (horus::Util::isInteger (arg) == false) {
std::cerr << "Error: `" << arg << "' " ;
std::cerr << "is not a variable id." ;
std::cerr << std::endl;
exit (EXIT_FAILURE);
}
horus::VarId vid = horus::util::stringToUnsigned (arg);
horus::VarId vid = horus::Util::stringToUnsigned (arg);
horus::VarNode* queryVar = fg.getVarNode (vid);
if (queryVar == false) {
std::cerr << "Error: unknow variable with id " ;
@@ -139,12 +139,12 @@ readQueryAndEvidence (
std::cerr << USAGE << std::endl;
exit (EXIT_FAILURE);
}
if (horus::util::isInteger (leftArg) == false) {
if (horus::Util::isInteger (leftArg) == false) {
std::cerr << "Error: `" << leftArg << "' " ;
std::cerr << "is not a variable id." << std::endl;
exit (EXIT_FAILURE);
}
horus::VarId vid = horus::util::stringToUnsigned (leftArg);
horus::VarId vid = horus::Util::stringToUnsigned (leftArg);
horus::VarNode* observedVar = fg.getVarNode (vid);
if (observedVar == false) {
std::cerr << "Error: unknow variable with id " ;
@@ -156,12 +156,12 @@ readQueryAndEvidence (
std::cerr << USAGE << std::endl;
exit (EXIT_FAILURE);
}
if (horus::util::isInteger (rightArg) == false) {
if (horus::Util::isInteger (rightArg) == false) {
std::cerr << "Error: `" << rightArg << "' " ;
std::cerr << "is not a state index." << std::endl;
exit (EXIT_FAILURE);
}
unsigned stateIdx = horus::util::stringToUnsigned (rightArg);
unsigned stateIdx = horus::Util::stringToUnsigned (rightArg);
if (observedVar->isValidState (stateIdx) == false) {
std::cerr << "Error: `" << stateIdx << "' " ;
std::cerr << "is not a valid state index for variable with id " ;
@@ -182,7 +182,7 @@ runSolver (
const horus::VarIds& queryIds)
{
horus::GroundSolver* solver = 0;
switch (horus::globals::groundSolver) {
switch (horus::Globals::groundSolver) {
case horus::GroundSolverType::VE:
solver = new horus::VarElim (fg);
break;
@@ -195,7 +195,7 @@ runSolver (
default:
assert (false);
}
if (horus::globals::verbosity > 0) {
if (horus::Globals::verbosity > 0) {
solver->printSolverFlags();
std::cout << std::endl;
}