Replaced numbered GTSAM_CONCEPT_ASSERT# with GTSAM_CONCEPT_ASSERT

release/4.3a0
Frank Dellaert 2023-02-11 17:17:18 -08:00
parent 179575764a
commit c647257ffd
20 changed files with 67 additions and 67 deletions

View File

@ -139,8 +139,8 @@ compose_pow(const G& g, size_t n) {
/// Assumes nothing except group structure and Testable from G and H /// Assumes nothing except group structure and Testable from G and H
template<typename G, typename H> template<typename G, typename H>
class DirectProduct: public std::pair<G, H> { class DirectProduct: public std::pair<G, H> {
GTSAM_CONCEPT_ASSERT1(IsGroup<G>); GTSAM_CONCEPT_ASSERT(IsGroup<G>);
GTSAM_CONCEPT_ASSERT2(IsGroup<H>); GTSAM_CONCEPT_ASSERT(IsGroup<H>);
public: public:
/// Default constructor yields identity /// Default constructor yields identity
@ -170,8 +170,8 @@ struct traits<DirectProduct<G, H> > :
/// Assumes existence of three additive operators for both groups /// Assumes existence of three additive operators for both groups
template<typename G, typename H> template<typename G, typename H>
class DirectSum: public std::pair<G, H> { class DirectSum: public std::pair<G, H> {
GTSAM_CONCEPT_ASSERT1(IsGroup<G>); // TODO(frank): check additive GTSAM_CONCEPT_ASSERT(IsGroup<G>); // TODO(frank): check additive
GTSAM_CONCEPT_ASSERT2(IsGroup<H>); // TODO(frank): check additive GTSAM_CONCEPT_ASSERT(IsGroup<H>); // TODO(frank): check additive
const G& g() const { return this->first; } const G& g() const { return this->first; }
const H& h() const { return this->second;} const H& h() const { return this->second;}

View File

@ -27,8 +27,8 @@ namespace gtsam {
/// Assumes Lie group structure for G and H /// Assumes Lie group structure for G and H
template<typename G, typename H> template<typename G, typename H>
class ProductLieGroup: public std::pair<G, H> { class ProductLieGroup: public std::pair<G, H> {
GTSAM_CONCEPT_ASSERT1(IsLieGroup<G>); GTSAM_CONCEPT_ASSERT(IsLieGroup<G>);
GTSAM_CONCEPT_ASSERT2(IsLieGroup<H>); GTSAM_CONCEPT_ASSERT(IsLieGroup<H>);
typedef std::pair<G, H> Base; typedef std::pair<G, H> Base;
protected: protected:

View File

@ -1165,8 +1165,8 @@ TEST(Matrix, VectorIsVectorSpace) {
TEST(Matrix, RowVectorIsVectorSpace) { TEST(Matrix, RowVectorIsVectorSpace) {
typedef Eigen::Matrix<double, 1, -1> RowVector; typedef Eigen::Matrix<double, 1, -1> RowVector;
GTSAM_CONCEPT_ASSERT1(IsVectorSpace<RowVector>); GTSAM_CONCEPT_ASSERT(IsVectorSpace<RowVector>);
GTSAM_CONCEPT_ASSERT2(IsVectorSpace<Vector5>); GTSAM_CONCEPT_ASSERT(IsVectorSpace<Vector5>);
} }
//****************************************************************************** //******************************************************************************

View File

@ -267,8 +267,8 @@ TEST(Vector, linear_dependent3 )
//****************************************************************************** //******************************************************************************
TEST(Vector, VectorIsVectorSpace) { TEST(Vector, VectorIsVectorSpace) {
GTSAM_CONCEPT_ASSERT1(IsVectorSpace<Vector5>); GTSAM_CONCEPT_ASSERT(IsVectorSpace<Vector5>);
GTSAM_CONCEPT_ASSERT2(IsVectorSpace<Vector>); GTSAM_CONCEPT_ASSERT(IsVectorSpace<Vector>);
} }
TEST(Vector, RowVectorIsVectorSpace) { TEST(Vector, RowVectorIsVectorSpace) {

View File

@ -107,8 +107,8 @@ struct traits<K4> : internal::AdditiveGroupTraits<K4> {
TEST(Cyclic , DirectSum) { TEST(Cyclic , DirectSum) {
// The Direct sum of Z2 and Z2 is *not* Cyclic<4>, but the // The Direct sum of Z2 and Z2 is *not* Cyclic<4>, but the
// smallest non-cyclic group called the Klein four-group: // smallest non-cyclic group called the Klein four-group:
GTSAM_CONCEPT_ASSERT1(IsGroup<K4>); GTSAM_CONCEPT_ASSERT(IsGroup<K4>);
GTSAM_CONCEPT_ASSERT2(IsTestable<K4>); GTSAM_CONCEPT_ASSERT(IsTestable<K4>);
// Refer to http://en.wikipedia.org/wiki/Klein_four-group // Refer to http://en.wikipedia.org/wiki/Klein_four-group
K4 e(0,0), a(0, 1), b(1, 0), c(1, 1); K4 e(0,0), a(0, 1), b(1, 0), c(1, 1);

View File

@ -34,9 +34,9 @@ TEST(Point2 , Constructor) {
//****************************************************************************** //******************************************************************************
TEST(Double , Concept) { TEST(Double , Concept) {
GTSAM_CONCEPT_ASSERT1(IsGroup<double>); GTSAM_CONCEPT_ASSERT(IsGroup<double>);
GTSAM_CONCEPT_ASSERT2(IsManifold<double>); GTSAM_CONCEPT_ASSERT(IsManifold<double>);
GTSAM_CONCEPT_ASSERT3(IsVectorSpace<double>); GTSAM_CONCEPT_ASSERT(IsVectorSpace<double>);
} }
//****************************************************************************** //******************************************************************************
@ -48,9 +48,9 @@ TEST(Double , Invariants) {
//****************************************************************************** //******************************************************************************
TEST(Point2 , Concept) { TEST(Point2 , Concept) {
GTSAM_CONCEPT_ASSERT1(IsGroup<Point2>); GTSAM_CONCEPT_ASSERT(IsGroup<Point2>);
GTSAM_CONCEPT_ASSERT2(IsManifold<Point2>); GTSAM_CONCEPT_ASSERT(IsManifold<Point2>);
GTSAM_CONCEPT_ASSERT3(IsVectorSpace<Point2>); GTSAM_CONCEPT_ASSERT(IsVectorSpace<Point2>);
} }
//****************************************************************************** //******************************************************************************

View File

@ -34,9 +34,9 @@ TEST(Point3 , Constructor) {
//****************************************************************************** //******************************************************************************
TEST(Point3 , Concept) { TEST(Point3 , Concept) {
GTSAM_CONCEPT_ASSERT1(IsGroup<Point3>); GTSAM_CONCEPT_ASSERT(IsGroup<Point3>);
GTSAM_CONCEPT_ASSERT2(IsManifold<Point3>); GTSAM_CONCEPT_ASSERT(IsManifold<Point3>);
GTSAM_CONCEPT_ASSERT3(IsVectorSpace<Point3>); GTSAM_CONCEPT_ASSERT(IsVectorSpace<Point3>);
} }
//****************************************************************************** //******************************************************************************

View File

@ -35,9 +35,9 @@ GTSAM_CONCEPT_LIE_INST(Pose2)
//****************************************************************************** //******************************************************************************
TEST(Pose2 , Concept) { TEST(Pose2 , Concept) {
GTSAM_CONCEPT_ASSERT1(IsGroup<Pose2 >); GTSAM_CONCEPT_ASSERT(IsGroup<Pose2 >);
GTSAM_CONCEPT_ASSERT2(IsManifold<Pose2 >); GTSAM_CONCEPT_ASSERT(IsManifold<Pose2 >);
GTSAM_CONCEPT_ASSERT3(IsLieGroup<Pose2 >); GTSAM_CONCEPT_ASSERT(IsLieGroup<Pose2 >);
} }
/* ************************************************************************* */ /* ************************************************************************* */

View File

@ -29,9 +29,9 @@ typedef traits<Q>::ChartJacobian QuaternionJacobian;
//****************************************************************************** //******************************************************************************
TEST(Quaternion , Concept) { TEST(Quaternion , Concept) {
GTSAM_CONCEPT_ASSERT1(IsGroup<Quaternion >); GTSAM_CONCEPT_ASSERT(IsGroup<Quaternion >);
GTSAM_CONCEPT_ASSERT2(IsManifold<Quaternion >); GTSAM_CONCEPT_ASSERT(IsManifold<Quaternion >);
GTSAM_CONCEPT_ASSERT3(IsLieGroup<Quaternion >); GTSAM_CONCEPT_ASSERT(IsLieGroup<Quaternion >);
} }
//****************************************************************************** //******************************************************************************

View File

@ -38,9 +38,9 @@ static double error = 1e-9, epsilon = 0.001;
//****************************************************************************** //******************************************************************************
TEST(Rot3 , Concept) { TEST(Rot3 , Concept) {
GTSAM_CONCEPT_ASSERT1(IsGroup<Rot3 >); GTSAM_CONCEPT_ASSERT(IsGroup<Rot3 >);
GTSAM_CONCEPT_ASSERT2(IsManifold<Rot3 >); GTSAM_CONCEPT_ASSERT(IsManifold<Rot3 >);
GTSAM_CONCEPT_ASSERT3(IsLieGroup<Rot3 >); GTSAM_CONCEPT_ASSERT(IsLieGroup<Rot3 >);
} }
/* ************************************************************************* */ /* ************************************************************************* */

View File

@ -36,9 +36,9 @@ TEST(SO3, Identity) {
//****************************************************************************** //******************************************************************************
TEST(SO3, Concept) { TEST(SO3, Concept) {
GTSAM_CONCEPT_ASSERT1(IsGroup<SO3>); GTSAM_CONCEPT_ASSERT(IsGroup<SO3>);
GTSAM_CONCEPT_ASSERT2(IsManifold<SO3>); GTSAM_CONCEPT_ASSERT(IsManifold<SO3>);
GTSAM_CONCEPT_ASSERT3(IsLieGroup<SO3>); GTSAM_CONCEPT_ASSERT(IsLieGroup<SO3>);
} }
//****************************************************************************** //******************************************************************************

View File

@ -42,9 +42,9 @@ TEST(SO4, Identity) {
//****************************************************************************** //******************************************************************************
TEST(SO4, Concept) { TEST(SO4, Concept) {
GTSAM_CONCEPT_ASSERT1(IsGroup<SO4>); GTSAM_CONCEPT_ASSERT(IsGroup<SO4>);
GTSAM_CONCEPT_ASSERT2(IsManifold<SO4>); GTSAM_CONCEPT_ASSERT(IsManifold<SO4>);
GTSAM_CONCEPT_ASSERT3(IsLieGroup<SO4>); GTSAM_CONCEPT_ASSERT(IsLieGroup<SO4>);
} }
//****************************************************************************** //******************************************************************************

View File

@ -84,9 +84,9 @@ TEST(SOn, SO5) {
//****************************************************************************** //******************************************************************************
TEST(SOn, Concept) { TEST(SOn, Concept) {
GTSAM_CONCEPT_ASSERT1(IsGroup<SOn>); GTSAM_CONCEPT_ASSERT(IsGroup<SOn>);
GTSAM_CONCEPT_ASSERT2(IsManifold<SOn>); GTSAM_CONCEPT_ASSERT(IsManifold<SOn>);
GTSAM_CONCEPT_ASSERT3(IsLieGroup<SOn>); GTSAM_CONCEPT_ASSERT(IsLieGroup<SOn>);
} }
//****************************************************************************** //******************************************************************************

View File

@ -35,9 +35,9 @@ static const double s = 4;
//****************************************************************************** //******************************************************************************
TEST(Similarity2, Concepts) { TEST(Similarity2, Concepts) {
GTSAM_CONCEPT_ASSERT1(IsGroup<Similarity2>); GTSAM_CONCEPT_ASSERT(IsGroup<Similarity2>);
GTSAM_CONCEPT_ASSERT2(IsManifold<Similarity2>); GTSAM_CONCEPT_ASSERT(IsManifold<Similarity2>);
GTSAM_CONCEPT_ASSERT3(IsLieGroup<Similarity2>); GTSAM_CONCEPT_ASSERT(IsLieGroup<Similarity2>);
} }
//****************************************************************************** //******************************************************************************

View File

@ -54,9 +54,9 @@ const double degree = M_PI / 180;
//****************************************************************************** //******************************************************************************
TEST(Similarity3, Concepts) { TEST(Similarity3, Concepts) {
GTSAM_CONCEPT_ASSERT1(IsGroup<Similarity3 >); GTSAM_CONCEPT_ASSERT(IsGroup<Similarity3 >);
GTSAM_CONCEPT_ASSERT2(IsManifold<Similarity3 >); GTSAM_CONCEPT_ASSERT(IsManifold<Similarity3 >);
GTSAM_CONCEPT_ASSERT3(IsLieGroup<Similarity3 >); GTSAM_CONCEPT_ASSERT(IsLieGroup<Similarity3 >);
} }
//****************************************************************************** //******************************************************************************

View File

@ -31,9 +31,9 @@ GTSAM_CONCEPT_TESTABLE_INST(StereoPoint2)
//****************************************************************************** //******************************************************************************
TEST(StereoPoint2 , Concept) { TEST(StereoPoint2 , Concept) {
GTSAM_CONCEPT_ASSERT1(IsGroup<StereoPoint2>); GTSAM_CONCEPT_ASSERT(IsGroup<StereoPoint2>);
GTSAM_CONCEPT_ASSERT2(IsManifold<StereoPoint2 >); GTSAM_CONCEPT_ASSERT(IsManifold<StereoPoint2 >);
GTSAM_CONCEPT_ASSERT3(IsVectorSpace<StereoPoint2>); GTSAM_CONCEPT_ASSERT(IsVectorSpace<StereoPoint2>);
} }
/* ************************************************************************* */ /* ************************************************************************* */

View File

@ -44,8 +44,8 @@ namespace gtsam {
template <class VALUE> template <class VALUE>
class ExtendedKalmanFilter { class ExtendedKalmanFilter {
// Check that VALUE type is a testable Manifold // Check that VALUE type is a testable Manifold
GTSAM_CONCEPT_ASSERT1(IsTestable<VALUE>); GTSAM_CONCEPT_ASSERT(IsTestable<VALUE>);
GTSAM_CONCEPT_ASSERT2(IsManifold<VALUE>); GTSAM_CONCEPT_ASSERT(IsManifold<VALUE>);
public: public:
typedef std::shared_ptr<ExtendedKalmanFilter<VALUE> > shared_ptr; typedef std::shared_ptr<ExtendedKalmanFilter<VALUE> > shared_ptr;

View File

@ -40,8 +40,8 @@ namespace gtsam {
class BetweenFactor: public NoiseModelFactorN<VALUE, VALUE> { class BetweenFactor: public NoiseModelFactorN<VALUE, VALUE> {
// Check that VALUE type is a testable Lie group // Check that VALUE type is a testable Lie group
GTSAM_CONCEPT_ASSERT1(IsTestable<VALUE>); GTSAM_CONCEPT_ASSERT(IsTestable<VALUE>);
GTSAM_CONCEPT_ASSERT2(IsLieGroup<VALUE>); GTSAM_CONCEPT_ASSERT(IsLieGroup<VALUE>);
public: public:

View File

@ -47,9 +47,9 @@ template<> struct traits<Product> : internal::LieGroupTraits<Product> {
//****************************************************************************** //******************************************************************************
TEST(Lie, ProductLieGroup) { TEST(Lie, ProductLieGroup) {
GTSAM_CONCEPT_ASSERT1(IsGroup<Product>); GTSAM_CONCEPT_ASSERT(IsGroup<Product>);
GTSAM_CONCEPT_ASSERT2(IsManifold<Product>); GTSAM_CONCEPT_ASSERT(IsManifold<Product>);
GTSAM_CONCEPT_ASSERT3(IsLieGroup<Product>); GTSAM_CONCEPT_ASSERT(IsLieGroup<Product>);
Product pair1; Product pair1;
Vector5 d; Vector5 d;
d << 1, 2, 0.1, 0.2, 0.3; d << 1, 2, 0.1, 0.2, 0.3;

View File

@ -38,26 +38,26 @@ typedef PinholeCamera<Cal3Bundler> Camera;
//****************************************************************************** //******************************************************************************
TEST(Manifold, SomeManifoldsGTSAM) { TEST(Manifold, SomeManifoldsGTSAM) {
//GTSAM_CONCEPT_ASSERT(IsManifold<int>); // integer is not a manifold //GTSAM_CONCEPT_ASSERT(IsManifold<int>); // integer is not a manifold
GTSAM_CONCEPT_ASSERT1(IsManifold<Camera>); GTSAM_CONCEPT_ASSERT(IsManifold<Camera>);
GTSAM_CONCEPT_ASSERT2(IsManifold<Cal3_S2>); GTSAM_CONCEPT_ASSERT(IsManifold<Cal3_S2>);
GTSAM_CONCEPT_ASSERT3(IsManifold<Cal3Bundler>); GTSAM_CONCEPT_ASSERT(IsManifold<Cal3Bundler>);
GTSAM_CONCEPT_ASSERT4(IsManifold<Camera>); GTSAM_CONCEPT_ASSERT(IsManifold<Camera>);
} }
//****************************************************************************** //******************************************************************************
TEST(Manifold, SomeLieGroupsGTSAM) { TEST(Manifold, SomeLieGroupsGTSAM) {
GTSAM_CONCEPT_ASSERT1(IsLieGroup<Rot2>); GTSAM_CONCEPT_ASSERT(IsLieGroup<Rot2>);
GTSAM_CONCEPT_ASSERT2(IsLieGroup<Pose2>); GTSAM_CONCEPT_ASSERT(IsLieGroup<Pose2>);
GTSAM_CONCEPT_ASSERT3(IsLieGroup<Rot3>); GTSAM_CONCEPT_ASSERT(IsLieGroup<Rot3>);
GTSAM_CONCEPT_ASSERT4(IsLieGroup<Pose3>); GTSAM_CONCEPT_ASSERT(IsLieGroup<Pose3>);
} }
//****************************************************************************** //******************************************************************************
TEST(Manifold, SomeVectorSpacesGTSAM) { TEST(Manifold, SomeVectorSpacesGTSAM) {
GTSAM_CONCEPT_ASSERT1(IsVectorSpace<double>); GTSAM_CONCEPT_ASSERT(IsVectorSpace<double>);
GTSAM_CONCEPT_ASSERT2(IsVectorSpace<float>); GTSAM_CONCEPT_ASSERT(IsVectorSpace<float>);
GTSAM_CONCEPT_ASSERT3(IsVectorSpace<Point2>); GTSAM_CONCEPT_ASSERT(IsVectorSpace<Point2>);
GTSAM_CONCEPT_ASSERT4(IsVectorSpace<Matrix24>); GTSAM_CONCEPT_ASSERT(IsVectorSpace<Matrix24>);
} }
//****************************************************************************** //******************************************************************************