Re: [eigen] ambiguity in Assignment in FullPivHouseholder::inverse() call for 3.3.rc1

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Fixed: https://bitbucket.org/eigen/eigen/commits/706501075607/

gael

On Wed, Oct 5, 2016 at 11:01 PM, Daniel Lee <bearlee@xxxxxxxxxxxx> wrote:
> Begin forwarded message:
>
> From: Bob Carpenter <carp@xxxxxxxxxxx>
> Subject: ambiguity in Assignment in FullPivHouseholder::inverse() call for 3.3.rc1
> Date: October 5, 2016 at 3:22:47 PM EDT
> To: eigen@xxxxxxxxxxxxxxxxxxx
>
> I'm running into a problem with ambiguity with an Assignment
> partial specialization inside the inverse method of the
> full-pivot Householder decomposition of a dense matrix.
> Here's a minimal example:
>
> #include <Eigen/Dense>
>
> int main() {
>  using Eigen::MatrixXd;
>  MatrixXd m(2, 2);
>  m << 1, 0, 0, 1;
>  Eigen::FullPivHouseholderQR<MatrixXd> hh
>    = m.fullPivHouseholderQr();
>  MatrixXd m_inv_transpose = hh.inverse();
> }
>
> Should we be calling this another way?
>
> Thanks,
>
> - Bob
>
> P.S.  This is clang++ on MacOS X through Xcode.
>
> ~/temp2$ clang++ --version
> Apple LLVM version 7.0.2 (clang-700.1.81)
> Target: x86_64-apple-darwin14.5.0
> Thread model: posix
>
> P.P.S.   Here's the full dump:
>
> ~/temp2$ clang++ -isystem ~/cmdstan/stan/lib/stan_math/lib/eigen_3.3.rc1 fph.cpp
> In file included from fph.cpp:1:
> In file included from /Users/carp/cmdstan/stan/lib/stan_math/lib/eigen_3.3.rc1/Eigen/Dense:1:
> In file included from /Users/carp/cmdstan/stan/lib/stan_math/lib/eigen_3.3.rc1/Eigen/Core:389:
> /Users/carp/cmdstan/stan/lib/stan_math/lib/eigen_3.3.rc1/Eigen/src/Core/AssignEvaluator.h:813:3: error: ambiguous partial specializations
>      of 'Assignment<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Inverse<Eigen::FullPivHouseholderQR<Eigen::Matrix<double, -1, -1, 0,
>      -1, -1> > >, Eigen::internal::assign_op<double, double>, Eigen::internal::Dense2Dense, void>'
>  Assignment<ActualDstTypeCleaned,Src,Func>::run(actualDst, src, func);
>  ^
> /Users/carp/cmdstan/stan/lib/stan_math/lib/eigen_3.3.rc1/Eigen/src/Core/PlainObjectBase.h:721:17: note: in instantiation of function
>      template specialization 'Eigen::internal::call_assignment_no_alias<Eigen::Matrix<double, -1, -1, 0, -1, -1>,
>      Eigen::Inverse<Eigen::FullPivHouseholderQR<Eigen::Matrix<double, -1, -1, 0, -1, -1> > >, Eigen::internal::assign_op<double, double>
>> ' requested here
>      internal::call_assignment_no_alias(this->derived(), other.derived(), internal::assign_op<Scalar,typename OtherDerived::Scalar>());
>                ^
> /Users/carp/cmdstan/stan/lib/stan_math/lib/eigen_3.3.rc1/Eigen/src/Core/PlainObjectBase.h:531:7: note: in instantiation of function
>      template specialization 'Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1>
>> ::_set_noalias<Eigen::Inverse<Eigen::FullPivHouseholderQR<Eigen::Matrix<double, -1, -1, 0, -1, -1> > > >' requested here
>      _set_noalias(other);
>      ^
> /Users/carp/cmdstan/stan/lib/stan_math/lib/eigen_3.3.rc1/Eigen/src/Core/Matrix.h:379:9: note: in instantiation of function template
>      specialization 'Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1>
>> ::PlainObjectBase<Eigen::Inverse<Eigen::FullPivHouseholderQR<Eigen::Matrix<double, -1, -1, 0, -1, -1> > > >' requested here
>      : Base(other.derived())
>        ^
> fph.cpp:9:30: note: in instantiation of function template specialization 'Eigen::Matrix<double, -1, -1, 0, -1,
>      -1>::Matrix<Eigen::Inverse<Eigen::FullPivHouseholderQR<Eigen::Matrix<double, -1, -1, 0, -1, -1> > > >' requested here
>  MatrixXd m_inv_transpose = hh.inverse();
>                             ^
> /Users/carp/cmdstan/stan/lib/stan_math/lib/eigen_3.3.rc1/Eigen/src/Core/AssignEvaluator.h:851:8: note: partial specialization matches
>      [with DstXprType = Eigen::Matrix<double, -1, -1, 0, -1, -1>, SrcXprType =
>      Eigen::Inverse<Eigen::FullPivHouseholderQR<Eigen::Matrix<double, -1, -1, 0, -1, -1> > >, Functor =
>      Eigen::internal::assign_op<double, double>, Weak = void]
> struct Assignment<DstXprType, SrcXprType, Functor, Dense2Dense, Weak>
>       ^
> /Users/carp/cmdstan/stan/lib/stan_math/lib/eigen_3.3.rc1/Eigen/src/LU/InverseImpl.h:290:8: note: partial specialization matches [with
>      DstXprType = Eigen::Matrix<double, -1, -1, 0, -1, -1>, XprType = Eigen::FullPivHouseholderQR<Eigen::Matrix<double, -1, -1, 0, -1,
>      -1> >]
> struct Assignment<DstXprType, Inverse<XprType>, internal::assign_op<typename DstXprType::Scalar,typename XprType::Scalar>, Dense2Dense>
>       ^
> /Users/carp/cmdstan/stan/lib/stan_math/lib/eigen_3.3.rc1/Eigen/src/QR/FullPivHouseholderQR.h:579:8: note: partial specialization matches
>      [with DstXprType = Eigen::Matrix<double, -1, -1, 0, -1, -1>, MatrixType = Eigen::Matrix<double, -1, -1, 0, -1, -1>, Scalar = double]
> struct Assignment<DstXprType, Inverse<FullPivHouseholderQR<MatrixType> >, internal::assign_op<Scalar,Scalar>, Dense2Dense>
>       ^
> 1 error generated.
> ~/temp2$
>
>





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/