11 #ifndef EIGEN_INDEXED_VIEW_HELPER_H 12 #define EIGEN_INDEXED_VIEW_HELPER_H 17 struct symbolic_last_tag {};
52 #ifdef EIGEN_PARSED_BY_DOXYGEN 53 static const auto lastp1 = last+fix<1>;
57 static const symbolic::AddExpr<symbolic::SymbolExpr<internal::symbolic_last_tag>,symbolic::ValueExpr<Eigen::internal::FixedInt<1> > >
lastp1(last+fix<1>());
66 FixedInt<N> eval_expr_given_size(FixedInt<N> x,
Index ) {
return x; }
68 template<
typename Derived>
71 return x.derived().eval(last=size-1);
75 template<
typename T,
typename EnableIf =
void>
struct get_compile_time_incr {
81 EIGEN_CONSTEXPR
Index first(
const T& x) EIGEN_NOEXCEPT {
return x.first(); }
85 template<
typename T,
int XprSize,
typename EnableIf=
void>
86 struct IndexedViewCompatibleType {
90 template<
typename T,
typename Q>
91 const T& makeIndexedViewCompatible(
const T& x,
Index , Q) {
return x; }
101 SingleRange(
Index val) : m_value(val) {}
102 Index operator[](
Index)
const {
return m_value; }
103 static EIGEN_CONSTEXPR
Index size() EIGEN_NOEXCEPT {
return 1; }
104 Index first() const EIGEN_NOEXCEPT {
return m_value; }
108 template<>
struct get_compile_time_incr<SingleRange> {
113 template<
typename T,
int XprSize>
114 struct IndexedViewCompatibleType<T,XprSize,typename
internal::enable_if<internal::is_integral<T>::value>::type> {
118 typedef SingleRange type;
121 template<
typename T,
int XprSize>
122 struct IndexedViewCompatibleType<T, XprSize, typename enable_if<symbolic::is_symbolic<T>::value>::type> {
123 typedef SingleRange type;
128 typename enable_if<symbolic::is_symbolic<T>::value,SingleRange>::type
129 makeIndexedViewCompatible(
const T&
id,
Index size, SpecializedType) {
130 return eval_expr_given_size(
id,size);
137 struct all_t { all_t() {} };
140 template<
int XprSize>
142 enum { SizeAtCompileTime = XprSize };
143 AllRange(
Index size = XprSize) : m_size(size) {}
144 EIGEN_CONSTEXPR
Index operator[](
Index i)
const EIGEN_NOEXCEPT {
return i; }
145 EIGEN_CONSTEXPR
Index size() const EIGEN_NOEXCEPT {
return m_size.value(); }
146 EIGEN_CONSTEXPR
Index first() const EIGEN_NOEXCEPT {
return 0; }
147 variable_if_dynamic<Index,XprSize> m_size;
150 template<
int XprSize>
151 struct IndexedViewCompatibleType<all_t,XprSize> {
152 typedef AllRange<XprSize> type;
155 template<
typename XprSizeType>
156 inline AllRange<get_fixed_value<XprSizeType>::value> makeIndexedViewCompatible(all_t , XprSizeType size, SpecializedType) {
157 return AllRange<get_fixed_value<XprSizeType>::value>(size);
160 template<
int Size>
struct get_compile_time_incr<AllRange<Size> > {
171 static const Eigen::internal::all_t
all;
174 namespace placeholders {
176 typedef symbolic::AddExpr<symbolic::SymbolExpr<internal::symbolic_last_tag>,symbolic::ValueExpr<Eigen::internal::FixedInt<1> > > end_t;
177 typedef Eigen::internal::all_t all_t;
179 EIGEN_DEPRECATED
static const all_t all =
Eigen::all;
180 EIGEN_DEPRECATED
static const last_t last =
Eigen::last;
186 #endif // EIGEN_INDEXED_VIEW_HELPER_H static const Eigen::internal::all_t all
Definition: IndexedViewHelper.h:171
static const auto lastp1
Definition: IndexedViewHelper.h:53
Namespace containing all symbols from the Eigen library.
Definition: Core:141
static const symbolic::SymbolExpr< internal::symbolic_last_tag > last
Definition: IndexedViewHelper.h:38
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
Definition: Eigen_Colamd.h:50
const int UndefinedIncr
Definition: Constants.h:31
Definition: SymbolicIndex.h:77
Definition: SymbolicIndex.h:213