mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-11 23:51:49 +08:00
Fix shadowing typedefs
This commit is contained in:
parent
1eef23a1eb
commit
718e954df4
@ -66,7 +66,6 @@ template<typename Derived>
|
|||||||
inline typename MatrixBase<Derived>::EigenvaluesReturnType
|
inline typename MatrixBase<Derived>::EigenvaluesReturnType
|
||||||
MatrixBase<Derived>::eigenvalues() const
|
MatrixBase<Derived>::eigenvalues() const
|
||||||
{
|
{
|
||||||
typedef typename internal::traits<Derived>::Scalar Scalar;
|
|
||||||
return internal::eigenvalues_selector<Derived, NumTraits<Scalar>::IsComplex>::run(derived());
|
return internal::eigenvalues_selector<Derived, NumTraits<Scalar>::IsComplex>::run(derived());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,7 +87,6 @@ template<typename MatrixType, unsigned int UpLo>
|
|||||||
inline typename SelfAdjointView<MatrixType, UpLo>::EigenvaluesReturnType
|
inline typename SelfAdjointView<MatrixType, UpLo>::EigenvaluesReturnType
|
||||||
SelfAdjointView<MatrixType, UpLo>::eigenvalues() const
|
SelfAdjointView<MatrixType, UpLo>::eigenvalues() const
|
||||||
{
|
{
|
||||||
typedef typename SelfAdjointView<MatrixType, UpLo>::PlainObject PlainObject;
|
|
||||||
PlainObject thisAsMatrix(*this);
|
PlainObject thisAsMatrix(*this);
|
||||||
return SelfAdjointEigenSolver<PlainObject>(thisAsMatrix, false).eigenvalues();
|
return SelfAdjointEigenSolver<PlainObject>(thisAsMatrix, false).eigenvalues();
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,6 @@ template<typename MatrixType> void adjoint(const MatrixType& m)
|
|||||||
Transpose.h Conjugate.h Dot.h
|
Transpose.h Conjugate.h Dot.h
|
||||||
*/
|
*/
|
||||||
using std::abs;
|
using std::abs;
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||||
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;
|
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
template<typename ArrayType> void array(const ArrayType& m)
|
template<typename ArrayType> void array(const ArrayType& m)
|
||||||
{
|
{
|
||||||
typedef typename ArrayType::Index Index;
|
|
||||||
typedef typename ArrayType::Scalar Scalar;
|
typedef typename ArrayType::Scalar Scalar;
|
||||||
typedef typename ArrayType::RealScalar RealScalar;
|
typedef typename ArrayType::RealScalar RealScalar;
|
||||||
typedef Array<Scalar, ArrayType::RowsAtCompileTime, 1> ColVectorType;
|
typedef Array<Scalar, ArrayType::RowsAtCompileTime, 1> ColVectorType;
|
||||||
@ -130,7 +129,6 @@ template<typename ArrayType> void array(const ArrayType& m)
|
|||||||
template<typename ArrayType> void comparisons(const ArrayType& m)
|
template<typename ArrayType> void comparisons(const ArrayType& m)
|
||||||
{
|
{
|
||||||
using std::abs;
|
using std::abs;
|
||||||
typedef typename ArrayType::Index Index;
|
|
||||||
typedef typename ArrayType::Scalar Scalar;
|
typedef typename ArrayType::Scalar Scalar;
|
||||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||||
|
|
||||||
@ -208,7 +206,6 @@ template<typename ArrayType> void array_real(const ArrayType& m)
|
|||||||
{
|
{
|
||||||
using std::abs;
|
using std::abs;
|
||||||
using std::sqrt;
|
using std::sqrt;
|
||||||
typedef typename ArrayType::Index Index;
|
|
||||||
typedef typename ArrayType::Scalar Scalar;
|
typedef typename ArrayType::Scalar Scalar;
|
||||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||||
|
|
||||||
@ -319,7 +316,6 @@ template<typename ArrayType> void array_real(const ArrayType& m)
|
|||||||
|
|
||||||
template<typename ArrayType> void array_complex(const ArrayType& m)
|
template<typename ArrayType> void array_complex(const ArrayType& m)
|
||||||
{
|
{
|
||||||
typedef typename ArrayType::Index Index;
|
|
||||||
typedef typename ArrayType::Scalar Scalar;
|
typedef typename ArrayType::Scalar Scalar;
|
||||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||||
|
|
||||||
@ -424,7 +420,6 @@ template<typename ArrayType> void array_complex(const ArrayType& m)
|
|||||||
|
|
||||||
template<typename ArrayType> void min_max(const ArrayType& m)
|
template<typename ArrayType> void min_max(const ArrayType& m)
|
||||||
{
|
{
|
||||||
typedef typename ArrayType::Index Index;
|
|
||||||
typedef typename ArrayType::Scalar Scalar;
|
typedef typename ArrayType::Scalar Scalar;
|
||||||
|
|
||||||
Index rows = m.rows();
|
Index rows = m.rows();
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
template<typename MatrixType> void array_for_matrix(const MatrixType& m)
|
template<typename MatrixType> void array_for_matrix(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> ColVectorType;
|
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> ColVectorType;
|
||||||
typedef Matrix<Scalar, 1, MatrixType::ColsAtCompileTime> RowVectorType;
|
typedef Matrix<Scalar, 1, MatrixType::ColsAtCompileTime> RowVectorType;
|
||||||
@ -83,7 +82,6 @@ template<typename MatrixType> void array_for_matrix(const MatrixType& m)
|
|||||||
template<typename MatrixType> void comparisons(const MatrixType& m)
|
template<typename MatrixType> void comparisons(const MatrixType& m)
|
||||||
{
|
{
|
||||||
using std::abs;
|
using std::abs;
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||||
|
|
||||||
@ -172,7 +170,6 @@ template<typename VectorType> void lpNorm(const VectorType& v)
|
|||||||
|
|
||||||
template<typename MatrixType> void cwise_min_max(const MatrixType& m)
|
template<typename MatrixType> void cwise_min_max(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
|
|
||||||
Index rows = m.rows();
|
Index rows = m.rows();
|
||||||
@ -211,7 +208,6 @@ template<typename MatrixType> void cwise_min_max(const MatrixType& m)
|
|||||||
|
|
||||||
template<typename MatrixTraits> void resize(const MatrixTraits& t)
|
template<typename MatrixTraits> void resize(const MatrixTraits& t)
|
||||||
{
|
{
|
||||||
typedef typename MatrixTraits::Index Index;
|
|
||||||
typedef typename MatrixTraits::Scalar Scalar;
|
typedef typename MatrixTraits::Scalar Scalar;
|
||||||
typedef Matrix<Scalar,Dynamic,Dynamic> MatrixType;
|
typedef Matrix<Scalar,Dynamic,Dynamic> MatrixType;
|
||||||
typedef Array<Scalar,Dynamic,Dynamic> Array2DType;
|
typedef Array<Scalar,Dynamic,Dynamic> Array2DType;
|
||||||
|
@ -14,7 +14,6 @@ template<typename MatrixType> void replicate(const MatrixType& m)
|
|||||||
/* this test covers the following files:
|
/* this test covers the following files:
|
||||||
Replicate.cpp
|
Replicate.cpp
|
||||||
*/
|
*/
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;
|
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;
|
||||||
typedef Matrix<Scalar, Dynamic, Dynamic> MatrixX;
|
typedef Matrix<Scalar, Dynamic, Dynamic> MatrixX;
|
||||||
|
@ -15,7 +15,6 @@ using namespace std;
|
|||||||
|
|
||||||
template<typename MatrixType> void reverse(const MatrixType& m)
|
template<typename MatrixType> void reverse(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;
|
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;
|
||||||
|
|
||||||
|
@ -32,7 +32,6 @@ block_real_only(const MatrixType &, Index, Index, Index, Index, const Scalar&) {
|
|||||||
|
|
||||||
template<typename MatrixType> void block(const MatrixType& m)
|
template<typename MatrixType> void block(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
typedef typename MatrixType::RealScalar RealScalar;
|
typedef typename MatrixType::RealScalar RealScalar;
|
||||||
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;
|
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;
|
||||||
@ -207,7 +206,6 @@ template<typename MatrixType> void block(const MatrixType& m)
|
|||||||
template<typename MatrixType>
|
template<typename MatrixType>
|
||||||
void compare_using_data_and_stride(const MatrixType& m)
|
void compare_using_data_and_stride(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
Index rows = m.rows();
|
Index rows = m.rows();
|
||||||
Index cols = m.cols();
|
Index cols = m.cols();
|
||||||
Index size = m.size();
|
Index size = m.size();
|
||||||
@ -241,7 +239,6 @@ void compare_using_data_and_stride(const MatrixType& m)
|
|||||||
template<typename MatrixType>
|
template<typename MatrixType>
|
||||||
void data_and_stride(const MatrixType& m)
|
void data_and_stride(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
Index rows = m.rows();
|
Index rows = m.rows();
|
||||||
Index cols = m.cols();
|
Index cols = m.cols();
|
||||||
|
|
||||||
|
@ -57,7 +57,6 @@ template<typename MatrixType,template <typename,int> class CholType> void test_c
|
|||||||
|
|
||||||
template<typename MatrixType> void cholesky(const MatrixType& m)
|
template<typename MatrixType> void cholesky(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
/* this test covers the following files:
|
/* this test covers the following files:
|
||||||
LLT.h LDLT.h
|
LLT.h LDLT.h
|
||||||
*/
|
*/
|
||||||
@ -289,8 +288,6 @@ template<typename MatrixType> void cholesky_cplx(const MatrixType& m)
|
|||||||
|
|
||||||
// test mixing real/scalar types
|
// test mixing real/scalar types
|
||||||
|
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
|
|
||||||
Index rows = m.rows();
|
Index rows = m.rows();
|
||||||
Index cols = m.cols();
|
Index cols = m.cols();
|
||||||
|
|
||||||
|
@ -17,7 +17,6 @@ template <typename Scalar, int Storage>
|
|||||||
void run_matrix_tests()
|
void run_matrix_tests()
|
||||||
{
|
{
|
||||||
typedef Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic, Storage> MatrixType;
|
typedef Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic, Storage> MatrixType;
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
|
|
||||||
MatrixType m, n;
|
MatrixType m, n;
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
|
|
||||||
template<typename MatrixType> void corners(const MatrixType& m)
|
template<typename MatrixType> void corners(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
Index rows = m.rows();
|
Index rows = m.rows();
|
||||||
Index cols = m.cols();
|
Index cols = m.cols();
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@ template<typename MatrixType> void determinant(const MatrixType& m)
|
|||||||
/* this test covers the following files:
|
/* this test covers the following files:
|
||||||
Determinant.h
|
Determinant.h
|
||||||
*/
|
*/
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
Index size = m.rows();
|
Index size = m.rows();
|
||||||
|
|
||||||
MatrixType m1(size, size), m2(size, size);
|
MatrixType m1(size, size), m2(size, size);
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
template<typename MatrixType> void diagonal(const MatrixType& m)
|
template<typename MatrixType> void diagonal(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
|
|
||||||
Index rows = m.rows();
|
Index rows = m.rows();
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
template<typename MatrixType> void diagonalmatrices(const MatrixType& m)
|
template<typename MatrixType> void diagonalmatrices(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
enum { Rows = MatrixType::RowsAtCompileTime, Cols = MatrixType::ColsAtCompileTime };
|
enum { Rows = MatrixType::RowsAtCompileTime, Cols = MatrixType::ColsAtCompileTime };
|
||||||
typedef Matrix<Scalar, Rows, 1> VectorType;
|
typedef Matrix<Scalar, Rows, 1> VectorType;
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
template<typename MatrixType>
|
template<typename MatrixType>
|
||||||
void dontalign(const MatrixType& m)
|
void dontalign(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;
|
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;
|
||||||
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> SquareMatrixType;
|
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> SquareMatrixType;
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
|
|
||||||
template<typename MatrixType> void eigen2support(const MatrixType& m)
|
template<typename MatrixType> void eigen2support(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
|
|
||||||
Index rows = m.rows();
|
Index rows = m.rows();
|
||||||
|
@ -71,7 +71,6 @@ void verify_is_approx_upto_permutation(const VectorType& vec1, const VectorType&
|
|||||||
|
|
||||||
template<typename MatrixType> void eigensolver(const MatrixType& m)
|
template<typename MatrixType> void eigensolver(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
/* this test covers the following files:
|
/* this test covers the following files:
|
||||||
ComplexEigenSolver.h, and indirectly ComplexSchur.h
|
ComplexEigenSolver.h, and indirectly ComplexSchur.h
|
||||||
*/
|
*/
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
|
|
||||||
template<typename MatrixType> void generalized_eigensolver_real(const MatrixType& m)
|
template<typename MatrixType> void generalized_eigensolver_real(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
/* this test covers the following files:
|
/* this test covers the following files:
|
||||||
GeneralizedEigenSolver.h
|
GeneralizedEigenSolver.h
|
||||||
*/
|
*/
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
|
|
||||||
template<typename MatrixType> void eigensolver(const MatrixType& m)
|
template<typename MatrixType> void eigensolver(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
/* this test covers the following files:
|
/* this test covers the following files:
|
||||||
EigenSolver.h
|
EigenSolver.h
|
||||||
*/
|
*/
|
||||||
|
@ -68,7 +68,6 @@ template<typename MatrixType> void selfadjointeigensolver_essential_check(const
|
|||||||
|
|
||||||
template<typename MatrixType> void selfadjointeigensolver(const MatrixType& m)
|
template<typename MatrixType> void selfadjointeigensolver(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
/* this test covers the following files:
|
/* this test covers the following files:
|
||||||
EigenSolver.h, SelfAdjointEigenSolver.h (and indirectly: Tridiagonalization.h)
|
EigenSolver.h, SelfAdjointEigenSolver.h (and indirectly: Tridiagonalization.h)
|
||||||
*/
|
*/
|
||||||
|
@ -24,7 +24,6 @@ template<typename BoxType> void alignedbox(const BoxType& _box)
|
|||||||
/* this test covers the following files:
|
/* this test covers the following files:
|
||||||
AlignedBox.h
|
AlignedBox.h
|
||||||
*/
|
*/
|
||||||
typedef typename BoxType::Index Index;
|
|
||||||
typedef typename BoxType::Scalar Scalar;
|
typedef typename BoxType::Scalar Scalar;
|
||||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||||
typedef Matrix<Scalar, BoxType::AmbientDimAtCompileTime, 1> VectorType;
|
typedef Matrix<Scalar, BoxType::AmbientDimAtCompileTime, 1> VectorType;
|
||||||
@ -86,7 +85,6 @@ template<typename BoxType>
|
|||||||
void alignedboxCastTests(const BoxType& _box)
|
void alignedboxCastTests(const BoxType& _box)
|
||||||
{
|
{
|
||||||
// casting
|
// casting
|
||||||
typedef typename BoxType::Index Index;
|
|
||||||
typedef typename BoxType::Scalar Scalar;
|
typedef typename BoxType::Scalar Scalar;
|
||||||
typedef Matrix<Scalar, BoxType::AmbientDimAtCompileTime, 1> VectorType;
|
typedef Matrix<Scalar, BoxType::AmbientDimAtCompileTime, 1> VectorType;
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@ template<typename HyperplaneType> void hyperplane(const HyperplaneType& _plane)
|
|||||||
Hyperplane.h
|
Hyperplane.h
|
||||||
*/
|
*/
|
||||||
using std::abs;
|
using std::abs;
|
||||||
typedef typename HyperplaneType::Index Index;
|
|
||||||
const Index dim = _plane.dim();
|
const Index dim = _plane.dim();
|
||||||
enum { Options = HyperplaneType::Options };
|
enum { Options = HyperplaneType::Options };
|
||||||
typedef typename HyperplaneType::Scalar Scalar;
|
typedef typename HyperplaneType::Scalar Scalar;
|
||||||
|
@ -19,7 +19,6 @@ template<typename LineType> void parametrizedline(const LineType& _line)
|
|||||||
ParametrizedLine.h
|
ParametrizedLine.h
|
||||||
*/
|
*/
|
||||||
using std::abs;
|
using std::abs;
|
||||||
typedef typename LineType::Index Index;
|
|
||||||
const Index dim = _line.dim();
|
const Index dim = _line.dim();
|
||||||
typedef typename LineType::Scalar Scalar;
|
typedef typename LineType::Scalar Scalar;
|
||||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
|
|
||||||
template<typename MatrixType> void householder(const MatrixType& m)
|
template<typename MatrixType> void householder(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
static bool even = true;
|
static bool even = true;
|
||||||
even = !even;
|
even = !even;
|
||||||
/* this test covers the following files:
|
/* this test covers the following files:
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
template<typename MatrixType> void signed_integer_type_tests(const MatrixType& m)
|
template<typename MatrixType> void signed_integer_type_tests(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
|
|
||||||
enum { is_signed = (Scalar(-1) > Scalar(0)) ? 0 : 1 };
|
enum { is_signed = (Scalar(-1) > Scalar(0)) ? 0 : 1 };
|
||||||
@ -49,7 +48,6 @@ template<typename MatrixType> void signed_integer_type_tests(const MatrixType& m
|
|||||||
|
|
||||||
template<typename MatrixType> void integer_type_tests(const MatrixType& m)
|
template<typename MatrixType> void integer_type_tests(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
|
|
||||||
VERIFY(NumTraits<Scalar>::IsInteger);
|
VERIFY(NumTraits<Scalar>::IsInteger);
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
template<typename MatrixType> void inverse(const MatrixType& m)
|
template<typename MatrixType> void inverse(const MatrixType& m)
|
||||||
{
|
{
|
||||||
using std::abs;
|
using std::abs;
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
/* this test covers the following files:
|
/* this test covers the following files:
|
||||||
Inverse.h
|
Inverse.h
|
||||||
*/
|
*/
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
template<typename MatrixType, typename JacobiScalar>
|
template<typename MatrixType, typename JacobiScalar>
|
||||||
void jacobi(const MatrixType& m = MatrixType())
|
void jacobi(const MatrixType& m = MatrixType())
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
Index rows = m.rows();
|
Index rows = m.rows();
|
||||||
Index cols = m.cols();
|
Index cols = m.cols();
|
||||||
|
|
||||||
|
@ -36,7 +36,6 @@ void jacobisvd(const MatrixType& a = MatrixType(), bool pickrandom = true)
|
|||||||
template<typename MatrixType> void jacobisvd_verify_assert(const MatrixType& m)
|
template<typename MatrixType> void jacobisvd_verify_assert(const MatrixType& m)
|
||||||
{
|
{
|
||||||
svd_verify_assert<JacobiSVD<MatrixType> >(m);
|
svd_verify_assert<JacobiSVD<MatrixType> >(m);
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
Index rows = m.rows();
|
Index rows = m.rows();
|
||||||
Index cols = m.cols();
|
Index cols = m.cols();
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@ template<typename MatrixType> void linearStructure(const MatrixType& m)
|
|||||||
/* this test covers the following files:
|
/* this test covers the following files:
|
||||||
CwiseUnaryOp.h, CwiseBinaryOp.h, SelfCwiseBinaryOp.h
|
CwiseUnaryOp.h, CwiseBinaryOp.h, SelfCwiseBinaryOp.h
|
||||||
*/
|
*/
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
typedef typename MatrixType::RealScalar RealScalar;
|
typedef typename MatrixType::RealScalar RealScalar;
|
||||||
|
|
||||||
|
@ -18,7 +18,6 @@ typename MatrixType::RealScalar matrix_l1_norm(const MatrixType& m) {
|
|||||||
|
|
||||||
template<typename MatrixType> void lu_non_invertible()
|
template<typename MatrixType> void lu_non_invertible()
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::RealScalar RealScalar;
|
typedef typename MatrixType::RealScalar RealScalar;
|
||||||
/* this test covers the following files:
|
/* this test covers the following files:
|
||||||
LU.h
|
LU.h
|
||||||
@ -181,7 +180,6 @@ template<typename MatrixType> void lu_partial_piv()
|
|||||||
/* this test covers the following files:
|
/* this test covers the following files:
|
||||||
PartialPivLU.h
|
PartialPivLU.h
|
||||||
*/
|
*/
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename NumTraits<typename MatrixType::Scalar>::Real RealScalar;
|
typedef typename NumTraits<typename MatrixType::Scalar>::Real RealScalar;
|
||||||
Index size = internal::random<Index>(1,4);
|
Index size = internal::random<Index>(1,4);
|
||||||
|
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
template<typename VectorType> void map_class_vector(const VectorType& m)
|
template<typename VectorType> void map_class_vector(const VectorType& m)
|
||||||
{
|
{
|
||||||
typedef typename VectorType::Index Index;
|
|
||||||
typedef typename VectorType::Scalar Scalar;
|
typedef typename VectorType::Scalar Scalar;
|
||||||
|
|
||||||
Index size = m.size();
|
Index size = m.size();
|
||||||
@ -51,7 +50,6 @@ template<typename VectorType> void map_class_vector(const VectorType& m)
|
|||||||
|
|
||||||
template<typename MatrixType> void map_class_matrix(const MatrixType& m)
|
template<typename MatrixType> void map_class_matrix(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
|
|
||||||
Index rows = m.rows(), cols = m.cols(), size = rows*cols;
|
Index rows = m.rows(), cols = m.cols(), size = rows*cols;
|
||||||
@ -122,7 +120,6 @@ template<typename MatrixType> void map_class_matrix(const MatrixType& m)
|
|||||||
|
|
||||||
template<typename VectorType> void map_static_methods(const VectorType& m)
|
template<typename VectorType> void map_static_methods(const VectorType& m)
|
||||||
{
|
{
|
||||||
typedef typename VectorType::Index Index;
|
|
||||||
typedef typename VectorType::Scalar Scalar;
|
typedef typename VectorType::Scalar Scalar;
|
||||||
|
|
||||||
Index size = m.size();
|
Index size = m.size();
|
||||||
@ -164,7 +161,6 @@ template<typename Scalar>
|
|||||||
void map_not_aligned_on_scalar()
|
void map_not_aligned_on_scalar()
|
||||||
{
|
{
|
||||||
typedef Matrix<Scalar,Dynamic,Dynamic> MatrixType;
|
typedef Matrix<Scalar,Dynamic,Dynamic> MatrixType;
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
Index size = 11;
|
Index size = 11;
|
||||||
Scalar* array1 = internal::aligned_new<Scalar>((size+1)*(size+1)+1);
|
Scalar* array1 = internal::aligned_new<Scalar>((size+1)*(size+1)+1);
|
||||||
Scalar* array2 = reinterpret_cast<Scalar*>(sizeof(Scalar)/2+std::size_t(array1));
|
Scalar* array2 = reinterpret_cast<Scalar*>(sizeof(Scalar)/2+std::size_t(array1));
|
||||||
|
@ -69,7 +69,6 @@ struct mapstaticmethods_impl<PlainObjectType, true, false>
|
|||||||
{
|
{
|
||||||
static void run(const PlainObjectType& m)
|
static void run(const PlainObjectType& m)
|
||||||
{
|
{
|
||||||
typedef typename PlainObjectType::Index Index;
|
|
||||||
Index rows = m.rows(), cols = m.cols();
|
Index rows = m.rows(), cols = m.cols();
|
||||||
|
|
||||||
int i = internal::random<int>(2,5), j = internal::random<int>(2,5);
|
int i = internal::random<int>(2,5), j = internal::random<int>(2,5);
|
||||||
@ -116,7 +115,6 @@ struct mapstaticmethods_impl<PlainObjectType, true, true>
|
|||||||
{
|
{
|
||||||
static void run(const PlainObjectType& v)
|
static void run(const PlainObjectType& v)
|
||||||
{
|
{
|
||||||
typedef typename PlainObjectType::Index Index;
|
|
||||||
Index size = v.size();
|
Index size = v.size();
|
||||||
|
|
||||||
int i = internal::random<int>(2,5);
|
int i = internal::random<int>(2,5);
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
template<int Alignment,typename VectorType> void map_class_vector(const VectorType& m)
|
template<int Alignment,typename VectorType> void map_class_vector(const VectorType& m)
|
||||||
{
|
{
|
||||||
typedef typename VectorType::Index Index;
|
|
||||||
typedef typename VectorType::Scalar Scalar;
|
typedef typename VectorType::Scalar Scalar;
|
||||||
|
|
||||||
Index size = m.size();
|
Index size = m.size();
|
||||||
@ -50,7 +49,6 @@ template<int Alignment,typename VectorType> void map_class_vector(const VectorTy
|
|||||||
|
|
||||||
template<int Alignment,typename MatrixType> void map_class_matrix(const MatrixType& _m)
|
template<int Alignment,typename MatrixType> void map_class_matrix(const MatrixType& _m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
|
|
||||||
Index rows = _m.rows(), cols = _m.cols();
|
Index rows = _m.rows(), cols = _m.cols();
|
||||||
|
@ -14,7 +14,6 @@ template<typename MatrixType> void miscMatrices(const MatrixType& m)
|
|||||||
/* this test covers the following files:
|
/* this test covers the following files:
|
||||||
DiagonalMatrix.h Ones.h
|
DiagonalMatrix.h Ones.h
|
||||||
*/
|
*/
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;
|
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;
|
||||||
Index rows = m.rows();
|
Index rows = m.rows();
|
||||||
|
@ -24,7 +24,6 @@ template<typename MatrixType> void nomalloc(const MatrixType& m)
|
|||||||
{
|
{
|
||||||
/* this test check no dynamic memory allocation are issued with fixed-size matrices
|
/* this test check no dynamic memory allocation are issued with fixed-size matrices
|
||||||
*/
|
*/
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
|
|
||||||
Index rows = m.rows();
|
Index rows = m.rows();
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
template<typename MatrixType> void permutationmatrices(const MatrixType& m)
|
template<typename MatrixType> void permutationmatrices(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
enum { Rows = MatrixType::RowsAtCompileTime, Cols = MatrixType::ColsAtCompileTime,
|
enum { Rows = MatrixType::RowsAtCompileTime, Cols = MatrixType::ColsAtCompileTime,
|
||||||
Options = MatrixType::Options };
|
Options = MatrixType::Options };
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
template<typename MatrixType> void product_extra(const MatrixType& m)
|
template<typename MatrixType> void product_extra(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
typedef Matrix<Scalar, 1, Dynamic> RowVectorType;
|
typedef Matrix<Scalar, 1, Dynamic> RowVectorType;
|
||||||
typedef Matrix<Scalar, Dynamic, 1> ColVectorType;
|
typedef Matrix<Scalar, Dynamic, 1> ColVectorType;
|
||||||
|
@ -15,7 +15,6 @@ template<typename MatrixType> void product_notemporary(const MatrixType& m)
|
|||||||
{
|
{
|
||||||
/* This test checks the number of temporaries created
|
/* This test checks the number of temporaries created
|
||||||
* during the evaluation of a complex expression */
|
* during the evaluation of a complex expression */
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
typedef typename MatrixType::RealScalar RealScalar;
|
typedef typename MatrixType::RealScalar RealScalar;
|
||||||
typedef Matrix<Scalar, 1, Dynamic> RowVectorType;
|
typedef Matrix<Scalar, 1, Dynamic> RowVectorType;
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
template<typename MatrixType> void product_selfadjoint(const MatrixType& m)
|
template<typename MatrixType> void product_selfadjoint(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;
|
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;
|
||||||
typedef Matrix<Scalar, 1, MatrixType::RowsAtCompileTime> RowVectorType;
|
typedef Matrix<Scalar, 1, MatrixType::RowsAtCompileTime> RowVectorType;
|
||||||
|
@ -16,7 +16,6 @@ template<typename Scalar, int Size, int OtherSize> void symm(int size = Size, in
|
|||||||
typedef Matrix<Scalar, OtherSize, Size> Rhs2;
|
typedef Matrix<Scalar, OtherSize, Size> Rhs2;
|
||||||
enum { order = OtherSize==1 ? 0 : RowMajor };
|
enum { order = OtherSize==1 ? 0 : RowMajor };
|
||||||
typedef Matrix<Scalar, Size, OtherSize,order> Rhs3;
|
typedef Matrix<Scalar, Size, OtherSize,order> Rhs3;
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
|
|
||||||
Index rows = size;
|
Index rows = size;
|
||||||
Index cols = size;
|
Index cols = size;
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
template<typename MatrixType> void syrk(const MatrixType& m)
|
template<typename MatrixType> void syrk(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::ColsAtCompileTime, RowMajor> RMatrixType;
|
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::ColsAtCompileTime, RowMajor> RMatrixType;
|
||||||
typedef Matrix<Scalar, MatrixType::ColsAtCompileTime, Dynamic> Rhs1;
|
typedef Matrix<Scalar, MatrixType::ColsAtCompileTime, Dynamic> Rhs1;
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
template<typename MatrixType> void trmv(const MatrixType& m)
|
template<typename MatrixType> void trmv(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||||
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;
|
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;
|
||||||
|
@ -12,8 +12,6 @@
|
|||||||
|
|
||||||
template<typename MatrixType> void qr(const MatrixType& m)
|
template<typename MatrixType> void qr(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
|
|
||||||
Index rows = m.rows();
|
Index rows = m.rows();
|
||||||
Index cols = m.cols();
|
Index cols = m.cols();
|
||||||
|
|
||||||
|
@ -14,8 +14,6 @@
|
|||||||
|
|
||||||
template <typename MatrixType>
|
template <typename MatrixType>
|
||||||
void cod() {
|
void cod() {
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
|
|
||||||
Index rows = internal::random<Index>(2, EIGEN_TEST_MAX_SIZE);
|
Index rows = internal::random<Index>(2, EIGEN_TEST_MAX_SIZE);
|
||||||
Index cols = internal::random<Index>(2, EIGEN_TEST_MAX_SIZE);
|
Index cols = internal::random<Index>(2, EIGEN_TEST_MAX_SIZE);
|
||||||
Index cols2 = internal::random<Index>(2, EIGEN_TEST_MAX_SIZE);
|
Index cols2 = internal::random<Index>(2, EIGEN_TEST_MAX_SIZE);
|
||||||
@ -94,7 +92,6 @@ void cod_fixedsize() {
|
|||||||
template<typename MatrixType> void qr()
|
template<typename MatrixType> void qr()
|
||||||
{
|
{
|
||||||
using std::sqrt;
|
using std::sqrt;
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
|
|
||||||
Index rows = internal::random<Index>(2,EIGEN_TEST_MAX_SIZE), cols = internal::random<Index>(2,EIGEN_TEST_MAX_SIZE), cols2 = internal::random<Index>(2,EIGEN_TEST_MAX_SIZE);
|
Index rows = internal::random<Index>(2,EIGEN_TEST_MAX_SIZE), cols = internal::random<Index>(2,EIGEN_TEST_MAX_SIZE), cols2 = internal::random<Index>(2,EIGEN_TEST_MAX_SIZE);
|
||||||
Index rank = internal::random<Index>(1, (std::min)(rows, cols)-1);
|
Index rank = internal::random<Index>(1, (std::min)(rows, cols)-1);
|
||||||
@ -211,7 +208,6 @@ template<typename MatrixType> void qr_kahan_matrix()
|
|||||||
{
|
{
|
||||||
using std::sqrt;
|
using std::sqrt;
|
||||||
using std::abs;
|
using std::abs;
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
typedef typename MatrixType::RealScalar RealScalar;
|
typedef typename MatrixType::RealScalar RealScalar;
|
||||||
|
|
||||||
|
@ -13,8 +13,6 @@
|
|||||||
|
|
||||||
template<typename MatrixType> void qr()
|
template<typename MatrixType> void qr()
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
|
|
||||||
Index max_size = EIGEN_TEST_MAX_SIZE;
|
Index max_size = EIGEN_TEST_MAX_SIZE;
|
||||||
Index min_size = numext::maxi(1,EIGEN_TEST_MAX_SIZE/10);
|
Index min_size = numext::maxi(1,EIGEN_TEST_MAX_SIZE/10);
|
||||||
Index rows = internal::random<Index>(min_size,max_size),
|
Index rows = internal::random<Index>(min_size,max_size),
|
||||||
|
@ -18,8 +18,6 @@
|
|||||||
template<typename MatrixType>
|
template<typename MatrixType>
|
||||||
void check_qtvector_matrix(const MatrixType& m)
|
void check_qtvector_matrix(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
|
|
||||||
Index rows = m.rows();
|
Index rows = m.rows();
|
||||||
Index cols = m.cols();
|
Index cols = m.cols();
|
||||||
MatrixType x = MatrixType::Random(rows,cols), y = MatrixType::Random(rows,cols);
|
MatrixType x = MatrixType::Random(rows,cols), y = MatrixType::Random(rows,cols);
|
||||||
|
@ -18,7 +18,6 @@ template<typename MatrixType> void real_qz(const MatrixType& m)
|
|||||||
RealQZ.h
|
RealQZ.h
|
||||||
*/
|
*/
|
||||||
using std::abs;
|
using std::abs;
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
|
|
||||||
Index dim = m.cols();
|
Index dim = m.cols();
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
template<typename MatrixType> void matrixRedux(const MatrixType& m)
|
template<typename MatrixType> void matrixRedux(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
typedef typename MatrixType::RealScalar RealScalar;
|
typedef typename MatrixType::RealScalar RealScalar;
|
||||||
|
|
||||||
@ -81,7 +80,6 @@ template<typename MatrixType> void matrixRedux(const MatrixType& m)
|
|||||||
template<typename VectorType> void vectorRedux(const VectorType& w)
|
template<typename VectorType> void vectorRedux(const VectorType& w)
|
||||||
{
|
{
|
||||||
using std::abs;
|
using std::abs;
|
||||||
typedef typename VectorType::Index Index;
|
|
||||||
typedef typename VectorType::Scalar Scalar;
|
typedef typename VectorType::Scalar Scalar;
|
||||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||||
Index size = w.size();
|
Index size = w.size();
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
|
|
||||||
template<typename MatrixType> void ref_matrix(const MatrixType& m)
|
template<typename MatrixType> void ref_matrix(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
typedef typename MatrixType::RealScalar RealScalar;
|
typedef typename MatrixType::RealScalar RealScalar;
|
||||||
typedef Matrix<Scalar,Dynamic,Dynamic,MatrixType::Options> DynMatrixType;
|
typedef Matrix<Scalar,Dynamic,Dynamic,MatrixType::Options> DynMatrixType;
|
||||||
@ -80,7 +79,6 @@ template<typename MatrixType> void ref_matrix(const MatrixType& m)
|
|||||||
|
|
||||||
template<typename VectorType> void ref_vector(const VectorType& m)
|
template<typename VectorType> void ref_vector(const VectorType& m)
|
||||||
{
|
{
|
||||||
typedef typename VectorType::Index Index;
|
|
||||||
typedef typename VectorType::Scalar Scalar;
|
typedef typename VectorType::Scalar Scalar;
|
||||||
typedef typename VectorType::RealScalar RealScalar;
|
typedef typename VectorType::RealScalar RealScalar;
|
||||||
typedef Matrix<Scalar,Dynamic,1,VectorType::Options> DynMatrixType;
|
typedef Matrix<Scalar,Dynamic,1,VectorType::Options> DynMatrixType;
|
||||||
|
@ -13,8 +13,6 @@
|
|||||||
|
|
||||||
template<typename MatrixType> void verifyIsQuasiTriangular(const MatrixType& T)
|
template<typename MatrixType> void verifyIsQuasiTriangular(const MatrixType& T)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
|
|
||||||
const Index size = T.cols();
|
const Index size = T.cols();
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
|
|
||||||
template<typename MatrixType> void selfadjoint(const MatrixType& m)
|
template<typename MatrixType> void selfadjoint(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
|
|
||||||
Index rows = m.rows();
|
Index rows = m.rows();
|
||||||
|
@ -21,7 +21,6 @@ template<typename MatrixType> void stable_norm(const MatrixType& m)
|
|||||||
*/
|
*/
|
||||||
using std::sqrt;
|
using std::sqrt;
|
||||||
using std::abs;
|
using std::abs;
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||||
|
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
template<typename MatrixType>
|
template<typename MatrixType>
|
||||||
void check_stddeque_matrix(const MatrixType& m)
|
void check_stddeque_matrix(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
|
|
||||||
Index rows = m.rows();
|
Index rows = m.rows();
|
||||||
Index cols = m.cols();
|
Index cols = m.cols();
|
||||||
MatrixType x = MatrixType::Random(rows,cols), y = MatrixType::Random(rows,cols);
|
MatrixType x = MatrixType::Random(rows,cols), y = MatrixType::Random(rows,cols);
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
template<typename MatrixType>
|
template<typename MatrixType>
|
||||||
void check_stdlist_matrix(const MatrixType& m)
|
void check_stdlist_matrix(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
|
|
||||||
Index rows = m.rows();
|
Index rows = m.rows();
|
||||||
Index cols = m.cols();
|
Index cols = m.cols();
|
||||||
MatrixType x = MatrixType::Random(rows,cols), y = MatrixType::Random(rows,cols);
|
MatrixType x = MatrixType::Random(rows,cols), y = MatrixType::Random(rows,cols);
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
template<typename SvdType, typename MatrixType>
|
template<typename SvdType, typename MatrixType>
|
||||||
void svd_check_full(const MatrixType& m, const SvdType& svd)
|
void svd_check_full(const MatrixType& m, const SvdType& svd)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
Index rows = m.rows();
|
Index rows = m.rows();
|
||||||
Index cols = m.cols();
|
Index cols = m.cols();
|
||||||
|
|
||||||
@ -101,7 +100,6 @@ void svd_least_square(const MatrixType& m, unsigned int computationOptions)
|
|||||||
{
|
{
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
typedef typename MatrixType::RealScalar RealScalar;
|
typedef typename MatrixType::RealScalar RealScalar;
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
Index rows = m.rows();
|
Index rows = m.rows();
|
||||||
Index cols = m.cols();
|
Index cols = m.cols();
|
||||||
|
|
||||||
@ -168,7 +166,6 @@ template<typename MatrixType>
|
|||||||
void svd_min_norm(const MatrixType& m, unsigned int computationOptions)
|
void svd_min_norm(const MatrixType& m, unsigned int computationOptions)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
Index cols = m.cols();
|
Index cols = m.cols();
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
@ -261,7 +258,6 @@ void svd_test_all_computation_options(const MatrixType& m, bool full_only)
|
|||||||
CALL_SUBTEST(( svd_min_norm(m, ComputeThinU | ComputeThinV) ));
|
CALL_SUBTEST(( svd_min_norm(m, ComputeThinU | ComputeThinV) ));
|
||||||
|
|
||||||
// test reconstruction
|
// test reconstruction
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
Index diagSize = (std::min)(m.rows(), m.cols());
|
Index diagSize = (std::min)(m.rows(), m.cols());
|
||||||
SvdType svd(m, ComputeThinU | ComputeThinV);
|
SvdType svd(m, ComputeThinU | ComputeThinV);
|
||||||
VERIFY_IS_APPROX(m, svd.matrixU().leftCols(diagSize) * svd.singularValues().asDiagonal() * svd.matrixV().leftCols(diagSize).adjoint());
|
VERIFY_IS_APPROX(m, svd.matrixU().leftCols(diagSize) * svd.singularValues().asDiagonal() * svd.matrixV().leftCols(diagSize).adjoint());
|
||||||
@ -437,7 +433,6 @@ template<typename SvdType,typename MatrixType>
|
|||||||
void svd_verify_assert(const MatrixType& m)
|
void svd_verify_assert(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
Index rows = m.rows();
|
Index rows = m.rows();
|
||||||
Index cols = m.cols();
|
Index cols = m.cols();
|
||||||
|
|
||||||
|
@ -23,7 +23,6 @@ void svd_fill_random(MatrixType &m, int Option = 0)
|
|||||||
using std::pow;
|
using std::pow;
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
typedef typename MatrixType::RealScalar RealScalar;
|
typedef typename MatrixType::RealScalar RealScalar;
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
Index diagSize = (std::min)(m.rows(), m.cols());
|
Index diagSize = (std::min)(m.rows(), m.cols());
|
||||||
RealScalar s = std::numeric_limits<RealScalar>::max_exponent10/4;
|
RealScalar s = std::numeric_limits<RealScalar>::max_exponent10/4;
|
||||||
s = internal::random<RealScalar>(1,s);
|
s = internal::random<RealScalar>(1,s);
|
||||||
|
@ -134,7 +134,6 @@ template<typename MatrixType> void triangular_square(const MatrixType& m)
|
|||||||
|
|
||||||
template<typename MatrixType> void triangular_rect(const MatrixType& m)
|
template<typename MatrixType> void triangular_rect(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef const typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||||
enum { Rows = MatrixType::RowsAtCompileTime, Cols = MatrixType::ColsAtCompileTime };
|
enum { Rows = MatrixType::RowsAtCompileTime, Cols = MatrixType::ColsAtCompileTime };
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
|
|
||||||
template<typename ArrayType> void vectorwiseop_array(const ArrayType& m)
|
template<typename ArrayType> void vectorwiseop_array(const ArrayType& m)
|
||||||
{
|
{
|
||||||
typedef typename ArrayType::Index Index;
|
|
||||||
typedef typename ArrayType::Scalar Scalar;
|
typedef typename ArrayType::Scalar Scalar;
|
||||||
typedef Array<Scalar, ArrayType::RowsAtCompileTime, 1> ColVectorType;
|
typedef Array<Scalar, ArrayType::RowsAtCompileTime, 1> ColVectorType;
|
||||||
typedef Array<Scalar, 1, ArrayType::ColsAtCompileTime> RowVectorType;
|
typedef Array<Scalar, 1, ArrayType::ColsAtCompileTime> RowVectorType;
|
||||||
@ -129,7 +128,6 @@ template<typename ArrayType> void vectorwiseop_array(const ArrayType& m)
|
|||||||
|
|
||||||
template<typename MatrixType> void vectorwiseop_matrix(const MatrixType& m)
|
template<typename MatrixType> void vectorwiseop_matrix(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||||
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> ColVectorType;
|
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> ColVectorType;
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
template<typename MatrixType> void matrixVisitor(const MatrixType& p)
|
template<typename MatrixType> void matrixVisitor(const MatrixType& p)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
|
|
||||||
Index rows = p.rows();
|
Index rows = p.rows();
|
||||||
Index cols = p.cols();
|
Index cols = p.cols();
|
||||||
@ -65,7 +64,6 @@ template<typename MatrixType> void matrixVisitor(const MatrixType& p)
|
|||||||
template<typename VectorType> void vectorVisitor(const VectorType& w)
|
template<typename VectorType> void vectorVisitor(const VectorType& w)
|
||||||
{
|
{
|
||||||
typedef typename VectorType::Scalar Scalar;
|
typedef typename VectorType::Scalar Scalar;
|
||||||
typedef typename VectorType::Index Index;
|
|
||||||
|
|
||||||
Index size = w.size();
|
Index size = w.size();
|
||||||
|
|
||||||
|
@ -25,7 +25,6 @@ inline bool test_isApprox_abs(const Type1& a, const Type2& b)
|
|||||||
template<typename MatrixType>
|
template<typename MatrixType>
|
||||||
MatrixType randomMatrixWithRealEivals(const typename MatrixType::Index size)
|
MatrixType randomMatrixWithRealEivals(const typename MatrixType::Index size)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
typedef typename MatrixType::RealScalar RealScalar;
|
typedef typename MatrixType::RealScalar RealScalar;
|
||||||
MatrixType diag = MatrixType::Zero(size, size);
|
MatrixType diag = MatrixType::Zero(size, size);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user