12 #define VERIFY_TRSM(TRI,XB) { \ 13 (XB).setRandom(); ref = (XB); \ 14 (TRI).solveInPlace(XB); \ 15 VERIFY_IS_APPROX((TRI).toDenseMatrix() * (XB), ref); \ 16 (XB).setRandom(); ref = (XB); \ 17 (XB) = (TRI).solve(XB); \ 18 VERIFY_IS_APPROX((TRI).toDenseMatrix() * (XB), ref); \ 21 #define VERIFY_TRSM_ONTHERIGHT(TRI,XB) { \ 22 (XB).setRandom(); ref = (XB); \ 23 (TRI).transpose().template solveInPlace<OnTheRight>(XB.transpose()); \ 24 VERIFY_IS_APPROX((XB).transpose() * (TRI).transpose().toDenseMatrix(), ref.transpose()); \ 25 (XB).setRandom(); ref = (XB); \ 26 (XB).transpose() = (TRI).transpose().template solve<OnTheRight>(XB.transpose()); \ 27 VERIFY_IS_APPROX((XB).transpose() * (TRI).transpose().toDenseMatrix(), ref.transpose()); \ 43 cmLhs.
setRandom(); cmLhs *=
static_cast<RealScalar
>(0.1); cmLhs.diagonal().array() +=
static_cast<RealScalar
>(1);
44 rmLhs.
setRandom(); rmLhs *=
static_cast<RealScalar
>(0.1); rmLhs.diagonal().array() +=
static_cast<RealScalar
>(1);
48 VERIFY_TRSM(cmLhs .
template triangularView<Upper>(), cmRhs);
50 VERIFY_TRSM(cmLhs.conjugate().template triangularView<Upper>(), rmRhs);
51 VERIFY_TRSM(cmLhs.adjoint() .template triangularView<Upper>(), rmRhs);
53 VERIFY_TRSM(cmLhs.conjugate().template triangularView<UnitLower>(), cmRhs);
54 VERIFY_TRSM(cmLhs .
template triangularView<UnitUpper>(), rmRhs);
57 VERIFY_TRSM(rmLhs.conjugate().template triangularView<UnitUpper>(), rmRhs);
71 int c = internal::random<int>(0,
cols-1);
80 Map<Matrix<Scalar,Size,Cols,colmajor>,0,
Stride<Dynamic,2> > map1(
buffer.data(),cmRhs.
rows(),cmRhs.
cols(),
Stride<Dynamic,2>(2*cmRhs.
outerStride(),2));
81 Map<Matrix<Scalar,Size,Cols,rowmajor>,0,
Stride<Dynamic,2> > map2(
buffer.data(),rmRhs.
rows(),rmRhs.
cols(),
Stride<Dynamic,2>(2*rmRhs.
outerStride(),2));
#define CALL_SUBTEST_12(FUNC)
#define CALL_SUBTEST_9(FUNC)
#define CALL_SUBTEST_6(FUNC)
#define CALL_SUBTEST_4(FUNC)
A matrix or vector expression mapping an existing array of data.
#define CALL_SUBTEST_13(FUNC)
#define CALL_SUBTEST_3(FUNC)
#define CALL_SUBTEST_7(FUNC)
#define CALL_SUBTEST_11(FUNC)
#define CALL_SUBTEST_14(FUNC)
Holds strides information for Map.
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index outerStride() const EIGEN_NOEXCEPT
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
#define CALL_SUBTEST_10(FUNC)
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
EIGEN_DECLARE_TEST(product_trsolve)
#define VERIFY_TRSM_ONTHERIGHT(TRI, XB)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void resize(Index rows, Index cols)
#define VERIFY_IS_EQUAL(a, b)
#define CALL_SUBTEST_1(FUNC)
void trsolve(int size=Size, int cols=Cols)
#define CALL_SUBTEST_8(FUNC)
NumTraits< Scalar >::Real RealScalar
#define CALL_SUBTEST_5(FUNC)
#define EIGEN_TEST_MAX_SIZE
A triangularView< Lower >().adjoint().solveInPlace(B)
#define CALL_SUBTEST_2(FUNC)
#define VERIFY_TRSM(TRI, XB)
The matrix class, also used for vectors and row-vectors.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & setRandom(Index size)