14 template<
typename MatrixType>
void qr()
18 Index rows = internal::random<Index>(min_size,max_size),
19 cols = internal::random<Index>(min_size,max_size),
20 cols2 = internal::random<Index>(min_size,max_size),
40 for(
int i = 0; i < rows; i++) for(int j = 0; j < cols; j++) if(i>
j) r(
i,
j) =
Scalar(0);
52 m2 = MatrixType::Random(
cols,cols2);
59 m1 = MatrixType::Random(size,size);
63 m3 = m1 * MatrixType::Random(size,cols2);
78 Index size = internal::random<Index>(min_size,max_size);
81 m1 = MatrixType::Random(size,size);
87 m1 += a * a.adjoint();
95 m3 = MatrixType::Random(size,size);
101 for(
int i = 0; i < size; i++) m1(i,i) = internal::random<Scalar>();
102 RealScalar absdet =
abs(
m1.diagonal().prod());
129 for(
int i = 0;
i < 1;
i++) {
132 CALL_SUBTEST_1( qr<MatrixXf>() );
133 CALL_SUBTEST_2( qr<MatrixXd>() );
134 CALL_SUBTEST_3( qr<MatrixXcd>() );
138 CALL_SUBTEST_1( qr_invertible<MatrixXf>() );
139 CALL_SUBTEST_2( qr_invertible<MatrixXd>() );
140 CALL_SUBTEST_4( qr_invertible<MatrixXcf>() );
141 CALL_SUBTEST_3( qr_invertible<MatrixXcd>() );
144 CALL_SUBTEST_5(qr_verify_assert<Matrix3f>());
145 CALL_SUBTEST_6(qr_verify_assert<Matrix3d>());
146 CALL_SUBTEST_1(qr_verify_assert<MatrixXf>());
147 CALL_SUBTEST_2(qr_verify_assert<MatrixXd>());
148 CALL_SUBTEST_4(qr_verify_assert<MatrixXcf>());
149 CALL_SUBTEST_3(qr_verify_assert<MatrixXcd>());
Index dimensionOfKernel() const
bool isInvertible() const
#define VERIFY_RAISES_ASSERT(a)
void test_qr_fullpivoting()
MatrixQReturnType matrixQ(void) const
EIGEN_DEVICE_FUNC const LogReturnType log() const
bool isSurjective() const
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T maxi(const T &x, const T &y)
FullPivHouseholderQR & compute(const EigenBase< InputType > &matrix)
const Solve< FullPivHouseholderQR, Rhs > solve(const MatrixBase< Rhs > &b) const
#define VERIFY_IS_APPROX(a, b)
#define VERIFY_IS_EQUAL(a, b)
const PermutationType & colsPermutation() const
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
EIGEN_DEVICE_FUNC const Scalar & q
NumTraits< Scalar >::Real RealScalar
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T mini(const T &x, const T &y)
InverseReturnType inverse() const
MatrixType::RealScalar logAbsDeterminant() const
#define EIGEN_TEST_MAX_SIZE
MatrixType::RealScalar absDeterminant() const
const MatrixType & matrixQR() const
#define VERIFY_IS_UNITARY(a)
void createRandomPIMatrixOfRank(Index desired_rank, Index rows, Index cols, MatrixType &m)
internal::nested_eval< T, 1 >::type eval(const T &xpr)
The matrix class, also used for vectors and row-vectors.
const Inverse< FullPivHouseholderQR > inverse() const