mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-14 04:35:57 +08:00
Fix more shadowing typedefs
This commit is contained in:
parent
718e954df4
commit
3b92f547f5
@ -499,8 +499,6 @@ void SparseLU<MatrixType, OrderingType>::factorize(const MatrixType& matrix)
|
|||||||
eigen_assert(m_analysisIsOk && "analyzePattern() should be called first");
|
eigen_assert(m_analysisIsOk && "analyzePattern() should be called first");
|
||||||
eigen_assert((matrix.rows() == matrix.cols()) && "Only for squared matrices");
|
eigen_assert((matrix.rows() == matrix.cols()) && "Only for squared matrices");
|
||||||
|
|
||||||
typedef typename IndexVector::Scalar StorageIndex;
|
|
||||||
|
|
||||||
m_isInitialized = true;
|
m_isInitialized = true;
|
||||||
|
|
||||||
|
|
||||||
|
@ -116,15 +116,6 @@ struct TensorEvaluator<const TensorContractionOp<Indices, LeftArgType, RightArgT
|
|||||||
template <bool lhs_inner_dim_contiguous, bool rhs_inner_dim_contiguous,
|
template <bool lhs_inner_dim_contiguous, bool rhs_inner_dim_contiguous,
|
||||||
bool rhs_inner_dim_reordered, int Alignment>
|
bool rhs_inner_dim_reordered, int Alignment>
|
||||||
void evalProduct(Scalar* buffer) const {
|
void evalProduct(Scalar* buffer) const {
|
||||||
typedef
|
|
||||||
typename internal::remove_const<typename EvalLeftArgType::Scalar>::type
|
|
||||||
LhsScalar;
|
|
||||||
typedef
|
|
||||||
typename internal::remove_const<typename EvalRightArgType::Scalar>::type
|
|
||||||
RhsScalar;
|
|
||||||
typedef typename internal::gebp_traits<LhsScalar, RhsScalar> Traits;
|
|
||||||
typedef TensorEvaluator<EvalLeftArgType, Device> LeftEvaluator;
|
|
||||||
typedef TensorEvaluator<EvalRightArgType, Device> RightEvaluator;
|
|
||||||
typedef internal::TensorContractionInputMapper<
|
typedef internal::TensorContractionInputMapper<
|
||||||
LhsScalar, Index, internal::Lhs, LeftEvaluator, left_nocontract_t,
|
LhsScalar, Index, internal::Lhs, LeftEvaluator, left_nocontract_t,
|
||||||
contract_t, internal::packet_traits<LhsScalar>::size,
|
contract_t, internal::packet_traits<LhsScalar>::size,
|
||||||
|
@ -392,7 +392,6 @@ inline typename DGMRES<_MatrixType, _Preconditioner>::ComplexVector DGMRES<_Matr
|
|||||||
template< typename _MatrixType, typename _Preconditioner>
|
template< typename _MatrixType, typename _Preconditioner>
|
||||||
inline typename DGMRES<_MatrixType, _Preconditioner>::ComplexVector DGMRES<_MatrixType, _Preconditioner>::schurValues(const RealSchur<DenseMatrix>& schurofH) const
|
inline typename DGMRES<_MatrixType, _Preconditioner>::ComplexVector DGMRES<_MatrixType, _Preconditioner>::schurValues(const RealSchur<DenseMatrix>& schurofH) const
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
const DenseMatrix& T = schurofH.matrixT();
|
const DenseMatrix& T = schurofH.matrixT();
|
||||||
Index it = T.rows();
|
Index it = T.rows();
|
||||||
ComplexVector eig(it);
|
ComplexVector eig(it);
|
||||||
|
@ -120,7 +120,6 @@ template <typename MatrixType, typename ResultType>
|
|||||||
void matrix_sqrt_quasi_triangular_diagonal(const MatrixType& T, ResultType& sqrtT)
|
void matrix_sqrt_quasi_triangular_diagonal(const MatrixType& T, ResultType& sqrtT)
|
||||||
{
|
{
|
||||||
using std::sqrt;
|
using std::sqrt;
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
const Index size = T.rows();
|
const Index size = T.rows();
|
||||||
for (Index i = 0; i < size; i++) {
|
for (Index i = 0; i < size; i++) {
|
||||||
if (i == size - 1 || T.coeff(i+1, i) == 0) {
|
if (i == size - 1 || T.coeff(i+1, i) == 0) {
|
||||||
@ -139,7 +138,6 @@ void matrix_sqrt_quasi_triangular_diagonal(const MatrixType& T, ResultType& sqrt
|
|||||||
template <typename MatrixType, typename ResultType>
|
template <typename MatrixType, typename ResultType>
|
||||||
void matrix_sqrt_quasi_triangular_off_diagonal(const MatrixType& T, ResultType& sqrtT)
|
void matrix_sqrt_quasi_triangular_off_diagonal(const MatrixType& T, ResultType& sqrtT)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
const Index size = T.rows();
|
const Index size = T.rows();
|
||||||
for (Index j = 1; j < size; j++) {
|
for (Index j = 1; j < size; j++) {
|
||||||
if (T.coeff(j, j-1) != 0) // if T(j-1:j, j-1:j) is a 2-by-2 block
|
if (T.coeff(j, j-1) != 0) // if T(j-1:j, j-1:j) is a 2-by-2 block
|
||||||
@ -206,7 +204,6 @@ template <typename MatrixType, typename ResultType>
|
|||||||
void matrix_sqrt_triangular(const MatrixType &arg, ResultType &result)
|
void matrix_sqrt_triangular(const MatrixType &arg, ResultType &result)
|
||||||
{
|
{
|
||||||
using std::sqrt;
|
using std::sqrt;
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
|
|
||||||
eigen_assert(arg.rows() == arg.cols());
|
eigen_assert(arg.rows() == arg.cols());
|
||||||
@ -318,7 +315,6 @@ template<typename Derived> class MatrixSquareRootReturnValue
|
|||||||
: public ReturnByValue<MatrixSquareRootReturnValue<Derived> >
|
: public ReturnByValue<MatrixSquareRootReturnValue<Derived> >
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
typedef typename Derived::Index Index;
|
|
||||||
typedef typename internal::ref_selector<Derived>::type DerivedNested;
|
typedef typename internal::ref_selector<Derived>::type DerivedNested;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -134,7 +134,7 @@ template<typename SparseMatrixType>
|
|||||||
bool loadMarket(SparseMatrixType& mat, const std::string& filename)
|
bool loadMarket(SparseMatrixType& mat, const std::string& filename)
|
||||||
{
|
{
|
||||||
typedef typename SparseMatrixType::Scalar Scalar;
|
typedef typename SparseMatrixType::Scalar Scalar;
|
||||||
typedef typename SparseMatrixType::Index Index;
|
typedef typename SparseMatrixType::StorageIndex StorageIndex;
|
||||||
std::ifstream input(filename.c_str(),std::ios::in);
|
std::ifstream input(filename.c_str(),std::ios::in);
|
||||||
if(!input)
|
if(!input)
|
||||||
return false;
|
return false;
|
||||||
@ -144,11 +144,11 @@ bool loadMarket(SparseMatrixType& mat, const std::string& filename)
|
|||||||
|
|
||||||
bool readsizes = false;
|
bool readsizes = false;
|
||||||
|
|
||||||
typedef Triplet<Scalar,Index> T;
|
typedef Triplet<Scalar,StorageIndex> T;
|
||||||
std::vector<T> elements;
|
std::vector<T> elements;
|
||||||
|
|
||||||
Index M(-1), N(-1), NNZ(-1);
|
StorageIndex M(-1), N(-1), NNZ(-1);
|
||||||
Index count = 0;
|
StorageIndex count = 0;
|
||||||
while(input.getline(buffer, maxBuffersize))
|
while(input.getline(buffer, maxBuffersize))
|
||||||
{
|
{
|
||||||
// skip comments
|
// skip comments
|
||||||
@ -171,7 +171,7 @@ bool loadMarket(SparseMatrixType& mat, const std::string& filename)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Index i(-1), j(-1);
|
StorageIndex i(-1), j(-1);
|
||||||
Scalar value;
|
Scalar value;
|
||||||
if( internal::GetMarketLine(line, M, N, i, j, value) )
|
if( internal::GetMarketLine(line, M, N, i, j, value) )
|
||||||
{
|
{
|
||||||
|
@ -249,8 +249,6 @@ namespace Eigen
|
|||||||
DenseIndex degree,
|
DenseIndex degree,
|
||||||
const typename Spline<_Scalar, _Dim, _Degree>::KnotVectorType& knots)
|
const typename Spline<_Scalar, _Dim, _Degree>::KnotVectorType& knots)
|
||||||
{
|
{
|
||||||
typedef typename Spline<_Scalar, _Dim, _Degree>::BasisVectorType BasisVectorType;
|
|
||||||
|
|
||||||
const DenseIndex p = degree;
|
const DenseIndex p = degree;
|
||||||
const DenseIndex i = Spline::Span(u, degree, knots);
|
const DenseIndex i = Spline::Span(u, degree, knots);
|
||||||
|
|
||||||
@ -380,9 +378,6 @@ namespace Eigen
|
|||||||
typedef Spline<_Scalar, _Dim, _Degree> SplineType;
|
typedef Spline<_Scalar, _Dim, _Degree> SplineType;
|
||||||
enum { Order = SplineTraits<SplineType>::OrderAtCompileTime };
|
enum { Order = SplineTraits<SplineType>::OrderAtCompileTime };
|
||||||
|
|
||||||
typedef typename SplineTraits<SplineType>::Scalar Scalar;
|
|
||||||
typedef typename SplineTraits<SplineType>::BasisVectorType BasisVectorType;
|
|
||||||
|
|
||||||
const DenseIndex span = SplineType::Span(u, p, U);
|
const DenseIndex span = SplineType::Span(u, p, U);
|
||||||
|
|
||||||
const DenseIndex n = (std::min)(p, order);
|
const DenseIndex n = (std::min)(p, order);
|
||||||
|
@ -50,7 +50,6 @@ struct randomMatrixWithImagEivals<MatrixType, 0>
|
|||||||
{
|
{
|
||||||
static MatrixType run(const typename MatrixType::Index size)
|
static MatrixType run(const typename MatrixType::Index size)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
MatrixType diag = MatrixType::Zero(size, size);
|
MatrixType diag = MatrixType::Zero(size, size);
|
||||||
Index i = 0;
|
Index i = 0;
|
||||||
@ -78,7 +77,6 @@ struct randomMatrixWithImagEivals<MatrixType, 1>
|
|||||||
{
|
{
|
||||||
static MatrixType run(const typename MatrixType::Index size)
|
static MatrixType run(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;
|
||||||
const Scalar imagUnit(0, 1);
|
const Scalar imagUnit(0, 1);
|
||||||
@ -170,7 +168,6 @@ void testMatrixType(const MatrixType& m)
|
|||||||
{
|
{
|
||||||
// Matrices with clustered eigenvalue lead to different code paths
|
// Matrices with clustered eigenvalue lead to different code paths
|
||||||
// in MatrixFunction.h and are thus useful for testing.
|
// in MatrixFunction.h and are thus useful for testing.
|
||||||
typedef typename MatrixType::Index Index;
|
|
||||||
|
|
||||||
const Index size = m.rows();
|
const Index size = m.rows();
|
||||||
for (int i = 0; i < g_repeat; i++) {
|
for (int i = 0; i < g_repeat; i++) {
|
||||||
|
@ -318,10 +318,6 @@ void test_openglsupport()
|
|||||||
|
|
||||||
GLint prg_id = createShader(vtx,frg);
|
GLint prg_id = createShader(vtx,frg);
|
||||||
|
|
||||||
typedef Vector2d Vector2d;
|
|
||||||
typedef Vector3d Vector3d;
|
|
||||||
typedef Vector4d Vector4d;
|
|
||||||
|
|
||||||
VERIFY_UNIFORM(dv,v2d, Vector2d);
|
VERIFY_UNIFORM(dv,v2d, Vector2d);
|
||||||
VERIFY_UNIFORM(dv,v3d, Vector3d);
|
VERIFY_UNIFORM(dv,v3d, Vector3d);
|
||||||
VERIFY_UNIFORM(dv,v4d, Vector4d);
|
VERIFY_UNIFORM(dv,v4d, Vector4d);
|
||||||
|
@ -30,7 +30,6 @@ struct increment_if_fixed_size
|
|||||||
template<int Deg, typename POLYNOMIAL, typename SOLVER>
|
template<int Deg, typename POLYNOMIAL, typename SOLVER>
|
||||||
bool aux_evalSolver( const POLYNOMIAL& pols, SOLVER& psolve )
|
bool aux_evalSolver( const POLYNOMIAL& pols, SOLVER& psolve )
|
||||||
{
|
{
|
||||||
typedef typename POLYNOMIAL::Index Index;
|
|
||||||
typedef typename POLYNOMIAL::Scalar Scalar;
|
typedef typename POLYNOMIAL::Scalar Scalar;
|
||||||
|
|
||||||
typedef typename SOLVER::RootsType RootsType;
|
typedef typename SOLVER::RootsType RootsType;
|
||||||
@ -107,7 +106,6 @@ void evalSolverSugarFunction( const POLYNOMIAL& pols, const ROOTS& roots, const
|
|||||||
// 1) the roots found are correct
|
// 1) the roots found are correct
|
||||||
// 2) the roots have distinct moduli
|
// 2) the roots have distinct moduli
|
||||||
|
|
||||||
typedef typename POLYNOMIAL::Scalar Scalar;
|
|
||||||
typedef typename REAL_ROOTS::Scalar Real;
|
typedef typename REAL_ROOTS::Scalar Real;
|
||||||
|
|
||||||
//Test realRoots
|
//Test realRoots
|
||||||
|
Loading…
x
Reference in New Issue
Block a user