私はこれがうまく機能しています:
MatrixXf Sig(p,p);
Sig.selfadjointView<Lower>().rankUpdate(xSub.adjoint());
ここで、の上部三角部分も取得する必要がありますSig
。この答えはすることを示唆しているようです
Sig.triangularView<StrictUpper>()=Sig.adjoint().triangularView<StrictUpper>();
しかし、それを行うと騒乱が発生します-またはコンパイラがそれを呼び出すように:
DetMCD_1.cpp: In function ‘float CStep(const MatrixXf&, Eigen::VectorXi&, const int&, const int&)’:
DetMCD_1.cpp:263:21: error: ‘StrictUpper’ was not declared in this scope
DetMCD_1.cpp:263:34: error: no matching function for call to ‘Eigen::Matrix<float, -0x00000000000000001, -0x00000000000000001>::triangularView()’
DetMCD_1.cpp:263:34: note: candidates are:
/home/kaveh/R/x86_64-pc-linux-gnu-library/2.15/RcppEigen/include/Eigen/src/Core/MatrixBase.h:248:79: note: template<unsigned int Mode> typename Eigen::MatrixBase<Derived>::TriangularViewReturnType<Mode>::Type Eigen::MatrixBase::triangularView() [with unsigned int Mode = Mode, Derived = Eigen::Matrix<float, -0x00000000000000001, -0x00000000000000001>, typename Eigen::MatrixBase<Derived>::TriangularViewReturnType<Mode>::Type = <type error>]
/home/kaveh/R/x86_64-pc-linux-gnu-library/2.15/RcppEigen/include/Eigen/src/Core/MatrixBase.h:249:84: note: template<unsigned int Mode> typename Eigen::MatrixBase<Derived>::ConstTriangularViewReturnType<Mode>::Type Eigen::MatrixBase::triangularView() const [with unsigned int Mode = Mode, Derived = Eigen::Matrix<float, -0x00000000000000001, -0x00000000000000001>, typename Eigen::MatrixBase<Derived>::ConstTriangularViewReturnType<Mode>::Type = <type error>]
DetMCD_1.cpp:263:78: error: no matching function for call to ‘Eigen::Transpose<const Eigen::Matrix<float, -0x00000000000000001, -0x00000000000000001> >::triangularView() const’
DetMCD_1.cpp:263:78: note: candidates are:
/home/kaveh/R/x86_64-pc-linux-gnu-library/2.15/RcppEigen/include/Eigen/src/Core/MatrixBase.h:248:79: note: template<unsigned int Mode> typename Eigen::MatrixBase<Derived>::TriangularViewReturnType<Mode>::Type Eigen::MatrixBase::triangularView() [with unsigned int Mode = Mode, Derived = Eigen::Transpose<const Eigen::Matrix<float, -0x00000000000000001, -0x00000000000000001> >, typename Eigen::MatrixBase<Derived>::TriangularViewReturnType<Mode>::Type = <type error>]
/home/kaveh/R/x86_64-pc-linux-gnu-library/2.15/RcppEigen/include/Eigen/src/Core/MatrixBase.h:249:84: note: template<unsigned int Mode> typename Eigen::MatrixBase<Derived>::ConstTriangularViewReturnType<Mode>::Type Eigen::MatrixBase::triangularView() const [with unsigned int Mode = Mode, Derived = Eigen::Transpose<const Eigen::Matrix<float, -0x00000000000000001, -0x00000000000000001> >, typename Eigen::MatrixBase<Derived>::ConstTriangularViewReturnType<Mode>::Type = <type error>]
make: *** [DetMCD_1.o] Error 1
私の質問はこれです:私が下三角部分を持っているとSig
すると、eigenに完全な行列を返すように説得する方法は?