fixed print/headers

release/4.3a0
Frank Dellaert 2012-05-22 17:58:03 +00:00
parent 69e91e32b6
commit 67892e59e0
3 changed files with 17 additions and 13 deletions

View File

@ -37,7 +37,7 @@ namespace gtsam {
/* ************************************************************************* */
template<class CONDITIONAL>
void BayesNet<CONDITIONAL>::print(const string& s) const {
cout << s << ":\n";
cout << s;
BOOST_REVERSE_FOREACH(sharedConditional conditional,conditionals_)
conditional->print();
}

View File

@ -18,8 +18,8 @@
#pragma once
#include <list>
#include <iostream>
#include <gtsam/nonlinear/Key.h>
#include <boost/mpl/char.hpp>
#include <boost/format.hpp>
#include <boost/serialization/nvp.hpp>
@ -28,7 +28,8 @@
#include <boost/lambda/construct.hpp>
#include <boost/lambda/lambda.hpp>
#include <gtsam/nonlinear/Key.h>
#include <list>
#include <iostream>
namespace gtsam {
@ -70,8 +71,8 @@ public:
j_ = key & indexMask;
}
/** Cast to integer */
operator Key() const {
/** return Key (integer) representation */
Key key() const {
const size_t keyBits = sizeof(Key) * 8;
const size_t chrBits = sizeof(unsigned char) * 8;
const size_t indexBits = keyBits - chrBits;
@ -83,9 +84,12 @@ public:
return key;
}
/** Cast to integer */
operator Key() const { return key(); }
// Testable Requirements
void print(const std::string& s = "") const {
std::cout << s << ": " << (std::string) (*this) << std::endl;
std::cout << s << (std::string) (*this) << std::endl;
}
bool equals(const Symbol& expected, double tol = 0.0) const {
return (*this) == expected;

View File

@ -24,8 +24,10 @@
#pragma once
#include <string>
#include <utility>
#include <gtsam/base/Value.h>
#include <gtsam/base/FastMap.h>
#include <gtsam/linear/VectorValues.h>
#include <gtsam/nonlinear/Ordering.h>
#include <boost/pool/pool_alloc.hpp>
#include <boost/ptr_container/ptr_map.hpp>
@ -37,10 +39,8 @@
#include <boost/iterator_adaptors.hpp>
#include <boost/lambda/lambda.hpp>
#include <gtsam/base/Value.h>
#include <gtsam/base/FastMap.h>
#include <gtsam/linear/VectorValues.h>
#include <gtsam/nonlinear/Ordering.h>
#include <string>
#include <utility>
namespace gtsam {