Go to the documentation of this file.
10 #ifndef EIGEN_CXX11META_H
11 #define EIGEN_CXX11META_H
28 template<
typename... tt>
31 template<
typename t,
typename... tt>
34 template<
typename T,
T...
nn>
37 template<
typename T,
T n,
T...
nn>
40 #ifndef EIGEN_PARSED_BY_DOXYGEN
57 template<
typename T,
std::size_t n,
T a,
T b,
T start = 0,
T... ii>
struct gen_numeric_list_swapped_pair :
gen_numeric_list_swapped_pair<T, n-1, a, b, start, (start + n-1) == a ? b : ((start + n-1) == b ? a : (start + n-1)), ii...> {};
58 template<
typename T,
T a,
T b,
T start,
T... ii>
struct gen_numeric_list_swapped_pair<
T, 0,
a,
b, start, ii...> {
typedef numeric_list<
T, ii...>
type; };
65 template<
class a,
class b>
struct concat;
73 template<
typename a,
typename b,
typename... cs>
struct mconcat<
a,
b, cs...> :
concat<a, typename mconcat<b, cs...>::type> {};
77 template<
int n,
typename x>
struct take;
78 template<
int n,
typename a,
typename... as>
struct take<
n,
type_list<
a, as...>> :
concat<type_list<a>, typename take<n-1, type_list<as...>>::type> {};
83 template<
typename T,
int n,
T a,
T... as>
struct take<
n,
numeric_list<
T,
a, as...>> :
concat<numeric_list<T, a>, typename take<n-1, numeric_list<T, as...>>::type> {};
99 #endif //not EIGEN_PARSED_BY_DOXYGEN
103 template<
typename T,
T... ii>
105 template<
typename... tt>
111 template<
int start,
int count,
typename a>
struct slice :
take<count, typename skip<start, a>::type> {};
115 template<
int n,
typename x>
struct get;
117 template<
int n,
typename a,
typename... as>
struct get<
n,
type_list<
a, as...>> :
get<n-1, type_list<as...>> {};
130 template<
typename dummy,
typename t>
struct id_type {
typedef t type; };
140 template<
typename,
typename>
class op,
141 typename additional_param,
146 template<
typename,
typename>
class op,
147 typename additional_param,
154 template<
typename,
typename>
class op,
155 typename additional_param
159 template<
typename...
values>
165 template<
typename,
typename>
class op,
166 typename additional_param,
172 template<
typename,
typename>
class op,
173 typename additional_param,
181 template<
typename,
typename>
class test,
182 typename check_against,
184 bool last_check_positive =
false
189 template<
typename,
typename>
class test,
190 typename check_against,
199 template<
typename,
typename>
class test,
200 typename check_against,
207 template<
typename,
typename>
class test,
208 typename check_against
216 template<
typename,
typename>
class test,
217 typename check_against,
219 int default_flags = 0,
220 bool last_check_positive =
false,
221 int last_check_flags = default_flags
226 template<
typename,
typename>
class test,
227 typename check_against,
235 constexpr
static int global_flags = last_check_flags;
239 template<
typename,
typename>
class test,
240 typename check_against,
246 struct contained_in_list_gf<
test, check_against,
type_list<
a, as...>, default_flags, false, last_check_flags> :
contained_in_list_gf<test, check_against, type_list<as...>, default_flags, test<check_against, a>::value, test<check_against, a>::global_flags> {};
249 template<
typename,
typename>
class test,
250 typename check_against
323 template<
typename... Ts>
329 template<
typename... Ts>
337 template<
typename Array,
int...
n>
343 template<
typename T, std::
size_t N>
365 template<
typename Reducer,
typename T, std::
size_t N>
370 return array_get<0>(
arr);
374 template<
typename Reducer,
typename T>
383 template<
typename Reducer,
typename T, std::
size_t N>
391 template<
typename T, std::
size_t N>
394 return array_reduce<sum_op, T, N>(
arr,
static_cast<T>(0));
397 template<
typename T, std::
size_t N>
400 return array_reduce<product_op, T, N>(
arr,
static_cast<T>(1));
407 for (
size_t i = 0;
i <
a.size(); ++
i) {
prod *=
a[
i]; }
419 template<
typename Op,
typename A,
typename B, std::
size_t N>
427 template<
typename Reducer,
typename Op,
typename A,
typename B,
std::size_t N,
int...
n>
428 constexpr
EIGEN_STRONG_INLINE auto h_array_zip_and_reduce(
array<A, N> a,
array<B, N> b,
numeric_list<int, n...>) -> decltype(
reduce<Reducer,
typename id_numeric<
int,
n,decltype(
Op::run(
A(),
B()))>::
type...>::
run(
Op::run(array_get<n>(
a), array_get<n>(
b))...))
433 template<
typename Reducer,
typename Op,
typename A,
typename B, std::
size_t N>
434 constexpr
EIGEN_STRONG_INLINE auto array_zip_and_reduce(
array<A, N> a,
array<B, N> b) -> decltype(h_array_zip_and_reduce<Reducer, Op, A, B, N>(
a,
b,
typename gen_numeric_list<int, N>::type()))
447 template<
typename Op,
typename A, std::
size_t N>
455 template<
typename Reducer,
typename Op,
typename A,
std::size_t N,
int...
n>
461 template<
typename Reducer,
typename Op,
typename A, std::
size_t N>
475 template<
typename t,
int... ii>
482 template<
int n,
typename t>
489 template<
class InstType,
typename ArrType,
std::size_t N,
typename... Ps>
498 template<
class InstType,
typename ArrType,
std::size_t N,
typename... Ps>
507 template<
class InstType,
typename ArrType,
typename... Ps>
513 return InstType(
args...);
517 template<
class InstType,
typename ArrType,
typename... Ps>
523 return InstType(
args...);
527 template<
class InstType,
typename ArrType, std::
size_t N,
bool Reverse = false>
537 #endif // EIGEN_CXX11META_H
constexpr EIGEN_STRONG_INLINE array< T, N > array_reverse(array< T, N > arr)
constexpr static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T run(const array< T, 0 > &, T identity)
constexpr EIGEN_DEVICE_FUNCdecltype(reduce< product_op, Ts... >::run((*((Ts *) 0))...)) EIGEN_STRONG_INLIN arg_prod)(Ts... ts)
constexpr EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE auto array_sum(const array< T, N > &arr) -> decltype(array_reduce< sum_op, T, N >(arr, static_cast< T >(0)))
static InstType run(ArrType *arr, Ps... args)
#define EIGEN_DEVICE_FUNC
Namespace containing all symbols from the Eigen library.
constexpr static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T run(const array< T, N > &arr, T)
InstType instantiate_by_c_array(ArrType *arr)
constexpr EIGEN_STRONG_INLINE auto array_zip_and_reduce(array< A, N > a, array< B, N > b) -> decltype(h_array_zip_and_reduce< Reducer, Op, A, B, N >(a, b, typename gen_numeric_list< int, N >::type()))
constexpr decltype(reduce< sum_op, Ts... >::run((*((Ts *) 0))...)) EIGEN_STRONG_INLIN arg_sum)(Ts... ts)
constexpr EIGEN_STRONG_INLINE Array h_array_reverse(Array arr, numeric_list< int, n... >)
numeric_list< T, as..., bs... > type
#define EIGEN_TPL_PP_SPEC_HACK_DEFC(mt, n)
General-purpose arrays with easy API for coefficient-wise operations.
constexpr static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE int run()
constexpr static EIGEN_STRONG_INLINE auto run(A a, B b) -> decltype(a< b)
Eigen::Triplet< double > T
constexpr static int count
constexpr EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE auto array_reduce(const array< T, N > &arr, T identity) -> decltype(h_array_reduce< Reducer, T, N >::run(arr, identity))
constexpr static EIGEN_STRONG_INLINE auto run(A a) -> decltype(a >=0)
type_list< t, tt... > type
constexpr EIGEN_STRONG_INLINE auto array_apply_and_reduce(array< A, N > a) -> decltype(h_array_apply_and_reduce< Reducer, Op, A, N >(a, typename gen_numeric_list< int, N >::type()))
static InstType run(ArrType *arr, Ps... args)
numeric_list< T, i, ii... > type
const Index array_get(DimensionList< Index, Rank > &)
constexpr static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE A run(A a)
constexpr static EIGEN_STRONG_INLINE auto run(A a) -> decltype(-a)
numeric_list< T, nn... > type
constexpr EIGEN_STRONG_INLINE array< decltype(Op::run(A(), B())), N > h_array_zip(array< A, N > a, array< B, N > b, numeric_list< int, n... >)
constexpr EIGEN_STRONG_INLINE auto h_array_zip_and_reduce(array< A, N > a, array< B, N > b, numeric_list< int, n... >) -> decltype(reduce< Reducer, typename id_numeric< int, n, decltype(Op::run(A(), B()))>::type... >::run(Op::run(array_get< n >(a), array_get< n >(b))...))
constexpr static EIGEN_STRONG_INLINE auto run(A a, B b) -> decltype(a<=b)
numeric_list< T, ii... > type
constexpr static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE auto run(A a, B b) -> decltype(a+b)
void test(OptionalJacobian< 2, 3 > H={})
constexpr EIGEN_STRONG_INLINE array< decltype(Op::run(A())), N > h_array_apply(array< A, N > a, numeric_list< int, n... >)
#define EIGEN_STRONG_INLINE
Expression of the reverse of a vector or matrix.
constexpr array< t, n > repeat(t v)
A small structure to hold a non zero as a triplet (i,j,value).
static InstType run(ArrType *arr, Ps... args)
constexpr EIGEN_STRONG_INLINE array< decltype(Op::run(A())), N > array_apply(array< A, N > a)
type_list< as..., bs... > type
constexpr static EIGEN_STRONG_INLINE auto run(A a, B b) -> decltype(a >=b)
constexpr EIGEN_STRONG_INLINE array< decltype(Op::run(A(), B())), N > array_zip(array< A, N > a, array< B, N > b)
constexpr static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE auto run(A a, Ts... ts) -> decltype(Reducer::run(a, reduce< Reducer, Ts... >::run(ts...)))
constexpr static EIGEN_STRONG_INLINE auto run(A a, B b) -> decltype(a||b)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t array_prod(const Sizes< Indices... > &)
constexpr static h_apply_op_helper< from_left, op, additional_param, values... >::type helper(type_list< values... >)
static InstType run(ArrType *arr, Ps... args)
type_list< typename op< values, additional_param >::type... > type
numeric_list< T, ii... > type
constexpr static EIGEN_STRONG_INLINE h_skip_helper_numeric< T, n, ii... >::type helper(numeric_list< T, ii... >)
constexpr static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE auto run(array< T, N > arr, T identity) -> decltype(Reducer::run(h_array_reduce< Reducer, T, N, n - 1 >::run(arr, identity), array_get< n >(arr)))
static constexpr int Identity
constexpr static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE auto run(A a, B b) -> decltype(a *b)
constexpr static EIGEN_STRONG_INLINE auto run(A a, B b) -> decltype(a==b)
static constexpr int Identity
constexpr static int global_flags
decltype(h_apply_op< true, op, additional_param >::helper(a())) typedef type
constexpr EIGEN_STRONG_INLINE auto h_array_apply_and_reduce(array< A, N > arr, numeric_list< int, n... >) -> decltype(reduce< Reducer, typename id_numeric< int, n, decltype(Op::run(A()))>::type... >::run(Op::run(array_get< n >(arr))...))
constexpr static EIGEN_STRONG_INLINE h_skip_helper_type< n, tt... >::type helper(type_list< tt... >)
Array< int, Dynamic, 1 > v
constexpr static EIGEN_STRONG_INLINE auto run(A a, B b) -> decltype(a !=b)
type_list< typename op< additional_param, values >::type... > type
constexpr static std::size_t count
#define EIGEN_TPL_PP_SPEC_HACK_USE(n)
constexpr static EIGEN_STRONG_INLINE auto run(A a, B b) -> decltype(a &&b)
numeric_list< T, ii... > type
constexpr static EIGEN_STRONG_INLINE array< t, n > run(t v, numeric_list< int, ii... >)
decltype(h_skip< n >::helper(a())) typedef type
decltype(h_apply_op< false, op, additional_param >::helper(a())) typedef type
constexpr static EIGEN_STRONG_INLINE auto run(A a) -> decltype(!a)
const Product< Lhs, Rhs > prod(const Lhs &lhs, const Rhs &rhs)
constexpr static EIGEN_STRONG_INLINE auto run(A a, B b) -> decltype(a > b)
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:10