Renamed cleantype to remove_all since it is close to remove_{const|pointer|reference}.

This commit is contained in:
Hauke Heibel
2010-10-26 16:47:01 +02:00
parent 2fbb9932b0
commit c738cd56eb
38 changed files with 124 additions and 124 deletions

View File

@@ -241,7 +241,7 @@ class SparseInnerVectorSet<SparseMatrix<_Scalar, _Options, _Index>, Size>
template<typename OtherDerived>
inline SparseInnerVectorSet& operator=(const SparseMatrixBase<OtherDerived>& other)
{
typedef typename internal::cleantype<typename MatrixType::Nested>::type _NestedMatrixType;
typedef typename internal::remove_all<typename MatrixType::Nested>::type _NestedMatrixType;
_NestedMatrixType& matrix = const_cast<_NestedMatrixType&>(m_matrix);;
// This assignement is slow if this vector set not empty
// and/or it is not at the end of the nonzeros of the underlying matrix.

View File

@@ -56,8 +56,8 @@ struct traits<SparseDenseOuterProduct<Lhs,Rhs,Tr> >
typedef typename Lhs::Index Index;
typedef typename Lhs::Nested LhsNested;
typedef typename Rhs::Nested RhsNested;
typedef typename cleantype<LhsNested>::type _LhsNested;
typedef typename cleantype<RhsNested>::type _RhsNested;
typedef typename remove_all<LhsNested>::type _LhsNested;
typedef typename remove_all<RhsNested>::type _RhsNested;
enum {
LhsCoeffReadCost = traits<_LhsNested>::CoeffReadCost,
@@ -163,8 +163,8 @@ class SparseTimeDenseProduct
template<typename Dest> void scaleAndAddTo(Dest& dest, Scalar alpha) const
{
typedef typename internal::cleantype<Lhs>::type _Lhs;
typedef typename internal::cleantype<Rhs>::type _Rhs;
typedef typename internal::remove_all<Lhs>::type _Lhs;
typedef typename internal::remove_all<Rhs>::type _Rhs;
typedef typename _Lhs::InnerIterator LhsInnerIterator;
enum { LhsIsRowMajor = (_Lhs::Flags&RowMajorBit)==RowMajorBit };
for(Index j=0; j<m_lhs.outerSize(); ++j)
@@ -207,7 +207,7 @@ class DenseTimeSparseProduct
template<typename Dest> void scaleAndAddTo(Dest& dest, Scalar alpha) const
{
typedef typename internal::cleantype<Rhs>::type _Rhs;
typedef typename internal::remove_all<Rhs>::type _Rhs;
typedef typename _Rhs::InnerIterator RhsInnerIterator;
enum { RhsIsRowMajor = (_Rhs::Flags&RowMajorBit)==RowMajorBit };
for(Index j=0; j<m_rhs.outerSize(); ++j)

View File

@@ -42,8 +42,8 @@ namespace internal {
template<typename Lhs, typename Rhs>
struct traits<SparseDiagonalProduct<Lhs, Rhs> >
{
typedef typename cleantype<Lhs>::type _Lhs;
typedef typename cleantype<Rhs>::type _Rhs;
typedef typename remove_all<Lhs>::type _Lhs;
typedef typename remove_all<Rhs>::type _Rhs;
typedef typename _Lhs::Scalar Scalar;
typedef typename promote_index_type<typename traits<Lhs>::Index,
typename traits<Rhs>::Index>::type Index;
@@ -76,8 +76,8 @@ class SparseDiagonalProduct
typedef typename Lhs::Nested LhsNested;
typedef typename Rhs::Nested RhsNested;
typedef typename internal::cleantype<LhsNested>::type _LhsNested;
typedef typename internal::cleantype<RhsNested>::type _RhsNested;
typedef typename internal::remove_all<LhsNested>::type _LhsNested;
typedef typename internal::remove_all<RhsNested>::type _RhsNested;
enum {
LhsMode = internal::is_diagonal<_LhsNested>::ret ? internal::SDP_IsDiagonal

View File

@@ -449,7 +449,7 @@ class SparseMatrix
// 2 - do the actual copy/eval
// Since each coeff of the rhs has to be evaluated twice, let's evaluate it if needed
typedef typename internal::nested<OtherDerived,2>::type OtherCopy;
typedef typename internal::cleantype<OtherCopy>::type _OtherCopy;
typedef typename internal::remove_all<OtherCopy>::type _OtherCopy;
OtherCopy otherCopy(other.derived());
resize(other.rows(), other.cols());

View File

@@ -53,8 +53,8 @@ struct traits<SparseSparseProduct<LhsNested, RhsNested> >
{
typedef MatrixXpr XprKind;
// clean the nested types:
typedef typename cleantype<LhsNested>::type _LhsNested;
typedef typename cleantype<RhsNested>::type _RhsNested;
typedef typename remove_all<LhsNested>::type _LhsNested;
typedef typename remove_all<RhsNested>::type _RhsNested;
typedef typename _LhsNested::Scalar Scalar;
typedef typename promote_index_type<typename traits<_LhsNested>::Index,
typename traits<_RhsNested>::Index>::type Index;

View File

@@ -165,8 +165,8 @@ class SparseSelfAdjointTimeDenseProduct
{
// TODO use alpha
eigen_assert(alpha==Scalar(1) && "alpha != 1 is not implemented yet, sorry");
typedef typename internal::cleantype<Lhs>::type _Lhs;
typedef typename internal::cleantype<Rhs>::type _Rhs;
typedef typename internal::remove_all<Lhs>::type _Lhs;
typedef typename internal::remove_all<Rhs>::type _Rhs;
typedef typename _Lhs::InnerIterator LhsInnerIterator;
enum {
LhsIsRowMajor = (_Lhs::Flags&RowMajorBit)==RowMajorBit,

View File

@@ -30,8 +30,8 @@ namespace internal {
template<typename Lhs, typename Rhs, typename ResultType>
static void sparse_product_impl2(const Lhs& lhs, const Rhs& rhs, ResultType& res)
{
typedef typename cleantype<Lhs>::type::Scalar Scalar;
typedef typename cleantype<Lhs>::type::Index Index;
typedef typename remove_all<Lhs>::type::Scalar Scalar;
typedef typename remove_all<Lhs>::type::Index Index;
// make sure to call innerSize/outerSize since we fake the storage order.
Index rows = lhs.innerSize();
@@ -116,8 +116,8 @@ static void sparse_product_impl(const Lhs& lhs, const Rhs& rhs, ResultType& res)
{
// return sparse_product_impl2(lhs,rhs,res);
typedef typename cleantype<Lhs>::type::Scalar Scalar;
typedef typename cleantype<Lhs>::type::Index Index;
typedef typename remove_all<Lhs>::type::Scalar Scalar;
typedef typename remove_all<Lhs>::type::Index Index;
// make sure to call innerSize/outerSize since we fake the storage order.
Index rows = lhs.innerSize();
@@ -169,12 +169,12 @@ struct sparse_product_selector;
template<typename Lhs, typename Rhs, typename ResultType>
struct sparse_product_selector<Lhs,Rhs,ResultType,ColMajor,ColMajor,ColMajor>
{
typedef typename traits<typename cleantype<Lhs>::type>::Scalar Scalar;
typedef typename traits<typename remove_all<Lhs>::type>::Scalar Scalar;
static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res)
{
// std::cerr << __LINE__ << "\n";
typename cleantype<ResultType>::type _res(res.rows(), res.cols());
typename remove_all<ResultType>::type _res(res.rows(), res.cols());
sparse_product_impl<Lhs,Rhs,ResultType>(lhs, rhs, _res);
res.swap(_res);
}
@@ -201,7 +201,7 @@ struct sparse_product_selector<Lhs,Rhs,ResultType,RowMajor,RowMajor,RowMajor>
{
// std::cerr << __LINE__ << "\n";
// let's transpose the product to get a column x column product
typename cleantype<ResultType>::type _res(res.rows(), res.cols());
typename remove_all<ResultType>::type _res(res.rows(), res.cols());
sparse_product_impl<Rhs,Lhs,ResultType>(rhs, lhs, _res);
res.swap(_res);
}
@@ -241,8 +241,8 @@ inline Derived& SparseMatrixBase<Derived>::operator=(const SparseSparseProduct<L
{
// std::cerr << "there..." << typeid(Lhs).name() << " " << typeid(Lhs).name() << " " << (Derived::Flags&&RowMajorBit) << "\n";
internal::sparse_product_selector<
typename internal::cleantype<Lhs>::type,
typename internal::cleantype<Rhs>::type,
typename internal::remove_all<Lhs>::type,
typename internal::remove_all<Rhs>::type,
Derived>::run(product.lhs(),product.rhs(),derived());
return derived();
}
@@ -258,7 +258,7 @@ struct sparse_product_selector2;
template<typename Lhs, typename Rhs, typename ResultType>
struct sparse_product_selector2<Lhs,Rhs,ResultType,ColMajor,ColMajor,ColMajor>
{
typedef typename traits<typename cleantype<Lhs>::type>::Scalar Scalar;
typedef typename traits<typename remove_all<Lhs>::type>::Scalar Scalar;
static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res)
{
@@ -313,7 +313,7 @@ struct sparse_product_selector2<Lhs,Rhs,ResultType,RowMajor,RowMajor,ColMajor>
template<typename Lhs, typename Rhs, typename ResultType>
struct sparse_product_selector2<Lhs,Rhs,ResultType,ColMajor,ColMajor,RowMajor>
{
typedef typename traits<typename cleantype<Lhs>::type>::Scalar Scalar;
typedef typename traits<typename remove_all<Lhs>::type>::Scalar Scalar;
static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res)
{
@@ -379,8 +379,8 @@ inline void SparseMatrixBase<Derived>::_experimentalNewProduct(const Lhs& lhs, c
{
//derived().resize(lhs.rows(), rhs.cols());
internal::sparse_product_selector2<
typename internal::cleantype<Lhs>::type,
typename internal::cleantype<Rhs>::type,
typename internal::remove_all<Lhs>::type,
typename internal::remove_all<Rhs>::type,
Derived>::run(lhs,rhs,derived());
}

View File

@@ -28,7 +28,7 @@
template<typename MatrixType> class TransposeImpl<MatrixType,Sparse>
: public SparseMatrixBase<Transpose<MatrixType> >
{
typedef typename internal::cleantype<typename MatrixType::Nested>::type _MatrixTypeNested;
typedef typename internal::remove_all<typename MatrixType::Nested>::type _MatrixTypeNested;
public:
EIGEN_SPARSE_PUBLIC_INTERFACE(Transpose<MatrixType>)

View File

@@ -265,7 +265,7 @@ class SparseVector
// // Since each coeff of the rhs has to be evaluated twice, let's evauluate it if needed
// typedef typename internal::nested<OtherDerived,2>::type OtherCopy;
// OtherCopy otherCopy(other.derived());
// typedef typename internal::cleantype<OtherCopy>::type _OtherCopy;
// typedef typename internal::remove_all<OtherCopy>::type _OtherCopy;
//
// resize(other.rows(), other.cols());
// Eigen::Map<VectorXi>(m_outerIndex,outerSize()).setZero();

View File

@@ -44,7 +44,7 @@ template<typename MatrixType>
class SparseView : public SparseMatrixBase<SparseView<MatrixType> >
{
typedef typename MatrixType::Nested MatrixTypeNested;
typedef typename internal::cleantype<MatrixTypeNested>::type _MatrixTypeNested;
typedef typename internal::remove_all<MatrixTypeNested>::type _MatrixTypeNested;
public:
EIGEN_SPARSE_PUBLIC_INTERFACE(SparseView)