25 #ifdef GTSAM_USE_BOOST_FEATURES 26 #include <boost/concept_check.hpp> 27 #include <boost/concept/requires.hpp> 28 #include <boost/type_traits/is_base_of.hpp> 29 #include <boost/static_assert.hpp> 58 "This type's structure_category trait does not assert it as a group (or derived)");
63 operator_usage(flavor);
86 check_group_invariants(const
G&
a, const
G&
b,
double tol = 1
e-9) {
98 struct MultiplicativeGroupTraits {
108 template<
class Class>
109 struct MultiplicativeGroup : MultiplicativeGroupTraits<Class>,
Testable<Class> {};
113 template<
class Class>
114 struct AdditiveGroupTraits {
124 template<
class Class>
125 struct AdditiveGroup : AdditiveGroupTraits<Class>,
Testable<Class> {};
132 compose_pow(
const G&
g,
size_t n) {
134 else if (n == 1)
return g;
140 template<
typename G,
typename H>
160 return DirectProduct(this->first.inverse(), this->second.inverse());
165 template<
typename G,
typename H>
167 internal::MultiplicativeGroupTraits<DirectProduct<G, H> > {};
171 template<
typename G,
typename H>
176 const G&
g()
const {
return this->first; }
177 const H&
h()
const {
return this->second;}
201 template<
typename G,
typename H>
203 internal::AdditiveGroupTraits<DirectSum<G, H> > {};
215 #define GTSAM_CONCEPT_GROUP_INST(T) template class gtsam::IsGroup<T>; 216 #define GTSAM_CONCEPT_GROUP_TYPE(T) typedef gtsam::IsGroup<T> _gtsam_IsGroup_##T;
DirectProduct(const G &g, const H &h)
void operator_usage(additive_group_tag)
DirectSum operator-() const
DirectProduct inverse() const
#define GTSAM_CONCEPT_ASSERT(concept)
Concept check for values that can be used in unit tests.
JacobiRotation< float > G
traits< G >::group_flavor flavor_tag
static DirectSum Identity()
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy y set format x g set format y g set format x2 g set format y2 g set format z g set angles radians set nogrid set key title set key left top Right noreverse box linetype linewidth samplen spacing width set nolabel set noarrow set nologscale set logscale x set set pointsize set encoding default set nopolar set noparametric set set set set surface set nocontour set clabel set mapping cartesian set nohidden3d set cntrparam order set cntrparam linear set cntrparam levels auto set cntrparam points set size set set xzeroaxis lt lw set x2zeroaxis lt lw set yzeroaxis lt lw set y2zeroaxis lt lw set tics in set ticslevel set tics set mxtics default set mytics default set mx2tics default set my2tics default set xtics border mirror norotate autofreq set ytics border mirror norotate autofreq set ztics border nomirror norotate autofreq set nox2tics set noy2tics set timestamp bottom norotate set rrange [*:*] noreverse nowriteback set trange [*:*] noreverse nowriteback set urange [*:*] noreverse nowriteback set vrange [*:*] noreverse nowriteback set xlabel matrix size set x2label set timefmt d m y n H
void g(const string &key, int i)
DirectProduct operator*(const DirectProduct &other) const
traits< G >::structure_category structure_category_tag
DirectProduct()
Default constructor yields identity.
static DirectProduct Identity()
Group operator syntax flavors.
BetweenFactor< Rot3 > Between
Array< double, 1, 3 > e(1./3., 0.5, 2.)
BOOST_CONCEPT_USAGE(IsGroup)
DirectSum operator-(const DirectSum &other) const
GTSAM_CONCEPT_REQUIRES(IsGroup< G >, bool) check_group_invariants(const G &a
Check invariants.
DirectSum(const G &g, const H &h)
tag to assert a type is a group
void operator_usage(multiplicative_group_tag)
DirectSum()
Default constructor yields identity.
DirectSum operator+(const DirectSum &other) const