10 #define EIGEN_NO_STATIC_ASSERT 17 template<
typename Vec,
typename Mat,
typename Scalar>
28 template<
typename Vec,
typename Mat,
typename Scalar>
48 #if (!EIGEN_ARCH_i386) || defined(EIGEN_VECTORIZE) 50 VERIFY( (v1*very_small).norm() == 0 );
83 m2 = MatrixType::Random(rows, cols),
85 square = SquareMatrixType::Random(rows, rows);
86 VectorType
v1 = VectorType::Random(rows),
87 v2 = VectorType::Random(rows),
88 v3 = VectorType::Random(rows),
89 vzero = VectorType::Zero(rows);
91 Scalar s1 = internal::random<Scalar>(),
92 s2 = internal::random<Scalar>();
111 Index r = internal::random<Index>(0, rows-1),
112 c = internal::random<Index>(0, cols-1);
118 m3.transposeInPlace();
120 m3.transposeInPlace();
123 if(PacketSize<m3.rows() && PacketSize<m3.cols())
126 Index i = internal::random<Index>(0,m3.rows()-PacketSize);
127 Index j = internal::random<Index>(0,m3.cols()-PacketSize);
128 m3.template block<PacketSize,PacketSize>(
i,
j).transposeInPlace();
129 VERIFY_IS_APPROX( (m3.template block<PacketSize,PacketSize>(i,j)), (m1.template block<PacketSize,PacketSize>(i,j).transpose()) );
130 m3.template block<PacketSize,PacketSize>(
i,
j).transposeInPlace();
138 m3.transposeInPlace();
143 RealVectorType rv1 = RealVectorType::Random(rows);
152 CALL_SUBTEST_2(
adjoint(Matrix3d()) );
153 CALL_SUBTEST_3(
adjoint(Matrix4f()) );
160 CALL_SUBTEST_8(
adjoint(Matrix2d()) );
171 #ifdef EIGEN_TEST_PART_13 173 MatrixXcf
a(10,10),
b(10,10);
183 a.transpose() =
a.transpose();
184 a.transpose() +=
a.transpose();
185 a.transpose() +=
a.transpose() +
b;
186 a.transpose() =
a.adjoint();
187 a.transpose() +=
a.adjoint();
188 a.transpose() +=
a.adjoint() +
b;
192 c = 1.0 * MatrixXd::Ones(10,10) +
c;
193 c = MatrixXd::Ones(10,10) * 1.0 +
c;
194 c = c + MatrixXd::Ones(10,10) .cwiseProduct( MatrixXd::Zero(10,10) );
195 c = MatrixXd::Ones(10,10) * MatrixXd::Zero(10,10);
#define VERIFY_RAISES_ASSERT(a)
EIGEN_DEVICE_FUNC bool isMuchSmallerThan(const Scalar &x, const OtherScalar &y, const typename NumTraits< Scalar >::Real &precision=NumTraits< Scalar >::dummy_precision())
void adjoint(const MatrixType &m)
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
#define VERIFY_IS_APPROX(a, b)
Scalar EIGEN_BLAS_FUNC() dot(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy)
static void run(const Vec &v1, const Vec &v2, Vec &v3, const Mat &square, Scalar s1, Scalar s2)
bool test_isApproxWithRef(const Scalar &a, const Scalar &b, const ScalarRef &ref)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
static void run(const Vec &v1, const Vec &v2, Vec &v3, const Mat &square, Scalar s1, Scalar s2)
NumTraits< Scalar >::Real RealScalar
#define VERIFY_IS_MUCH_SMALLER_THAN(a, b)
#define EIGEN_TEST_MAX_SIZE
The matrix class, also used for vectors and row-vectors.
void run(Expr &expr, Dev &dev)
EIGEN_DEVICE_FUNC const SquareReturnType square() const
ScalarWithExceptions conj(const ScalarWithExceptions &x)