diff --git a/Eigen/src/Core/ArithmeticSequence.h b/Eigen/src/Core/ArithmeticSequence.h index 2083cf178..941028893 100644 --- a/Eigen/src/Core/ArithmeticSequence.h +++ b/Eigen/src/Core/ArithmeticSequence.h @@ -29,17 +29,17 @@ template struct aseq_negate > { template<> struct aseq_negate > {}; template::value, - bool SizeIsSymbolic =Symbolic::is_symbolic::value> + bool FirstIsSymbolic=symbolic::is_symbolic::value, + bool SizeIsSymbolic =symbolic::is_symbolic::value> struct aseq_reverse_first_type { typedef Index type; }; template struct aseq_reverse_first_type { - typedef Symbolic::AddExpr > >, - Symbolic::ValueExpr > + typedef symbolic::AddExpr > >, + symbolic::ValueExpr > > type; }; @@ -56,14 +56,14 @@ struct aseq_reverse_first_type_aux struct aseq_reverse_first_type { typedef typename aseq_reverse_first_type_aux::type Aux; - typedef Symbolic::AddExpr > type; + typedef symbolic::AddExpr > type; }; template struct aseq_reverse_first_type { - typedef Symbolic::AddExpr > >, - Symbolic::ValueExpr >, - Symbolic::ValueExpr<> > type; + typedef symbolic::AddExpr > >, + symbolic::ValueExpr >, + symbolic::ValueExpr<> > type; }; #endif @@ -229,7 +229,7 @@ auto seq(FirstType f, LastType l, IncrType incr) #else // EIGEN_HAS_CXX11 template -typename internal::enable_if::value || Symbolic::is_symbolic::value), +typename internal::enable_if::value || symbolic::is_symbolic::value), ArithmeticSequence::type,Index> >::type seq(FirstType f, LastType l) { @@ -238,35 +238,35 @@ seq(FirstType f, LastType l) } template -typename internal::enable_if::value, - ArithmeticSequence,Symbolic::ValueExpr<> >, - Symbolic::ValueExpr > > > >::type -seq(const Symbolic::BaseExpr &f, LastType l) +typename internal::enable_if::value, + ArithmeticSequence,symbolic::ValueExpr<> >, + symbolic::ValueExpr > > > >::type +seq(const symbolic::BaseExpr &f, LastType l) { return seqN(f.derived(),(typename internal::cleanup_index_type::type(l)-f.derived()+fix<1>())); } template -typename internal::enable_if::value, +typename internal::enable_if::value, ArithmeticSequence::type, - Symbolic::AddExpr >, - Symbolic::ValueExpr > > > >::type -seq(FirstType f, const Symbolic::BaseExpr &l) + symbolic::AddExpr >, + symbolic::ValueExpr > > > >::type +seq(FirstType f, const symbolic::BaseExpr &l) { return seqN(typename internal::cleanup_index_type::type(f),(l.derived()-typename internal::cleanup_index_type::type(f)+fix<1>())); } template ArithmeticSequence >,Symbolic::ValueExpr > > > -seq(const Symbolic::BaseExpr &f, const Symbolic::BaseExpr &l) + symbolic::AddExpr >,symbolic::ValueExpr > > > +seq(const symbolic::BaseExpr &f, const symbolic::BaseExpr &l) { return seqN(f.derived(),(l.derived()-f.derived()+fix<1>())); } template -typename internal::enable_if::value || Symbolic::is_symbolic::value), +typename internal::enable_if::value || symbolic::is_symbolic::value), ArithmeticSequence::type,Index,typename internal::cleanup_seq_incr::type> >::type seq(FirstType f, LastType l, IncrType incr) { @@ -276,27 +276,27 @@ seq(FirstType f, LastType l, IncrType incr) } template -typename internal::enable_if::value, +typename internal::enable_if::value, ArithmeticSequence, - Symbolic::ValueExpr<> >, - Symbolic::ValueExpr::type> >, - Symbolic::ValueExpr::type> >, + symbolic::QuotientExpr, + symbolic::ValueExpr<> >, + symbolic::ValueExpr::type> >, + symbolic::ValueExpr::type> >, typename internal::cleanup_seq_incr::type> >::type -seq(const Symbolic::BaseExpr &f, LastType l, IncrType incr) +seq(const symbolic::BaseExpr &f, LastType l, IncrType incr) { typedef typename internal::cleanup_seq_incr::type CleanedIncrType; return seqN(f.derived(),(typename internal::cleanup_index_type::type(l)-f.derived()+CleanedIncrType(incr))/CleanedIncrType(incr), incr); } template -typename internal::enable_if::value, +typename internal::enable_if::value, ArithmeticSequence::type, - Symbolic::QuotientExpr >, - Symbolic::ValueExpr::type> >, - Symbolic::ValueExpr::type> >, + symbolic::QuotientExpr >, + symbolic::ValueExpr::type> >, + symbolic::ValueExpr::type> >, typename internal::cleanup_seq_incr::type> >::type -seq(FirstType f, const Symbolic::BaseExpr &l, IncrType incr) +seq(FirstType f, const symbolic::BaseExpr &l, IncrType incr) { typedef typename internal::cleanup_seq_incr::type CleanedIncrType; return seqN(typename internal::cleanup_index_type::type(f), @@ -305,12 +305,12 @@ seq(FirstType f, const Symbolic::BaseExpr &l, IncrType incr) template ArithmeticSequence >, - Symbolic::ValueExpr::type> >, - Symbolic::ValueExpr::type> >, + symbolic::QuotientExpr >, + symbolic::ValueExpr::type> >, + symbolic::ValueExpr::type> >, typename internal::cleanup_seq_incr::type> -seq(const Symbolic::BaseExpr &f, const Symbolic::BaseExpr &l, IncrType incr) +seq(const symbolic::BaseExpr &f, const symbolic::BaseExpr &l, IncrType incr) { typedef typename internal::cleanup_seq_incr::type CleanedIncrType; return seqN(f.derived(),(l.derived()-f.derived()+CleanedIncrType(incr))/CleanedIncrType(incr), incr); @@ -353,7 +353,7 @@ namespace internal { // Convert a symbolic span into a usable one (i.e., remove last/end "keywords") template struct make_size_type { - typedef typename internal::conditional::value, Index, T>::type type; + typedef typename internal::conditional::value, Index, T>::type type; }; template diff --git a/Eigen/src/Core/util/IndexedViewHelper.h b/Eigen/src/Core/util/IndexedViewHelper.h index dcba731f0..5d7cf8e91 100644 --- a/Eigen/src/Core/util/IndexedViewHelper.h +++ b/Eigen/src/Core/util/IndexedViewHelper.h @@ -42,7 +42,7 @@ struct symbolic_last_tag {}; * * \sa end */ -static const Symbolic::SymbolExpr last; +static const symbolic::SymbolExpr last; /** \var end * \ingroup Core_Module @@ -60,7 +60,7 @@ static const auto end = last+1; #else // Using a FixedExpr<1> expression is important here to make sure the compiler // can fully optimize the computation starting indices with zero overhead. -static const Symbolic::AddExpr,Symbolic::ValueExpr > > end(last+fix<1>()); +static const symbolic::AddExpr,symbolic::ValueExpr > > end(last+fix<1>()); #endif } // end namespace placeholders @@ -74,7 +74,7 @@ template FixedInt eval_expr_given_size(FixedInt x, Index /*size*/) { return x; } template -Index eval_expr_given_size(const Symbolic::BaseExpr &x, Index size) +Index eval_expr_given_size(const symbolic::BaseExpr &x, Index size) { return x.derived().eval(placeholders::last=size-1); } @@ -127,13 +127,13 @@ struct IndexedViewCompatibleType -struct IndexedViewCompatibleType::value>::type> { +struct IndexedViewCompatibleType::value>::type> { typedef SingleRange type; }; template -typename enable_if::value,SingleRange>::type +typename enable_if::value,SingleRange>::type makeIndexedViewCompatible(const T& id, Index size, SpecializedType) { return eval_expr_given_size(id,size); } diff --git a/Eigen/src/Core/util/SymbolicIndex.h b/Eigen/src/Core/util/SymbolicIndex.h index b9fe733b7..41d477056 100644 --- a/Eigen/src/Core/util/SymbolicIndex.h +++ b/Eigen/src/Core/util/SymbolicIndex.h @@ -12,7 +12,7 @@ namespace Eigen { -/** \namespace Eigen::Symbolic +/** \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. @@ -20,9 +20,9 @@ namespace Eigen { * * \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; + * 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; @@ -38,7 +38,7 @@ namespace Eigen { * It is currently only used internally to define and manipulate the placeholders::last and placeholders::end symbols in Eigen::seq and Eigen::seqN. * */ -namespace Symbolic { +namespace symbolic { template class Symbol; template class NegateExpr; @@ -286,7 +286,7 @@ protected: Arg1 m_arg1; }; -} // end namespace Symbolic +} // end namespace symbolic } // end namespace Eigen diff --git a/Eigen/src/plugins/IndexedViewMethods.h b/Eigen/src/plugins/IndexedViewMethods.h index d435aa597..5bfb19ac6 100644 --- a/Eigen/src/plugins/IndexedViewMethods.h +++ b/Eigen/src/plugins/IndexedViewMethods.h @@ -161,7 +161,7 @@ operator()(const Indices& indices) EIGEN_INDEXED_VIEW_METHOD_CONST template typename internal::enable_if< - (internal::get_compile_time_incr::type>::value==1) && (!internal::is_valid_index_type::value) && (!Symbolic::is_symbolic::value), + (internal::get_compile_time_incr::type>::value==1) && (!internal::is_valid_index_type::value) && (!symbolic::is_symbolic::value), VectorBlock::value> >::type operator()(const Indices& indices) EIGEN_INDEXED_VIEW_METHOD_CONST { @@ -172,7 +172,7 @@ operator()(const Indices& indices) EIGEN_INDEXED_VIEW_METHOD_CONST } template -typename internal::enable_if::value, CoeffReturnType >::type +typename internal::enable_if::value, CoeffReturnType >::type operator()(const IndexType& id) EIGEN_INDEXED_VIEW_METHOD_CONST { return Base::operator()(internal::eval_expr_given_size(id,size())); diff --git a/test/symbolic_index.cpp b/test/symbolic_index.cpp index cf89b9fbe..02db2eb51 100644 --- a/test/symbolic_index.cpp +++ b/test/symbolic_index.cpp @@ -60,12 +60,12 @@ bool is_same_symb(const T1& a, const T2& b, Index size) template void check_is_symbolic(const T&) { - STATIC_CHECK(( Symbolic::is_symbolic::value )) + STATIC_CHECK(( symbolic::is_symbolic::value )) } template void check_isnot_symbolic(const T&) { - STATIC_CHECK(( !Symbolic::is_symbolic::value )) + STATIC_CHECK(( !symbolic::is_symbolic::value )) } #define VERIFY_EQ_INT(A,B) VERIFY_IS_APPROX(int(A),int(B)) @@ -104,9 +104,9 @@ void check_symbolic_index() #if EIGEN_HAS_CXX14 { - struct x_tag {}; static const Symbolic::SymbolExpr x; - struct y_tag {}; static const Symbolic::SymbolExpr y; - struct z_tag {}; static const Symbolic::SymbolExpr z; + struct x_tag {}; static const symbolic::SymbolExpr x; + struct y_tag {}; static const symbolic::SymbolExpr y; + struct z_tag {}; static const symbolic::SymbolExpr z; VERIFY_IS_APPROX( int(((x+3)/y+z).eval(x=6,y=3,z=-13)), (6+3)/3+(-13) ); }