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
@@ -116,7 +116,7 @@ protected:
|
||||
* using the default algorithm.
|
||||
*/
|
||||
template<typename MatrixType>
|
||||
//template<typename _Scalar>
|
||||
//template<typename Scalar_>
|
||||
void SkylineInplaceLU<MatrixType>::compute() {
|
||||
const size_t rows = m_lu.rows();
|
||||
const size_t cols = m_lu.cols();
|
||||
|
||||
@@ -24,16 +24,16 @@ namespace Eigen {
|
||||
* This class implements a skyline matrix using the very uncommon storage
|
||||
* scheme.
|
||||
*
|
||||
* \param _Scalar the scalar type, i.e. the type of the coefficients
|
||||
* \param _Options Union of bit flags controlling the storage scheme. Currently the only possibility
|
||||
* \param Scalar_ the scalar type, i.e. the type of the coefficients
|
||||
* \param Options_ Union of bit flags controlling the storage scheme. Currently the only possibility
|
||||
* is RowMajor. The default is 0 which means column-major.
|
||||
*
|
||||
*
|
||||
*/
|
||||
namespace internal {
|
||||
template<typename _Scalar, int _Options>
|
||||
struct traits<SkylineMatrix<_Scalar, _Options> > {
|
||||
typedef _Scalar Scalar;
|
||||
template<typename Scalar_, int Options_>
|
||||
struct traits<SkylineMatrix<Scalar_, Options_> > {
|
||||
typedef Scalar_ Scalar;
|
||||
typedef Sparse StorageKind;
|
||||
|
||||
enum {
|
||||
@@ -41,15 +41,15 @@ struct traits<SkylineMatrix<_Scalar, _Options> > {
|
||||
ColsAtCompileTime = Dynamic,
|
||||
MaxRowsAtCompileTime = Dynamic,
|
||||
MaxColsAtCompileTime = Dynamic,
|
||||
Flags = SkylineBit | _Options,
|
||||
Flags = SkylineBit | Options_,
|
||||
CoeffReadCost = NumTraits<Scalar>::ReadCost,
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
template<typename _Scalar, int _Options>
|
||||
template<typename Scalar_, int Options_>
|
||||
class SkylineMatrix
|
||||
: public SkylineMatrixBase<SkylineMatrix<_Scalar, _Options> > {
|
||||
: public SkylineMatrixBase<SkylineMatrix<Scalar_, Options_> > {
|
||||
public:
|
||||
EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE(SkylineMatrix)
|
||||
EIGEN_SKYLINE_INHERIT_ASSIGNMENT_OPERATOR(SkylineMatrix, +=)
|
||||
@@ -731,15 +731,15 @@ public:
|
||||
Scalar sum() const;
|
||||
};
|
||||
|
||||
template<typename Scalar, int _Options>
|
||||
class SkylineMatrix<Scalar, _Options>::InnerUpperIterator {
|
||||
template<typename Scalar, int Options_>
|
||||
class SkylineMatrix<Scalar, Options_>::InnerUpperIterator {
|
||||
public:
|
||||
|
||||
InnerUpperIterator(const SkylineMatrix& mat, Index outer)
|
||||
: m_matrix(mat), m_outer(outer),
|
||||
m_id(_Options == RowMajor ? mat.m_colStartIndex[outer] : mat.m_rowStartIndex[outer] + 1),
|
||||
m_id(Options_ == RowMajor ? mat.m_colStartIndex[outer] : mat.m_rowStartIndex[outer] + 1),
|
||||
m_start(m_id),
|
||||
m_end(_Options == RowMajor ? mat.m_colStartIndex[outer + 1] : mat.m_rowStartIndex[outer + 1] + 1) {
|
||||
m_end(Options_ == RowMajor ? mat.m_colStartIndex[outer + 1] : mat.m_rowStartIndex[outer + 1] + 1) {
|
||||
}
|
||||
|
||||
inline InnerUpperIterator & operator++() {
|
||||
@@ -793,16 +793,16 @@ protected:
|
||||
const Index m_end;
|
||||
};
|
||||
|
||||
template<typename Scalar, int _Options>
|
||||
class SkylineMatrix<Scalar, _Options>::InnerLowerIterator {
|
||||
template<typename Scalar, int Options_>
|
||||
class SkylineMatrix<Scalar, Options_>::InnerLowerIterator {
|
||||
public:
|
||||
|
||||
InnerLowerIterator(const SkylineMatrix& mat, Index outer)
|
||||
: m_matrix(mat),
|
||||
m_outer(outer),
|
||||
m_id(_Options == RowMajor ? mat.m_rowStartIndex[outer] : mat.m_colStartIndex[outer] + 1),
|
||||
m_id(Options_ == RowMajor ? mat.m_rowStartIndex[outer] : mat.m_colStartIndex[outer] + 1),
|
||||
m_start(m_id),
|
||||
m_end(_Options == RowMajor ? mat.m_rowStartIndex[outer + 1] : mat.m_colStartIndex[outer + 1] + 1) {
|
||||
m_end(Options_ == RowMajor ? mat.m_rowStartIndex[outer + 1] : mat.m_colStartIndex[outer + 1] + 1) {
|
||||
}
|
||||
|
||||
inline InnerLowerIterator & operator++() {
|
||||
|
||||
@@ -120,17 +120,17 @@ protected:
|
||||
|
||||
template<typename Lhs, typename Rhs, typename Dest>
|
||||
EIGEN_DONT_INLINE void skyline_row_major_time_dense_product(const Lhs& lhs, const Rhs& rhs, Dest& dst) {
|
||||
typedef typename remove_all<Lhs>::type _Lhs;
|
||||
typedef typename remove_all<Rhs>::type _Rhs;
|
||||
typedef typename remove_all<Lhs>::type Lhs_;
|
||||
typedef typename remove_all<Rhs>::type Rhs_;
|
||||
typedef typename traits<Lhs>::Scalar Scalar;
|
||||
|
||||
enum {
|
||||
LhsIsRowMajor = (_Lhs::Flags & RowMajorBit) == RowMajorBit,
|
||||
LhsIsSelfAdjoint = (_Lhs::Flags & SelfAdjointBit) == SelfAdjointBit,
|
||||
LhsIsRowMajor = (Lhs_::Flags & RowMajorBit) == RowMajorBit,
|
||||
LhsIsSelfAdjoint = (Lhs_::Flags & SelfAdjointBit) == SelfAdjointBit,
|
||||
ProcessFirstHalf = LhsIsSelfAdjoint
|
||||
&& (((_Lhs::Flags & (UpperTriangularBit | LowerTriangularBit)) == 0)
|
||||
|| ((_Lhs::Flags & UpperTriangularBit) && !LhsIsRowMajor)
|
||||
|| ((_Lhs::Flags & LowerTriangularBit) && LhsIsRowMajor)),
|
||||
&& (((Lhs_::Flags & (UpperTriangularBit | LowerTriangularBit)) == 0)
|
||||
|| ((Lhs_::Flags & UpperTriangularBit) && !LhsIsRowMajor)
|
||||
|| ((Lhs_::Flags & LowerTriangularBit) && LhsIsRowMajor)),
|
||||
ProcessSecondHalf = LhsIsSelfAdjoint && (!ProcessFirstHalf)
|
||||
};
|
||||
|
||||
@@ -142,7 +142,7 @@ EIGEN_DONT_INLINE void skyline_row_major_time_dense_product(const Lhs& lhs, cons
|
||||
}
|
||||
//Use matrix lower triangular part
|
||||
for (Index row = 0; row < lhs.rows(); row++) {
|
||||
typename _Lhs::InnerLowerIterator lIt(lhs, row);
|
||||
typename Lhs_::InnerLowerIterator lIt(lhs, row);
|
||||
const Index stop = lIt.col() + lIt.size();
|
||||
for (Index col = 0; col < rhs.cols(); col++) {
|
||||
|
||||
@@ -162,7 +162,7 @@ EIGEN_DONT_INLINE void skyline_row_major_time_dense_product(const Lhs& lhs, cons
|
||||
|
||||
//Use matrix upper triangular part
|
||||
for (Index lhscol = 0; lhscol < lhs.cols(); lhscol++) {
|
||||
typename _Lhs::InnerUpperIterator uIt(lhs, lhscol);
|
||||
typename Lhs_::InnerUpperIterator uIt(lhs, lhscol);
|
||||
const Index stop = uIt.size() + uIt.row();
|
||||
for (Index rhscol = 0; rhscol < rhs.cols(); rhscol++) {
|
||||
|
||||
@@ -183,17 +183,17 @@ EIGEN_DONT_INLINE void skyline_row_major_time_dense_product(const Lhs& lhs, cons
|
||||
|
||||
template<typename Lhs, typename Rhs, typename Dest>
|
||||
EIGEN_DONT_INLINE void skyline_col_major_time_dense_product(const Lhs& lhs, const Rhs& rhs, Dest& dst) {
|
||||
typedef typename remove_all<Lhs>::type _Lhs;
|
||||
typedef typename remove_all<Rhs>::type _Rhs;
|
||||
typedef typename remove_all<Lhs>::type Lhs_;
|
||||
typedef typename remove_all<Rhs>::type Rhs_;
|
||||
typedef typename traits<Lhs>::Scalar Scalar;
|
||||
|
||||
enum {
|
||||
LhsIsRowMajor = (_Lhs::Flags & RowMajorBit) == RowMajorBit,
|
||||
LhsIsSelfAdjoint = (_Lhs::Flags & SelfAdjointBit) == SelfAdjointBit,
|
||||
LhsIsRowMajor = (Lhs_::Flags & RowMajorBit) == RowMajorBit,
|
||||
LhsIsSelfAdjoint = (Lhs_::Flags & SelfAdjointBit) == SelfAdjointBit,
|
||||
ProcessFirstHalf = LhsIsSelfAdjoint
|
||||
&& (((_Lhs::Flags & (UpperTriangularBit | LowerTriangularBit)) == 0)
|
||||
|| ((_Lhs::Flags & UpperTriangularBit) && !LhsIsRowMajor)
|
||||
|| ((_Lhs::Flags & LowerTriangularBit) && LhsIsRowMajor)),
|
||||
&& (((Lhs_::Flags & (UpperTriangularBit | LowerTriangularBit)) == 0)
|
||||
|| ((Lhs_::Flags & UpperTriangularBit) && !LhsIsRowMajor)
|
||||
|| ((Lhs_::Flags & LowerTriangularBit) && LhsIsRowMajor)),
|
||||
ProcessSecondHalf = LhsIsSelfAdjoint && (!ProcessFirstHalf)
|
||||
};
|
||||
|
||||
@@ -206,7 +206,7 @@ EIGEN_DONT_INLINE void skyline_col_major_time_dense_product(const Lhs& lhs, cons
|
||||
|
||||
//Use matrix upper triangular part
|
||||
for (Index row = 0; row < lhs.rows(); row++) {
|
||||
typename _Lhs::InnerUpperIterator uIt(lhs, row);
|
||||
typename Lhs_::InnerUpperIterator uIt(lhs, row);
|
||||
const Index stop = uIt.col() + uIt.size();
|
||||
for (Index col = 0; col < rhs.cols(); col++) {
|
||||
|
||||
@@ -227,7 +227,7 @@ EIGEN_DONT_INLINE void skyline_col_major_time_dense_product(const Lhs& lhs, cons
|
||||
|
||||
//Use matrix lower triangular part
|
||||
for (Index lhscol = 0; lhscol < lhs.cols(); lhscol++) {
|
||||
typename _Lhs::InnerLowerIterator lIt(lhs, lhscol);
|
||||
typename Lhs_::InnerLowerIterator lIt(lhs, lhscol);
|
||||
const Index stop = lIt.size() + lIt.row();
|
||||
for (Index rhscol = 0; rhscol < rhs.cols(); rhscol++) {
|
||||
|
||||
@@ -272,7 +272,7 @@ struct skyline_product_selector<Lhs, Rhs, ResultType, ColMajor> {
|
||||
// template<typename Derived>
|
||||
// template<typename Lhs, typename Rhs >
|
||||
// Derived & MatrixBase<Derived>::lazyAssign(const SkylineProduct<Lhs, Rhs, SkylineTimeDenseProduct>& product) {
|
||||
// typedef typename internal::remove_all<Lhs>::type _Lhs;
|
||||
// typedef typename internal::remove_all<Lhs>::type Lhs_;
|
||||
// internal::skyline_product_selector<typename internal::remove_all<Lhs>::type,
|
||||
// typename internal::remove_all<Rhs>::type,
|
||||
// Derived>::run(product.lhs(), product.rhs(), derived());
|
||||
|
||||
@@ -61,10 +61,10 @@ EIGEN_STRONG_INLINE Derived& operator Op(const Other& scalar) \
|
||||
_EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE(Derived, Eigen::SkylineMatrixBase<Derived>)
|
||||
|
||||
template<typename Derived> class SkylineMatrixBase;
|
||||
template<typename _Scalar, int _Flags = 0> class SkylineMatrix;
|
||||
template<typename _Scalar, int _Flags = 0> class DynamicSkylineMatrix;
|
||||
template<typename _Scalar, int _Flags = 0> class SkylineVector;
|
||||
template<typename _Scalar, int _Flags = 0> class MappedSkylineMatrix;
|
||||
template<typename Scalar_, int _Flags = 0> class SkylineMatrix;
|
||||
template<typename Scalar_, int _Flags = 0> class DynamicSkylineMatrix;
|
||||
template<typename Scalar_, int _Flags = 0> class SkylineVector;
|
||||
template<typename Scalar_, int _Flags = 0> class MappedSkylineMatrix;
|
||||
|
||||
namespace internal {
|
||||
|
||||
@@ -73,13 +73,13 @@ template<typename Lhs, typename Rhs, int ProductMode = skyline_product_mode<Lhs,
|
||||
|
||||
template<typename T> class eval<T,IsSkyline>
|
||||
{
|
||||
typedef typename traits<T>::Scalar _Scalar;
|
||||
typedef typename traits<T>::Scalar Scalar_;
|
||||
enum {
|
||||
_Flags = traits<T>::Flags
|
||||
};
|
||||
|
||||
public:
|
||||
typedef SkylineMatrix<_Scalar, _Flags> type;
|
||||
typedef SkylineMatrix<Scalar_, _Flags> type;
|
||||
};
|
||||
|
||||
} // end namespace internal
|
||||
|
||||
Reference in New Issue
Block a user