25 #include <boost/concept_check.hpp> 26 #include <boost/concept/requires.hpp> 27 #include <boost/type_traits/is_base_of.hpp> 28 #include <boost/static_assert.hpp> 40 template <
typename T>
struct traits;
53 BOOST_STATIC_ASSERT_MSG(
55 "This type's structure_category trait does not assert it as a group (or derived)");
60 operator_usage(flavor);
83 check_group_invariants(const
G&
a, const
G&
b,
double tol = 1
e-9) {
95 struct MultiplicativeGroupTraits {
105 template<
class Class>
106 struct MultiplicativeGroup : MultiplicativeGroupTraits<Class>,
Testable<Class> {};
110 template<
class Class>
111 struct AdditiveGroupTraits {
121 template<
class Class>
122 struct AdditiveGroup : AdditiveGroupTraits<Class>,
Testable<Class> {};
129 compose_pow(
const G&
g,
size_t n) {
131 else if (n == 1)
return g;
137 template<
typename G,
typename H>
162 template<
typename G,
typename H>
164 internal::MultiplicativeGroupTraits<DirectProduct<G, H> > {};
168 template<
typename G,
typename H>
174 const H&
h()
const {
return this->second;}
198 template<
typename G,
typename H>
200 internal::AdditiveGroupTraits<DirectSum<G, H> > {};
212 #define GTSAM_CONCEPT_GROUP_INST(T) template class gtsam::IsGroup<T>; 213 #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)
Concept check for values that can be used in unit tests.
DirectProduct operator*(const DirectProduct &other) const
JacobiRotation< float > G
BOOST_CONCEPT_ASSERT((boost::RandomAccessRangeConcept< ListOfOneContainer< int > >))
traits< G >::group_flavor flavor_tag
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 inverse() const
traits< G >::structure_category structure_category_tag
DirectProduct()
Default constructor yields identity.
static DirectSum identity()
constexpr int first(int i)
Implementation details for constexpr functions.
DirectSum operator+(const DirectSum &other) const
Group operator syntax flavors.
BetweenFactor< Rot3 > Between
Array< double, 1, 3 > e(1./3., 0.5, 2.)
DirectSum operator-(const DirectSum &other) const
BOOST_CONCEPT_USAGE(IsGroup)
static DirectProduct identity()
DirectSum operator-() const
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.
BOOST_CONCEPT_REQUIRES(((IsGroup< G >)),(bool)) check_group_invariants(const G &a
Check invariants.