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((matrix.rows() == matrix.cols()) && "Only for squared matrices");
|
||||
|
||||
typedef typename IndexVector::Scalar StorageIndex;
|
||||
|
||||
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,
|
||||
bool rhs_inner_dim_reordered, int Alignment>
|
||||
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<
|
||||
LhsScalar, Index, internal::Lhs, LeftEvaluator, left_nocontract_t,
|
||||
contract_t, internal::packet_traits<LhsScalar>::size,
|
||||
|
@ -392,7 +392,6 @@ inline typename DGMRES<_MatrixType, _Preconditioner>::ComplexVector DGMRES<_Matr
|
||||
template< typename _MatrixType, typename _Preconditioner>
|
||||
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();
|
||||
Index it = T.rows();
|
||||
ComplexVector eig(it);
|
||||
|
@ -120,7 +120,6 @@ template <typename MatrixType, typename ResultType>
|
||||
void matrix_sqrt_quasi_triangular_diagonal(const MatrixType& T, ResultType& sqrtT)
|
||||
{
|
||||
using std::sqrt;
|
||||
typedef typename MatrixType::Index Index;
|
||||
const Index size = T.rows();
|
||||
for (Index i = 0; i < size; i++) {
|
||||
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>
|
||||
void matrix_sqrt_quasi_triangular_off_diagonal(const MatrixType& T, ResultType& sqrtT)
|
||||
{
|
||||
typedef typename MatrixType::Index Index;
|
||||
const Index size = T.rows();
|
||||
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
|
||||
@ -206,7 +204,6 @@ template <typename MatrixType, typename ResultType>
|
||||
void matrix_sqrt_triangular(const MatrixType &arg, ResultType &result)
|
||||
{
|
||||
using std::sqrt;
|
||||
typedef typename MatrixType::Index Index;
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
|
||||
eigen_assert(arg.rows() == arg.cols());
|
||||
@ -318,7 +315,6 @@ template<typename Derived> class MatrixSquareRootReturnValue
|
||||
: public ReturnByValue<MatrixSquareRootReturnValue<Derived> >
|
||||
{
|
||||
protected:
|
||||
typedef typename Derived::Index Index;
|
||||
typedef typename internal::ref_selector<Derived>::type DerivedNested;
|
||||
|
||||
public:
|
||||
|
@ -134,7 +134,7 @@ template<typename SparseMatrixType>
|
||||
bool loadMarket(SparseMatrixType& mat, const std::string& filename)
|
||||
{
|
||||
typedef typename SparseMatrixType::Scalar Scalar;
|
||||
typedef typename SparseMatrixType::Index Index;
|
||||
typedef typename SparseMatrixType::StorageIndex StorageIndex;
|
||||
std::ifstream input(filename.c_str(),std::ios::in);
|
||||
if(!input)
|
||||
return false;
|
||||
@ -144,11 +144,11 @@ bool loadMarket(SparseMatrixType& mat, const std::string& filename)
|
||||
|
||||
bool readsizes = false;
|
||||
|
||||
typedef Triplet<Scalar,Index> T;
|
||||
typedef Triplet<Scalar,StorageIndex> T;
|
||||
std::vector<T> elements;
|
||||
|
||||
Index M(-1), N(-1), NNZ(-1);
|
||||
Index count = 0;
|
||||
StorageIndex M(-1), N(-1), NNZ(-1);
|
||||
StorageIndex count = 0;
|
||||
while(input.getline(buffer, maxBuffersize))
|
||||
{
|
||||
// skip comments
|
||||
@ -171,7 +171,7 @@ bool loadMarket(SparseMatrixType& mat, const std::string& filename)
|
||||
}
|
||||
else
|
||||
{
|
||||
Index i(-1), j(-1);
|
||||
StorageIndex i(-1), j(-1);
|
||||
Scalar value;
|
||||
if( internal::GetMarketLine(line, M, N, i, j, value) )
|
||||
{
|
||||
|
@ -249,8 +249,6 @@ namespace Eigen
|
||||
DenseIndex degree,
|
||||
const typename Spline<_Scalar, _Dim, _Degree>::KnotVectorType& knots)
|
||||
{
|
||||
typedef typename Spline<_Scalar, _Dim, _Degree>::BasisVectorType BasisVectorType;
|
||||
|
||||
const DenseIndex p = degree;
|
||||
const DenseIndex i = Spline::Span(u, degree, knots);
|
||||
|
||||
@ -380,9 +378,6 @@ namespace Eigen
|
||||
typedef Spline<_Scalar, _Dim, _Degree> SplineType;
|
||||
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 n = (std::min)(p, order);
|
||||
|
@ -50,7 +50,6 @@ struct randomMatrixWithImagEivals<MatrixType, 0>
|
||||
{
|
||||
static MatrixType run(const typename MatrixType::Index size)
|
||||
{
|
||||
typedef typename MatrixType::Index Index;
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
MatrixType diag = MatrixType::Zero(size, size);
|
||||
Index i = 0;
|
||||
@ -78,7 +77,6 @@ struct randomMatrixWithImagEivals<MatrixType, 1>
|
||||
{
|
||||
static MatrixType run(const typename MatrixType::Index size)
|
||||
{
|
||||
typedef typename MatrixType::Index Index;
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef typename MatrixType::RealScalar RealScalar;
|
||||
const Scalar imagUnit(0, 1);
|
||||
@ -170,7 +168,6 @@ void testMatrixType(const MatrixType& m)
|
||||
{
|
||||
// Matrices with clustered eigenvalue lead to different code paths
|
||||
// in MatrixFunction.h and are thus useful for testing.
|
||||
typedef typename MatrixType::Index Index;
|
||||
|
||||
const Index size = m.rows();
|
||||
for (int i = 0; i < g_repeat; i++) {
|
||||
|
@ -318,10 +318,6 @@ void test_openglsupport()
|
||||
|
||||
GLint prg_id = createShader(vtx,frg);
|
||||
|
||||
typedef Vector2d Vector2d;
|
||||
typedef Vector3d Vector3d;
|
||||
typedef Vector4d Vector4d;
|
||||
|
||||
VERIFY_UNIFORM(dv,v2d, Vector2d);
|
||||
VERIFY_UNIFORM(dv,v3d, Vector3d);
|
||||
VERIFY_UNIFORM(dv,v4d, Vector4d);
|
||||
|
@ -30,7 +30,6 @@ struct increment_if_fixed_size
|
||||
template<int Deg, typename POLYNOMIAL, typename SOLVER>
|
||||
bool aux_evalSolver( const POLYNOMIAL& pols, SOLVER& psolve )
|
||||
{
|
||||
typedef typename POLYNOMIAL::Index Index;
|
||||
typedef typename POLYNOMIAL::Scalar Scalar;
|
||||
|
||||
typedef typename SOLVER::RootsType RootsType;
|
||||
@ -107,7 +106,6 @@ void evalSolverSugarFunction( const POLYNOMIAL& pols, const ROOTS& roots, const
|
||||
// 1) the roots found are correct
|
||||
// 2) the roots have distinct moduli
|
||||
|
||||
typedef typename POLYNOMIAL::Scalar Scalar;
|
||||
typedef typename REAL_ROOTS::Scalar Real;
|
||||
|
||||
//Test realRoots
|
||||
|
Loading…
x
Reference in New Issue
Block a user