mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Avoid leading underscore followed by cap in template identifiers
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
5ad8b9bfe2
commit
4ba872bd75
@@ -14,7 +14,7 @@ namespace Eigen {
|
||||
|
||||
#if 0
|
||||
|
||||
// NOTE Have to be reimplemented as a specialization of BlockImpl< DynamicSparseMatrix<_Scalar, _Options, _Index>, ... >
|
||||
// NOTE Have to be reimplemented as a specialization of BlockImpl< DynamicSparseMatrix<Scalar_, Options_, Index_>, ... >
|
||||
// See SparseBlock.h for an example
|
||||
|
||||
|
||||
@@ -22,11 +22,11 @@ namespace Eigen {
|
||||
* specialisation for DynamicSparseMatrix
|
||||
***************************************************************************/
|
||||
|
||||
template<typename _Scalar, int _Options, typename _Index, int Size>
|
||||
class SparseInnerVectorSet<DynamicSparseMatrix<_Scalar, _Options, _Index>, Size>
|
||||
: public SparseMatrixBase<SparseInnerVectorSet<DynamicSparseMatrix<_Scalar, _Options, _Index>, Size> >
|
||||
template<typename Scalar_, int Options_, typename Index_, int Size>
|
||||
class SparseInnerVectorSet<DynamicSparseMatrix<Scalar_, Options_, Index_>, Size>
|
||||
: public SparseMatrixBase<SparseInnerVectorSet<DynamicSparseMatrix<Scalar_, Options_, Index_>, Size> >
|
||||
{
|
||||
typedef DynamicSparseMatrix<_Scalar, _Options, _Index> MatrixType;
|
||||
typedef DynamicSparseMatrix<Scalar_, Options_, Index_> MatrixType;
|
||||
public:
|
||||
|
||||
enum { IsRowMajor = internal::traits<SparseInnerVectorSet>::IsRowMajor };
|
||||
|
||||
@@ -46,21 +46,21 @@ namespace Eigen {
|
||||
* It is obviously required to describe the block layout beforehand by calling either
|
||||
* setBlockSize() for fixed-size blocks or setBlockLayout for variable-size blocks.
|
||||
*
|
||||
* \tparam _Scalar The Scalar type
|
||||
* \tparam Scalar_ The Scalar type
|
||||
* \tparam _BlockAtCompileTime The block layout option. It takes the following values
|
||||
* Dynamic : block size known at runtime
|
||||
* a numeric number : fixed-size block known at compile time
|
||||
*/
|
||||
template<typename _Scalar, int _BlockAtCompileTime=Dynamic, int _Options=ColMajor, typename _StorageIndex=int> class BlockSparseMatrix;
|
||||
template<typename Scalar_, int _BlockAtCompileTime=Dynamic, int Options_=ColMajor, typename StorageIndex_=int> class BlockSparseMatrix;
|
||||
|
||||
template<typename BlockSparseMatrixT> class BlockSparseMatrixView;
|
||||
|
||||
namespace internal {
|
||||
template<typename _Scalar, int _BlockAtCompileTime, int _Options, typename _Index>
|
||||
struct traits<BlockSparseMatrix<_Scalar,_BlockAtCompileTime,_Options, _Index> >
|
||||
template<typename Scalar_, int _BlockAtCompileTime, int Options_, typename Index_>
|
||||
struct traits<BlockSparseMatrix<Scalar_,_BlockAtCompileTime,Options_, Index_> >
|
||||
{
|
||||
typedef _Scalar Scalar;
|
||||
typedef _Index Index;
|
||||
typedef Scalar_ Scalar;
|
||||
typedef Index_ Index;
|
||||
typedef Sparse StorageKind; // FIXME Where is it used ??
|
||||
typedef MatrixXpr XprKind;
|
||||
enum {
|
||||
@@ -69,7 +69,7 @@ struct traits<BlockSparseMatrix<_Scalar,_BlockAtCompileTime,_Options, _Index> >
|
||||
MaxRowsAtCompileTime = Dynamic,
|
||||
MaxColsAtCompileTime = Dynamic,
|
||||
BlockSize = _BlockAtCompileTime,
|
||||
Flags = _Options | NestByRefBit | LvalueBit,
|
||||
Flags = Options_ | NestByRefBit | LvalueBit,
|
||||
CoeffReadCost = NumTraits<Scalar>::ReadCost,
|
||||
SupportedAccessPatterns = InnerRandomAccessPattern
|
||||
};
|
||||
@@ -280,17 +280,17 @@ class BlockSparseTimeDenseProduct
|
||||
BlockSparseTimeDenseProduct& operator=(const BlockSparseTimeDenseProduct&);
|
||||
};
|
||||
|
||||
template<typename _Scalar, int _BlockAtCompileTime, int _Options, typename _StorageIndex>
|
||||
class BlockSparseMatrix : public SparseMatrixBase<BlockSparseMatrix<_Scalar,_BlockAtCompileTime, _Options,_StorageIndex> >
|
||||
template<typename Scalar_, int _BlockAtCompileTime, int Options_, typename StorageIndex_>
|
||||
class BlockSparseMatrix : public SparseMatrixBase<BlockSparseMatrix<Scalar_,_BlockAtCompileTime, Options_,StorageIndex_> >
|
||||
{
|
||||
public:
|
||||
typedef _Scalar Scalar;
|
||||
typedef Scalar_ Scalar;
|
||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||
typedef _StorageIndex StorageIndex;
|
||||
typedef typename internal::ref_selector<BlockSparseMatrix<_Scalar, _BlockAtCompileTime, _Options, _StorageIndex> >::type Nested;
|
||||
typedef StorageIndex_ StorageIndex;
|
||||
typedef typename internal::ref_selector<BlockSparseMatrix<Scalar_, _BlockAtCompileTime, Options_, StorageIndex_> >::type Nested;
|
||||
|
||||
enum {
|
||||
Options = _Options,
|
||||
Options = Options_,
|
||||
Flags = Options,
|
||||
BlockSize=_BlockAtCompileTime,
|
||||
RowsAtCompileTime = Dynamic,
|
||||
@@ -968,13 +968,13 @@ class BlockSparseMatrix : public SparseMatrixBase<BlockSparseMatrix<_Scalar,_Blo
|
||||
Index m_blockSize; // Size of a block for fixed-size blocks, otherwise -1
|
||||
};
|
||||
|
||||
template<typename _Scalar, int _BlockAtCompileTime, int _Options, typename _StorageIndex>
|
||||
class BlockSparseMatrix<_Scalar, _BlockAtCompileTime, _Options, _StorageIndex>::BlockInnerIterator
|
||||
template<typename Scalar_, int _BlockAtCompileTime, int Options_, typename StorageIndex_>
|
||||
class BlockSparseMatrix<Scalar_, _BlockAtCompileTime, Options_, StorageIndex_>::BlockInnerIterator
|
||||
{
|
||||
public:
|
||||
|
||||
enum{
|
||||
Flags = _Options
|
||||
Flags = Options_
|
||||
};
|
||||
|
||||
BlockInnerIterator(const BlockSparseMatrix& mat, const Index outer)
|
||||
@@ -1010,14 +1010,14 @@ class BlockSparseMatrix<_Scalar, _BlockAtCompileTime, _Options, _StorageIndex>::
|
||||
inline operator bool() const { return (m_id < m_end); }
|
||||
|
||||
protected:
|
||||
const BlockSparseMatrix<_Scalar, _BlockAtCompileTime, _Options, StorageIndex>& m_mat;
|
||||
const BlockSparseMatrix<Scalar_, _BlockAtCompileTime, Options_, StorageIndex>& m_mat;
|
||||
const Index m_outer;
|
||||
Index m_id;
|
||||
Index m_end;
|
||||
};
|
||||
|
||||
template<typename _Scalar, int _BlockAtCompileTime, int _Options, typename _StorageIndex>
|
||||
class BlockSparseMatrix<_Scalar, _BlockAtCompileTime, _Options, _StorageIndex>::InnerIterator
|
||||
template<typename Scalar_, int _BlockAtCompileTime, int Options_, typename StorageIndex_>
|
||||
class BlockSparseMatrix<Scalar_, _BlockAtCompileTime, Options_, StorageIndex_>::InnerIterator
|
||||
{
|
||||
public:
|
||||
InnerIterator(const BlockSparseMatrix& mat, Index outer)
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Eigen {
|
||||
*
|
||||
* \brief A sparse matrix class designed for matrix assembly purpose
|
||||
*
|
||||
* \param _Scalar the scalar type, i.e. the type of the coefficients
|
||||
* \param Scalar_ the scalar type, i.e. the type of the coefficients
|
||||
*
|
||||
* Unlike SparseMatrix, this class provides a much higher degree of flexibility. In particular, it allows
|
||||
* random read/write accesses in log(rho*outer_size) where \c rho is the probability that a coefficient is
|
||||
@@ -33,11 +33,11 @@ namespace Eigen {
|
||||
*/
|
||||
|
||||
namespace internal {
|
||||
template<typename _Scalar, int _Options, typename _StorageIndex>
|
||||
struct traits<DynamicSparseMatrix<_Scalar, _Options, _StorageIndex> >
|
||||
template<typename Scalar_, int Options_, typename StorageIndex_>
|
||||
struct traits<DynamicSparseMatrix<Scalar_, Options_, StorageIndex_> >
|
||||
{
|
||||
typedef _Scalar Scalar;
|
||||
typedef _StorageIndex StorageIndex;
|
||||
typedef Scalar_ Scalar;
|
||||
typedef StorageIndex_ StorageIndex;
|
||||
typedef Sparse StorageKind;
|
||||
typedef MatrixXpr XprKind;
|
||||
enum {
|
||||
@@ -45,16 +45,16 @@ struct traits<DynamicSparseMatrix<_Scalar, _Options, _StorageIndex> >
|
||||
ColsAtCompileTime = Dynamic,
|
||||
MaxRowsAtCompileTime = Dynamic,
|
||||
MaxColsAtCompileTime = Dynamic,
|
||||
Flags = _Options | NestByRefBit | LvalueBit,
|
||||
Flags = Options_ | NestByRefBit | LvalueBit,
|
||||
CoeffReadCost = NumTraits<Scalar>::ReadCost,
|
||||
SupportedAccessPatterns = OuterRandomAccessPattern
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
template<typename _Scalar, int _Options, typename _StorageIndex>
|
||||
template<typename Scalar_, int Options_, typename StorageIndex_>
|
||||
class DynamicSparseMatrix
|
||||
: public SparseMatrixBase<DynamicSparseMatrix<_Scalar, _Options, _StorageIndex> >
|
||||
: public SparseMatrixBase<DynamicSparseMatrix<Scalar_, Options_, StorageIndex_> >
|
||||
{
|
||||
typedef SparseMatrixBase<DynamicSparseMatrix> Base;
|
||||
using Base::convert_index;
|
||||
@@ -67,7 +67,7 @@ template<typename _Scalar, int _Options, typename _StorageIndex>
|
||||
using Base::IsRowMajor;
|
||||
using Base::operator=;
|
||||
enum {
|
||||
Options = _Options
|
||||
Options = Options_
|
||||
};
|
||||
|
||||
protected:
|
||||
@@ -334,10 +334,10 @@ template<typename _Scalar, int _Options, typename _StorageIndex>
|
||||
# endif
|
||||
};
|
||||
|
||||
template<typename Scalar, int _Options, typename _StorageIndex>
|
||||
class DynamicSparseMatrix<Scalar,_Options,_StorageIndex>::InnerIterator : public SparseVector<Scalar,_Options,_StorageIndex>::InnerIterator
|
||||
template<typename Scalar, int Options_, typename StorageIndex_>
|
||||
class DynamicSparseMatrix<Scalar,Options_,StorageIndex_>::InnerIterator : public SparseVector<Scalar,Options_,StorageIndex_>::InnerIterator
|
||||
{
|
||||
typedef typename SparseVector<Scalar,_Options,_StorageIndex>::InnerIterator Base;
|
||||
typedef typename SparseVector<Scalar,Options_,StorageIndex_>::InnerIterator Base;
|
||||
public:
|
||||
InnerIterator(const DynamicSparseMatrix& mat, Index outer)
|
||||
: Base(mat.m_data[outer]), m_outer(outer)
|
||||
@@ -351,10 +351,10 @@ class DynamicSparseMatrix<Scalar,_Options,_StorageIndex>::InnerIterator : public
|
||||
const Index m_outer;
|
||||
};
|
||||
|
||||
template<typename Scalar, int _Options, typename _StorageIndex>
|
||||
class DynamicSparseMatrix<Scalar,_Options,_StorageIndex>::ReverseInnerIterator : public SparseVector<Scalar,_Options,_StorageIndex>::ReverseInnerIterator
|
||||
template<typename Scalar, int Options_, typename StorageIndex_>
|
||||
class DynamicSparseMatrix<Scalar,Options_,StorageIndex_>::ReverseInnerIterator : public SparseVector<Scalar,Options_,StorageIndex_>::ReverseInnerIterator
|
||||
{
|
||||
typedef typename SparseVector<Scalar,_Options,_StorageIndex>::ReverseInnerIterator Base;
|
||||
typedef typename SparseVector<Scalar,Options_,StorageIndex_>::ReverseInnerIterator Base;
|
||||
public:
|
||||
ReverseInnerIterator(const DynamicSparseMatrix& mat, Index outer)
|
||||
: Base(mat.m_data[outer]), m_outer(outer)
|
||||
@@ -370,17 +370,17 @@ class DynamicSparseMatrix<Scalar,_Options,_StorageIndex>::ReverseInnerIterator :
|
||||
|
||||
namespace internal {
|
||||
|
||||
template<typename _Scalar, int _Options, typename _StorageIndex>
|
||||
struct evaluator<DynamicSparseMatrix<_Scalar,_Options,_StorageIndex> >
|
||||
: evaluator_base<DynamicSparseMatrix<_Scalar,_Options,_StorageIndex> >
|
||||
template<typename Scalar_, int Options_, typename StorageIndex_>
|
||||
struct evaluator<DynamicSparseMatrix<Scalar_,Options_,StorageIndex_> >
|
||||
: evaluator_base<DynamicSparseMatrix<Scalar_,Options_,StorageIndex_> >
|
||||
{
|
||||
typedef _Scalar Scalar;
|
||||
typedef DynamicSparseMatrix<_Scalar,_Options,_StorageIndex> SparseMatrixType;
|
||||
typedef Scalar_ Scalar;
|
||||
typedef DynamicSparseMatrix<Scalar_,Options_,StorageIndex_> SparseMatrixType;
|
||||
typedef typename SparseMatrixType::InnerIterator InnerIterator;
|
||||
typedef typename SparseMatrixType::ReverseInnerIterator ReverseInnerIterator;
|
||||
|
||||
enum {
|
||||
CoeffReadCost = NumTraits<_Scalar>::ReadCost,
|
||||
CoeffReadCost = NumTraits<Scalar_>::ReadCost,
|
||||
Flags = SparseMatrixType::Flags
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user