Fixed errors when compiling with clang++
parent
ab0ed918f4
commit
247005f83c
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
namespace gtsam {
|
namespace gtsam {
|
||||||
|
|
||||||
class SharedDiagonal;
|
struct SharedDiagonal;
|
||||||
|
|
||||||
/** unnormalized error */
|
/** unnormalized error */
|
||||||
template<class FACTOR>
|
template<class FACTOR>
|
||||||
|
|
|
@ -32,7 +32,7 @@ namespace gtsam {
|
||||||
|
|
||||||
// Forward declarations
|
// Forward declarations
|
||||||
class JacobianFactor;
|
class JacobianFactor;
|
||||||
class SharedDiagonal;
|
struct SharedDiagonal;
|
||||||
class GaussianConditional;
|
class GaussianConditional;
|
||||||
template<class C> class BayesNet;
|
template<class C> class BayesNet;
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
namespace gtsam {
|
namespace gtsam {
|
||||||
|
|
||||||
class SharedDiagonal; // forward declare
|
struct SharedDiagonal; // forward declare
|
||||||
|
|
||||||
namespace noiseModel {
|
namespace noiseModel {
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ namespace gtsam {
|
||||||
* |y|^2 = y'*y = x'*R'*R*x
|
* |y|^2 = y'*y = x'*R'*R*x
|
||||||
* Various derived classes are available that are more efficient.
|
* Various derived classes are available that are more efficient.
|
||||||
*/
|
*/
|
||||||
struct Gaussian: public Base {
|
class Gaussian: public Base {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|
|
@ -240,7 +240,7 @@ inline Vector VectorValues::range(const ITERATOR& idx_begin, const ITERATOR& idx
|
||||||
for (ITERATOR it=idx_begin; it!=idx_end; ++it) {
|
for (ITERATOR it=idx_begin; it!=idx_end; ++it) {
|
||||||
ConstSubVector v = (*this)[*it];
|
ConstSubVector v = (*this)[*it];
|
||||||
const size_t d = v.size();
|
const size_t d = v.size();
|
||||||
result.segment(start, d) = v;
|
result.segment(start, d).operator=(v); // This syntax works around what seems to be a bug in clang++
|
||||||
start += d;
|
start += d;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -69,7 +69,7 @@ public:
|
||||||
return C;
|
return C;
|
||||||
}
|
}
|
||||||
const char* c_str() const {
|
const char* c_str() const {
|
||||||
return (std::string) (*this).c_str();
|
return ((std::string) (*this)).c_str();
|
||||||
}
|
}
|
||||||
operator std::string() const {
|
operator std::string() const {
|
||||||
return (boost::format("%c%d") % C % j_).str();
|
return (boost::format("%c%d") % C % j_).str();
|
||||||
|
@ -290,7 +290,7 @@ public:
|
||||||
return label_;
|
return label_;
|
||||||
}
|
}
|
||||||
const char* c_str() const {
|
const char* c_str() const {
|
||||||
return (std::string) (*this).c_str();
|
return ((std::string)(*this)).c_str();
|
||||||
}
|
}
|
||||||
operator std::string() const {
|
operator std::string() const {
|
||||||
std::string label_s = (boost::format("%1%") % label_).str();
|
std::string label_s = (boost::format("%1%") % label_).str();
|
||||||
|
|
|
@ -74,19 +74,19 @@ namespace gtsam {
|
||||||
/**
|
/**
|
||||||
* Constructor - forces exact evaluation
|
* Constructor - forces exact evaluation
|
||||||
*/
|
*/
|
||||||
NonlinearEquality(const KEY& j, const T& feasible, bool (*compare)(const T&, const T&) = compare<T>) :
|
NonlinearEquality(const KEY& j, const T& feasible, bool (*_compare)(const T&, const T&) = compare<T>) :
|
||||||
Base(noiseModel::Constrained::All(feasible.dim()), j), feasible_(feasible),
|
Base(noiseModel::Constrained::All(feasible.dim()), j), feasible_(feasible),
|
||||||
allow_error_(false), error_gain_(0.0),
|
allow_error_(false), error_gain_(0.0),
|
||||||
compare_(compare) {
|
compare_(_compare) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor - allows inexact evaluation
|
* Constructor - allows inexact evaluation
|
||||||
*/
|
*/
|
||||||
NonlinearEquality(const KEY& j, const T& feasible, double error_gain, bool (*compare)(const T&, const T&) = compare<T>) :
|
NonlinearEquality(const KEY& j, const T& feasible, double error_gain, bool (*_compare)(const T&, const T&) = compare<T>) :
|
||||||
Base(noiseModel::Constrained::All(feasible.dim()), j), feasible_(feasible),
|
Base(noiseModel::Constrained::All(feasible.dim()), j), feasible_(feasible),
|
||||||
allow_error_(true), error_gain_(error_gain),
|
allow_error_(true), error_gain_(error_gain),
|
||||||
compare_(compare) {
|
compare_(_compare) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void print(const std::string& s = "") const {
|
void print(const std::string& s = "") const {
|
||||||
|
|
|
@ -56,8 +56,8 @@ namespace gtsam {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// typedefs for values subtypes
|
// typedefs for values subtypes
|
||||||
typedef class VALUES1::Key Key1;
|
typedef typename VALUES1::Key Key1;
|
||||||
typedef class VALUES1::Value Value1;
|
typedef typename VALUES1::Value Value1;
|
||||||
|
|
||||||
/** default constructor */
|
/** default constructor */
|
||||||
TupleValues() {}
|
TupleValues() {}
|
||||||
|
@ -262,8 +262,8 @@ namespace gtsam {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// typedefs
|
// typedefs
|
||||||
typedef class VALUES::Key Key1;
|
typedef typename VALUES::Key Key1;
|
||||||
typedef class VALUES::Value Value1;
|
typedef typename VALUES::Value Value1;
|
||||||
|
|
||||||
TupleValuesEnd() {}
|
TupleValuesEnd() {}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue