From b1dc0fa81321b5c46c3d1d654d29969b7a337c85 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 11 Jan 2017 14:28:28 +0100 Subject: [PATCH] Move fix and symbolic to their own file, and improve doxygen compatibility --- Eigen/Core | 2 + Eigen/src/Core/ArithmeticSequence.h | 302 ++++--------------------- Eigen/src/Core/IndexedView.h | 3 +- Eigen/src/Core/util/IntegralConstant.h | 87 +++++++ Eigen/src/Core/util/SymbolicIndex.h | 218 ++++++++++++++++++ Eigen/src/plugins/IndexedViewMethods.h | 4 +- 6 files changed, 356 insertions(+), 260 deletions(-) create mode 100644 Eigen/src/Core/util/IntegralConstant.h create mode 100644 Eigen/src/Core/util/SymbolicIndex.h diff --git a/Eigen/Core b/Eigen/Core index a93e3ce65..563a71ff8 100644 --- a/Eigen/Core +++ b/Eigen/Core @@ -354,6 +354,8 @@ using std::ptrdiff_t; #include "src/Core/util/StaticAssert.h" #include "src/Core/util/XprHelper.h" #include "src/Core/util/Memory.h" +#include "src/Core/util/IntegralConstant.h" +#include "src/Core/util/SymbolicIndex.h" #include "src/Core/NumTraits.h" #include "src/Core/MathFunctions.h" diff --git a/Eigen/src/Core/ArithmeticSequence.h b/Eigen/src/Core/ArithmeticSequence.h index 0fadfb86c..c221afcfd 100644 --- a/Eigen/src/Core/ArithmeticSequence.h +++ b/Eigen/src/Core/ArithmeticSequence.h @@ -16,215 +16,22 @@ namespace Eigen { // Pseudo keywords: all, last, end //-------------------------------------------------------------------------------- +namespace internal { + struct all_t { all_t() {} }; -/** Can be used as a parameter to DenseBase::operator()(const RowIndices&, const ColIndices&) to index all rows or columns */ -static const all_t all; +} -//-------------------------------------------------------------------------------- -// minimalistic symbolic scalar type -//-------------------------------------------------------------------------------- +/** \var all + * \ingroup Core_Module + * Can be used as a parameter to DenseBase::operator()(const RowIndices&, const ColIndices&) to index all rows or columns + */ +static const internal::all_t all; - -/** \namespace Symbolic +/** \namespace Eigen::placeholders * \ingroup Core_Module * - * This namespace defines a set of classes and functions to build and evaluate symbolic expressions of scalar type Index. - * Here is a simple example: - * - * \code - * // First step, defines symbols: - * struct x_tag {}; static const Symbolic::SymbolExpr x; - * struct y_tag {}; static const Symbolic::SymbolExpr y; - * struct z_tag {}; static const Symbolic::SymbolExpr z; - * - * // Defines an expression: - * auto expr = (x+3)/y+z; - * - * // And evaluate it: (c++14) - * std::cout << expr.eval(x=6,y=3,z=-13) << "\n"; - * - * // In c++98/11, only one symbol per expression is supported for now: - * auto expr98 = (3-x)/2; - * std::cout << expr98.eval(x=6) << "\n"; - * \endcode - * - * It is currently only used internally to define and minipulate the placeholders::last and placeholders::end symbols in Eigen::seq and Eigen::seqN. - * - */ -namespace Symbolic { - -template class Symbol; -template class NegateExpr; -template class AddExpr; -template class ProductExpr; -template class QuotientExpr; - -// A simple wrapper around an Index to provide the eval method. -// We could also use a free-function symbolic_eval... -class ValueExpr { -public: - ValueExpr(Index val) : m_value(val) {} - template - Index eval_impl(const T&) const { return m_value; } -protected: - Index m_value; -}; - -/** \class BaseExpr - * Common base class of any symbolic expressions - */ -template -class BaseExpr -{ -public: - const Derived& derived() const { return *static_cast(this); } - - /** Evaluate the expression given the \a values of the symbols. - * - * \param values defines the values of the symbols, it can either be a SymbolValue or a std::tuple of SymbolValue - * as constructed by SymbolExpr::operator= operator. - * - */ - template - Index eval(const T& values) const { return derived().eval_impl(values); } - -#if __cplusplus > 201103L - template - Index eval(Types&&... values) const { return derived().eval_impl(std::make_tuple(values...)); } -#endif - - NegateExpr operator-() const { return NegateExpr(derived()); } - - AddExpr operator+(Index b) const - { return AddExpr(derived(), b); } - AddExpr operator-(Index a) const - { return AddExpr(derived(), -a); } - QuotientExpr operator/(Index a) const - { return QuotientExpr(derived(),a); } - - friend AddExpr operator+(Index a, const BaseExpr& b) - { return AddExpr(b.derived(), a); } - friend AddExpr,ValueExpr> operator-(Index a, const BaseExpr& b) - { return AddExpr,ValueExpr>(-b.derived(), a); } - friend AddExpr operator/(Index a, const BaseExpr& b) - { return AddExpr(a,b.derived()); } - - template - AddExpr operator+(const BaseExpr &b) const - { return AddExpr(derived(), b.derived()); } - - template - AddExpr > operator-(const BaseExpr &b) const - { return AddExpr >(derived(), -b.derived()); } - - template - QuotientExpr operator/(const BaseExpr &b) const - { return QuotientExpr(derived(), b.derived()); } -}; - -template -struct is_symbolic { - // BaseExpr has no conversion ctor, so we only to check whether T can be staticaly cast to its base class BaseExpr. - enum { value = internal::is_convertible >::value }; -}; - -/** Represents the actual value of a symbol identified by its tag - * - * It is the return type of SymbolValue::operator=, and most of the time this is only way it is used. - */ -template -class SymbolValue -{ -public: - /** Default constructor from the value \a val */ - SymbolValue(Index val) : m_value(val) {} - - /** \returns the stored value of the symbol */ - Index value() const { return m_value; } -protected: - Index m_value; -}; - -/** Expression of a symbol uniquely identified by the tag \tparam TagT */ -template -class SymbolExpr : public BaseExpr > -{ -public: - typedef TagT Tag; - SymbolExpr() {} - - /** Associate the value \a val to the given symbol \c *this, uniquely identified by its \c Tag. - * - * The returned object should be passed to ExprBase::eval() to evaluate a given expression with this specified runtime-time value. - */ - SymbolValue operator=(Index val) const { - return SymbolValue(val); - } - - Index eval_impl(const SymbolValue &values) const { return values.value(); } - -#if __cplusplus > 201103L - // C++14 versions suitable for multiple symbols - template - Index eval_impl(const std::tuple& values) const { return std::get >(values).value(); } -#endif -}; - -template -class NegateExpr : public BaseExpr > -{ -public: - NegateExpr(const Arg0& arg0) : m_arg0(arg0) {} - - template - Index eval_impl(const T& values) const { return -m_arg0.eval_impl(values); } -protected: - Arg0 m_arg0; -}; - -template -class AddExpr : public BaseExpr > -{ -public: - AddExpr(const Arg0& arg0, const Arg1& arg1) : m_arg0(arg0), m_arg1(arg1) {} - - template - Index eval_impl(const T& values) const { return m_arg0.eval_impl(values) + m_arg1.eval_impl(values); } -protected: - Arg0 m_arg0; - Arg1 m_arg1; -}; - -template -class ProductExpr : public BaseExpr > -{ -public: - ProductExpr(const Arg0& arg0, const Arg1& arg1) : m_arg0(arg0), m_arg1(arg1) {} - - template - Index eval_impl(const T& values) const { return m_arg0.eval_impl(values) * m_arg1.eval_impl(values); } -protected: - Arg0 m_arg0; - Arg1 m_arg1; -}; - -template -class QuotientExpr : public BaseExpr > -{ -public: - QuotientExpr(const Arg0& arg0, const Arg1& arg1) : m_arg0(arg0), m_arg1(arg1) {} - - template - Index eval_impl(const T& values) const { return m_arg0.eval_impl(values) / m_arg1.eval_impl(values); } -protected: - Arg0 m_arg0; - Arg1 m_arg1; -}; - -} // end namespace Symbolic - -/** \namespace placeholders + * Namespace containing symbolic placeholders */ namespace placeholders { @@ -232,7 +39,10 @@ namespace internal { struct symbolic_last_tag {}; } -/** Can be used as a parameter to seq and seqN functions to symbolically reference the last element/row/columns +/** \var last + * \ingroup Core_Module + * + * Can be used as a parameter to Eigen::seq and Eigen::seqN functions to symbolically reference the last element/row/columns * of the underlying vector or matrix once passed to DenseBase::operator()(const RowIndices&, const ColIndices&). * * This symbolic placeholder support standard arithmetic operation. @@ -249,7 +59,10 @@ struct symbolic_last_tag {}; */ static const Symbolic::SymbolExpr last; -/** Can be used as a parameter to seq and seqN functions to symbolically reference the last+1 element/row/columns +/** \var end + * \ingroup Core_Module + * + * Can be used as a parameter to Eigen::seq and Eigen::seqN functions to symbolically reference the last+1 element/row/columns * of the underlying vector or matrix once passed to DenseBase::operator()(const RowIndices&, const ColIndices&). * * This symbolic placeholder support standard arithmetic operation. @@ -257,53 +70,26 @@ static const Symbolic::SymbolExpr last; * * \sa last */ +#ifdef EIGEN_PARSED_BY_DOXYGEN +static const auto end = last+1; +#else static const Symbolic::AddExpr,Symbolic::ValueExpr> end(last+1); +#endif } // end namespace placeholders -//-------------------------------------------------------------------------------- -// integral constant -//-------------------------------------------------------------------------------- - -template struct fix_t { - static const int value = N; - operator int() const { return value; } - fix_t (fix_t (*)() ) {} - fix_t() {} - // Needed in C++14 to allow fix(): - fix_t operator() () const { return *this; } -}; - -template struct get_compile_time { - enum { value = Default }; -}; - -template struct get_compile_time,Default> { - enum { value = N }; -}; - -template struct is_compile_time { enum { value = false }; }; -template struct is_compile_time > { enum { value = true }; }; - -#if __cplusplus > 201103L -template -static const fix_t fix{}; -#else -template -inline fix_t fix() { return fix_t(); } -#endif - //-------------------------------------------------------------------------------- // seq(first,last,incr) and seqN(first,size,incr) //-------------------------------------------------------------------------------- /** \class ArithemeticSequence + * \ingroup Core_Module * * This class represents an arithmetic progression \f$ a_0, a_1, a_2, ..., a_{n-1}\f$ defined by * its \em first value \f$ a_0 \f$, its \em size (aka length) \em n, and the \em increment (aka stride) * that is equal to \f$ a_{i+1}-a_{i}\f$ for any \em i. * - * It is internally used as the return type of the seq and seqN functions, and as the input arguments + * It is internally used as the return type of the Eigen::seq and Eigen::seqN functions, and as the input arguments * of DenseBase::operator()(const RowIndices&, const ColIndices&), and most of the time this is the * only way it is used. * @@ -313,9 +99,9 @@ inline fix_t fix() { return fix_t(); } * or a compile time integral constant. Internally, it can also be a symbolic expression * \tparam IncrType type of the increment, can be a runtime Index, or a compile time integral constant (default is compile-time 1) * - * \sa seq, seqN, DenseBase::operator()(const RowIndices&, const ColIndices&), class IndexedView + * \sa Eigen::seq, Eigen::seqN, DenseBase::operator()(const RowIndices&, const ColIndices&), class IndexedView */ -template > +template > class ArithemeticSequence { @@ -324,8 +110,8 @@ public: ArithemeticSequence(FirstType first, SizeType size, IncrType incr) : m_first(first), m_size(size), m_incr(incr) {} enum { - SizeAtCompileTime = get_compile_time::value, - IncrAtCompileTime = get_compile_time::value + SizeAtCompileTime = internal::get_compile_time::value, + IncrAtCompileTime = internal::get_compile_time::value }; /** \returns the size, i.e., number of elements, of the sequence */ @@ -357,7 +143,8 @@ template struct cleanup_seq_type (*)() > { typedef fix_t type } /** \returns an ArithemeticSequence starting at \a first, of length \a size, and increment \a incr - * \sa seqN(FirstType,SizeType), seq(FirstType,LastType,IncrType) */ + * + * \sa seqN(FirstType,SizeType), seq(FirstType,LastType,IncrType) */ template ArithemeticSequence::type,typename internal::cleanup_seq_type::type,typename internal::cleanup_seq_type::type > seqN(FirstType first, SizeType size, IncrType incr) { @@ -365,6 +152,7 @@ seqN(FirstType first, SizeType size, IncrType incr) { } /** \returns an ArithemeticSequence starting at \a first, of length \a size, and unit increment + * * \sa seqN(FirstType,SizeType,IncrType), seq(FirstType,LastType) */ template ArithemeticSequence::type,typename internal::cleanup_seq_type::type > @@ -374,18 +162,6 @@ seqN(FirstType first, SizeType size) { #ifdef EIGEN_PARSED_BY_DOXYGEN -/** \returns an ArithemeticSequence starting at \a f, up (or down) to \a l, and unit increment - * - * It is essentially an alias to: - * \code - * seqN(f,l-f+1); - * \endcode - * - * \sa seqN(FirstType,SizeType), seq(FirstType,LastType,IncrType) - */ -template -auto seq(FirstType f, LastType l); - /** \returns an ArithemeticSequence starting at \a f, up (or down) to \a l, and with positive (or negative) increment \a incr * * It is essentially an alias to: @@ -398,6 +174,18 @@ auto seq(FirstType f, LastType l); template auto seq(FirstType f, LastType l, IncrType incr); +/** \returns an ArithemeticSequence starting at \a f, up (or down) to \a l, and unit increment + * + * It is essentially an alias to: + * \code + * seqN(f,l-f+1); + * \endcode + * + * \sa seqN(FirstType,SizeType), seq(FirstType,LastType,IncrType) + */ +template +auto seq(FirstType f, LastType l); + #else // EIGEN_PARSED_BY_DOXYGEN #if EIGEN_HAS_CXX11 @@ -681,7 +469,7 @@ inline Index eval_expr_given_size(shifted_last x, Index size) { return size+x.o inline Index eval_expr_given_size(end_t, Index size) { return size; } inline Index eval_expr_given_size(shifted_end x, Index size) { return size+x.offset; } -template > +template > class ArithemeticSequenceProxyWithBounds { public: @@ -690,7 +478,7 @@ public: enum { SizeAtCompileTime = -1, - IncrAtCompileTime = get_compile_time::value + IncrAtCompileTime = internal::get_compile_time::value }; Index size() const { return (m_last-m_first+m_incr)/m_incr; } diff --git a/Eigen/src/Core/IndexedView.h b/Eigen/src/Core/IndexedView.h index 781cebd4e..d975c6e80 100644 --- a/Eigen/src/Core/IndexedView.h +++ b/Eigen/src/Core/IndexedView.h @@ -94,7 +94,8 @@ class IndexedViewImpl; * - Eigen::IntAsArray (helper for single index) * - etc. * - * In typical usages of %Eigen, this class should never be used directly. It is the return type of DenseBase::operator()(const RowIndices&, const ColIndices&). + * In typical usages of %Eigen, this class should never be used directly. It is the return type of + * DenseBase::operator()(const RowIndices&, const ColIndices&). * * \sa class Block */ diff --git a/Eigen/src/Core/util/IntegralConstant.h b/Eigen/src/Core/util/IntegralConstant.h new file mode 100644 index 000000000..f6b206275 --- /dev/null +++ b/Eigen/src/Core/util/IntegralConstant.h @@ -0,0 +1,87 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// Copyright (C) 2017 Gael Guennebaud +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + + +#ifndef EIGEN_INTEGRAL_CONSTANT_H +#define EIGEN_INTEGRAL_CONSTANT_H + +namespace Eigen { + +namespace internal { + +template struct fix_t { + static const int value = N; + operator int() const { return value; } + fix_t (fix_t (*)() ) {} + fix_t() {} + // Needed in C++14 to allow fix(): + fix_t operator() () const { return *this; } +}; + +template struct get_compile_time { + enum { value = Default }; +}; + +template struct get_compile_time,Default> { + enum { value = N }; +}; + +template struct is_compile_time { enum { value = false }; }; +template struct is_compile_time > { enum { value = true }; }; + +} // end namespace internal + +#ifndef EIGEN_PARSED_BY_DOXYGEN + +#if __cplusplus > 201103L +template +static const internal::fix_t fix{}; +#else +template +inline internal::fix_t fix() { return internal::fix_t(); } +#endif + +#else // EIGEN_PARSED_BY_DOXYGEN + +/** \var fix + * \ingroup Core_Module + * + * This \em identifier permits to construct an object embedding a compile-time integer \c N. + * + * \tparam N the compile-time integer value + * + * It is typically used in conjunction with the Eigen::seq and Eigen::seqN functions to pass compile-time values to them: + * \code + * seqN(10,fix<4>,fix<-3>) // <=> [10 7 4 1] + * \endcode + * + * In c++14, it is implemented as: + * \code + * template static const internal::fix_t fix{}; + * \endcode + * where internal::fix_t is an internal template class similar to + * \c std::integral_constant + * Here, \c fix is thus an object of type \c internal::fix_t. + * + * In c++98/11, it is implemented as a function: + * \code + * template inline internal::fix_t fix(); + * \endcode + * Here internal::fix_t is thus a pointer to function. + * + * If for some reason you want a true object in c++98 then you can write: \code fix() \endcode which is also valid in c++14. + */ +template +static const auto fix; + +#endif // EIGEN_PARSED_BY_DOXYGEN + +} // end namespace Eigen + +#endif // EIGEN_INTEGRAL_CONSTANT_H diff --git a/Eigen/src/Core/util/SymbolicIndex.h b/Eigen/src/Core/util/SymbolicIndex.h new file mode 100644 index 000000000..03086d6fa --- /dev/null +++ b/Eigen/src/Core/util/SymbolicIndex.h @@ -0,0 +1,218 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// Copyright (C) 2017 Gael Guennebaud +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#ifndef EIGEN_SYMBOLIC_INDEX_H +#define EIGEN_SYMBOLIC_INDEX_H + +namespace Eigen { + +/** \namespace Eigen::Symbolic + * \ingroup Core_Module + * + * This namespace defines a set of classes and functions to build and evaluate symbolic expressions of scalar type Index. + * Here is a simple example: + * + * \code + * // First step, defines symbols: + * struct x_tag {}; static const Symbolic::SymbolExpr x; + * struct y_tag {}; static const Symbolic::SymbolExpr y; + * struct z_tag {}; static const Symbolic::SymbolExpr z; + * + * // Defines an expression: + * auto expr = (x+3)/y+z; + * + * // And evaluate it: (c++14) + * std::cout << expr.eval(x=6,y=3,z=-13) << "\n"; + * + * // In c++98/11, only one symbol per expression is supported for now: + * auto expr98 = (3-x)/2; + * std::cout << expr98.eval(x=6) << "\n"; + * \endcode + * + * It is currently only used internally to define and minipulate the placeholders::last and placeholders::end symbols in Eigen::seq and Eigen::seqN. + * + */ +namespace Symbolic { + +template class Symbol; +template class NegateExpr; +template class AddExpr; +template class ProductExpr; +template class QuotientExpr; + +// A simple wrapper around an Index to provide the eval method. +// We could also use a free-function symbolic_eval... +class ValueExpr { +public: + ValueExpr(Index val) : m_value(val) {} + template + Index eval_impl(const T&) const { return m_value; } +protected: + Index m_value; +}; + +/** \class BaseExpr + * \ingroup Core_Module + * Common base class of any symbolic expressions + */ +template +class BaseExpr +{ +public: + const Derived& derived() const { return *static_cast(this); } + + /** Evaluate the expression given the \a values of the symbols. + * + * \param values defines the values of the symbols, it can either be a SymbolValue or a std::tuple of SymbolValue + * as constructed by SymbolExpr::operator= operator. + * + */ + template + Index eval(const T& values) const { return derived().eval_impl(values); } + +#if __cplusplus > 201103L + template + Index eval(Types&&... values) const { return derived().eval_impl(std::make_tuple(values...)); } +#endif + + NegateExpr operator-() const { return NegateExpr(derived()); } + + AddExpr operator+(Index b) const + { return AddExpr(derived(), b); } + AddExpr operator-(Index a) const + { return AddExpr(derived(), -a); } + QuotientExpr operator/(Index a) const + { return QuotientExpr(derived(),a); } + + friend AddExpr operator+(Index a, const BaseExpr& b) + { return AddExpr(b.derived(), a); } + friend AddExpr,ValueExpr> operator-(Index a, const BaseExpr& b) + { return AddExpr,ValueExpr>(-b.derived(), a); } + friend AddExpr operator/(Index a, const BaseExpr& b) + { return AddExpr(a,b.derived()); } + + template + AddExpr operator+(const BaseExpr &b) const + { return AddExpr(derived(), b.derived()); } + + template + AddExpr > operator-(const BaseExpr &b) const + { return AddExpr >(derived(), -b.derived()); } + + template + QuotientExpr operator/(const BaseExpr &b) const + { return QuotientExpr(derived(), b.derived()); } +}; + +template +struct is_symbolic { + // BaseExpr has no conversion ctor, so we only have to check whether T can be staticaly cast to its base class BaseExpr. + enum { value = internal::is_convertible >::value }; +}; + +/** Represents the actual value of a symbol identified by its tag + * + * It is the return type of SymbolValue::operator=, and most of the time this is only way it is used. + */ +template +class SymbolValue +{ +public: + /** Default constructor from the value \a val */ + SymbolValue(Index val) : m_value(val) {} + + /** \returns the stored value of the symbol */ + Index value() const { return m_value; } +protected: + Index m_value; +}; + +/** Expression of a symbol uniquely identified by the template parameter type \c tag */ +template +class SymbolExpr : public BaseExpr > +{ +public: + /** Alias to the template parameter \c tag */ + typedef tag Tag; + + SymbolExpr() {} + + /** Associate the value \a val to the given symbol \c *this, uniquely identified by its \c Tag. + * + * The returned object should be passed to ExprBase::eval() to evaluate a given expression with this specified runtime-time value. + */ + SymbolValue operator=(Index val) const { + return SymbolValue(val); + } + + Index eval_impl(const SymbolValue &values) const { return values.value(); } + +#if __cplusplus > 201103L + // C++14 versions suitable for multiple symbols + template + Index eval_impl(const std::tuple& values) const { return std::get >(values).value(); } +#endif +}; + +template +class NegateExpr : public BaseExpr > +{ +public: + NegateExpr(const Arg0& arg0) : m_arg0(arg0) {} + + template + Index eval_impl(const T& values) const { return -m_arg0.eval_impl(values); } +protected: + Arg0 m_arg0; +}; + +template +class AddExpr : public BaseExpr > +{ +public: + AddExpr(const Arg0& arg0, const Arg1& arg1) : m_arg0(arg0), m_arg1(arg1) {} + + template + Index eval_impl(const T& values) const { return m_arg0.eval_impl(values) + m_arg1.eval_impl(values); } +protected: + Arg0 m_arg0; + Arg1 m_arg1; +}; + +template +class ProductExpr : public BaseExpr > +{ +public: + ProductExpr(const Arg0& arg0, const Arg1& arg1) : m_arg0(arg0), m_arg1(arg1) {} + + template + Index eval_impl(const T& values) const { return m_arg0.eval_impl(values) * m_arg1.eval_impl(values); } +protected: + Arg0 m_arg0; + Arg1 m_arg1; +}; + +template +class QuotientExpr : public BaseExpr > +{ +public: + QuotientExpr(const Arg0& arg0, const Arg1& arg1) : m_arg0(arg0), m_arg1(arg1) {} + + template + Index eval_impl(const T& values) const { return m_arg0.eval_impl(values) / m_arg1.eval_impl(values); } +protected: + Arg0 m_arg0; + Arg1 m_arg1; +}; + +} // end namespace Symbolic + +} // end namespace Eigen + +#endif // EIGEN_SYMBOLIC_INDEX_H diff --git a/Eigen/src/plugins/IndexedViewMethods.h b/Eigen/src/plugins/IndexedViewMethods.h index 7d63f8d62..ae817e90b 100644 --- a/Eigen/src/plugins/IndexedViewMethods.h +++ b/Eigen/src/plugins/IndexedViewMethods.h @@ -157,7 +157,7 @@ operator()(const IndicesT (&indices)[IndicesN]) EIGEN_INDEXED_VIEW_METHOD_CONST * Each parameter must either be: * - An integer indexing a single row or column * - Eigen::all indexing the full set of respective rows or columns in increasing order - * - An ArithemeticSequence as returned by the seq and seqN functions + * - An ArithemeticSequence as returned by the Eigen::seq and Eigen::seqN functions * - Any %Eigen's vector/array of integers or expressions * - Plain C arrays: \c int[N] * - And more generally any type exposing the following two member functions: @@ -174,7 +174,7 @@ operator()(const IndicesT (&indices)[IndicesN]) EIGEN_INDEXED_VIEW_METHOD_CONST * when all arguments are either: * - An integer * - Eigen::all - * - An ArithemeticSequence with compile-time increment strictly equal to 1, as returned by seq(a,b), and seqN(a,N). + * - An ArithemeticSequence with compile-time increment strictly equal to 1, as returned by Eigen::seq(a,b), and Eigen::seqN(a,N). * * Otherwise a more general IndexedView object will be returned, after conversion of the inputs * to more suitable types \c RowIndices' and \c ColIndices'.