Get rid of include directives inside namespace blocks (bug #339).

This commit is contained in:
Jitse Niesen
2012-04-15 11:06:28 +01:00
parent 84c93b048e
commit 3c412183b2
280 changed files with 1006 additions and 179 deletions

View File

@@ -26,6 +26,8 @@
#ifndef EIGEN_BLOCK2_H
#define EIGEN_BLOCK2_H
namespace Eigen {
/** \returns a dynamic-size expression of a corner of *this.
*
* \param type the type of corner. Can be \a Eigen::TopLeft, \a Eigen::TopRight,
@@ -134,4 +136,6 @@ DenseBase<Derived>::corner(CornerType type) const
}
}
} // end namespace Eigen
#endif // EIGEN_BLOCK2_H

View File

@@ -26,6 +26,8 @@
#ifndef EIGEN_CWISE_H
#define EIGEN_CWISE_H
namespace Eigen {
/** \internal
* convenient macro to defined the return type of a cwise binary operation */
#define EIGEN_CWISE_BINOP_RETURN_TYPE(OP) \
@@ -200,4 +202,6 @@ inline Cwise<Derived> MatrixBase<Derived>::cwise()
return derived();
}
} // end namespace Eigen
#endif // EIGEN_CWISE_H

View File

@@ -25,6 +25,8 @@
#ifndef EIGEN_ARRAY_CWISE_OPERATORS_H
#define EIGEN_ARRAY_CWISE_OPERATORS_H
namespace Eigen {
/***************************************************************************
* The following functions were defined in Core
***************************************************************************/
@@ -306,4 +308,6 @@ inline ExpressionType& Cwise<ExpressionType>::operator-=(const Scalar& scalar)
return m_matrix.const_cast_derived() = *this - scalar;
}
} // end namespace Eigen
#endif // EIGEN_ARRAY_CWISE_OPERATORS_H

View File

@@ -24,6 +24,8 @@
// no include guard, we'll include this twice from All.h from Eigen2Support, and it's internal anyway
namespace Eigen {
/** \geometry_module \ingroup Geometry_Module
* \nonstableyet
*
@@ -168,3 +170,5 @@ inline Scalar AlignedBox<Scalar,AmbiantDim>::squaredExteriorDistance(const Vecto
}
return dist2;
}
} // end namespace Eigen

View File

@@ -24,6 +24,7 @@
// no include guard, we'll include this twice from All.h from Eigen2Support, and it's internal anyway
namespace Eigen {
/** \geometry_module \ingroup Geometry_Module
*
@@ -224,3 +225,5 @@ AngleAxis<Scalar>::toRotationMatrix(void) const
return res;
}
} // end namespace Eigen

View File

@@ -25,6 +25,8 @@
// no include guard, we'll include this twice from All.h from Eigen2Support, and it's internal anyway
namespace Eigen {
/** \geometry_module \ingroup Geometry_Module
*
* \class Hyperplane
@@ -263,3 +265,5 @@ protected:
Coefficients m_coeffs;
};
} // end namespace Eigen

View File

@@ -25,6 +25,7 @@
// no include guard, we'll include this twice from All.h from Eigen2Support, and it's internal anyway
namespace Eigen {
/** \geometry_module \ingroup Geometry_Module
*
@@ -151,3 +152,5 @@ inline _Scalar ParametrizedLine<_Scalar, _AmbientDim>::intersection(const Hyperp
return -(hyperplane.offset()+origin().eigen2_dot(hyperplane.normal()))
/(direction().eigen2_dot(hyperplane.normal()));
}
} // end namespace Eigen

View File

@@ -24,6 +24,8 @@
// no include guard, we'll include this twice from All.h from Eigen2Support, and it's internal anyway
namespace Eigen {
template<typename Other,
int OtherRows=Other::RowsAtCompileTime,
int OtherCols=Other::ColsAtCompileTime>
@@ -504,3 +506,5 @@ struct ei_quaternion_assign_impl<Other,4,1>
q.coeffs() = vec;
}
};
} // end namespace Eigen

View File

@@ -24,6 +24,7 @@
// no include guard, we'll include this twice from All.h from Eigen2Support, and it's internal anyway
namespace Eigen {
/** \geometry_module \ingroup Geometry_Module
*
@@ -155,3 +156,5 @@ Rotation2D<Scalar>::toRotationMatrix(void) const
Scalar cosA = ei_cos(m_angle);
return (Matrix2() << cosA, -sinA, sinA, cosA).finished();
}
} // end namespace Eigen

View File

@@ -24,6 +24,8 @@
// no include guard, we'll include this twice from All.h from Eigen2Support, and it's internal anyway
namespace Eigen {
// this file aims to contains the various representations of rotation/orientation
// in 2D and 3D space excepted Matrix and Quaternion.
@@ -132,3 +134,5 @@ static inline const MatrixBase<OtherDerived>& ei_toRotationMatrix(const MatrixBa
YOU_MADE_A_PROGRAMMING_MISTAKE)
return mat;
}
} // end namespace Eigen

View File

@@ -24,6 +24,7 @@
// no include guard, we'll include this twice from All.h from Eigen2Support, and it's internal anyway
namespace Eigen {
/** \geometry_module \ingroup Geometry_Module
*
@@ -177,3 +178,5 @@ Scaling<Scalar,Dim>::operator* (const TransformType& t) const
res.prescale(m_coeffs);
return res;
}
} // end namespace Eigen

View File

@@ -25,6 +25,7 @@
// no include guard, we'll include this twice from All.h from Eigen2Support, and it's internal anyway
namespace Eigen {
// Note that we have to pass Dim and HDim because it is not allowed to use a template
// parameter to define a template specialization. To be more precise, in the following
@@ -796,3 +797,5 @@ struct ei_transform_product_impl<Other,Dim,HDim, Dim,1>
{ return ((tr.linear() * other) + tr.translation())
* (Scalar(1) / ( (tr.matrix().template block<1,Dim>(Dim,0) * other).coeff(0) + tr.matrix().coeff(Dim,Dim))); }
};
} // end namespace Eigen

View File

@@ -24,6 +24,7 @@
// no include guard, we'll include this twice from All.h from Eigen2Support, and it's internal anyway
namespace Eigen {
/** \geometry_module \ingroup Geometry_Module
*
@@ -194,3 +195,5 @@ Translation<Scalar,Dim>::operator* (const TransformType& t) const
res.pretranslate(m_coeffs);
return res;
}
} // end namespace Eigen

View File

@@ -25,6 +25,8 @@
#ifndef EIGEN2_LU_H
#define EIGEN2_LU_H
namespace Eigen {
template<typename MatrixType>
class LU : public FullPivLU<MatrixType>
{
@@ -128,5 +130,6 @@ MatrixBase<Derived>::eigen2_lu() const
}
#endif
} // end namespace Eigen
#endif // EIGEN2_LU_H

View File

@@ -25,6 +25,8 @@
#ifndef EIGEN_LAZY_H
#define EIGEN_LAZY_H
namespace Eigen {
/** \deprecated it is only used by lazy() which is deprecated
*
* \returns an expression of *this with added flags
@@ -79,4 +81,6 @@ Derived& MatrixBase<Derived>::operator-=(const Flagged<ProductBase<ProductDerive
other._expression().derived().subTo(derived()); return derived();
}
} // end namespace Eigen
#endif // EIGEN_LAZY_H

View File

@@ -25,6 +25,8 @@
#ifndef EIGEN2_LEASTSQUARES_H
#define EIGEN2_LEASTSQUARES_H
namespace Eigen {
/** \ingroup LeastSquares_Module
*
* \leastsquares_module
@@ -178,5 +180,6 @@ void fitHyperplane(int numPoints,
result->offset() = - (result->normal().cwise()* mean).sum();
}
} // end namespace Eigen
#endif // EIGEN2_LEASTSQUARES_H

View File

@@ -25,6 +25,8 @@
#ifndef EIGEN2_MATH_FUNCTIONS_H
#define EIGEN2_MATH_FUNCTIONS_H
namespace Eigen {
template<typename T> inline typename NumTraits<T>::Real ei_real(const T& x) { return internal::real(x); }
template<typename T> inline typename NumTraits<T>::Real ei_imag(const T& x) { return internal::imag(x); }
template<typename T> inline T ei_conj(const T& x) { return internal::conj(x); }
@@ -65,4 +67,6 @@ inline bool ei_isApproxOrLessThan(const Scalar& x, const Scalar& y,
return internal::isApproxOrLessThan(x, y, precision);
}
} // end namespace Eigen
#endif // EIGEN2_MATH_FUNCTIONS_H

View File

@@ -25,6 +25,8 @@
#ifndef EIGEN2_MEMORY_H
#define EIGEN2_MEMORY_H
namespace Eigen {
inline void* ei_aligned_malloc(size_t size) { return internal::aligned_malloc(size); }
inline void ei_aligned_free(void *ptr) { internal::aligned_free(ptr); }
inline void* ei_aligned_realloc(void *ptr, size_t new_size, size_t old_size) { return internal::aligned_realloc(ptr, new_size, old_size); }
@@ -53,6 +55,6 @@ template<typename T> inline void ei_aligned_delete(T *ptr, size_t size)
return internal::aligned_delete(ptr, size);
}
} // end namespace Eigen
#endif // EIGEN2_MACROS_H

View File

@@ -25,6 +25,8 @@
#ifndef EIGEN2_META_H
#define EIGEN2_META_H
namespace Eigen {
template<typename T>
struct ei_traits : internal::traits<T>
{};
@@ -83,4 +85,6 @@ class ei_meta_sqrt
template<int Y, int InfX, int SupX>
class ei_meta_sqrt<Y, InfX, SupX, true> { public: enum { ret = (SupX*SupX <= Y) ? SupX : InfX }; };
} // end namespace Eigen
#endif // EIGEN2_META_H

View File

@@ -25,6 +25,8 @@
#ifndef EIGEN_MINOR_H
#define EIGEN_MINOR_H
namespace Eigen {
/**
* \class Minor
*
@@ -125,4 +127,6 @@ MatrixBase<Derived>::minor(Index row, Index col) const
return Minor<Derived>(derived(), row, col);
}
} // end namespace Eigen
#endif // EIGEN_MINOR_H

View File

@@ -26,6 +26,8 @@
#ifndef EIGEN2_QR_H
#define EIGEN2_QR_H
namespace Eigen {
template<typename MatrixType>
class QR : public HouseholderQR<MatrixType>
{
@@ -75,5 +77,6 @@ MatrixBase<Derived>::qr() const
return QR<PlainObject>(eval());
}
} // end namespace Eigen
#endif // EIGEN2_QR_H

View File

@@ -25,6 +25,8 @@
#ifndef EIGEN2_SVD_H
#define EIGEN2_SVD_H
namespace Eigen {
/** \ingroup SVD_Module
* \nonstableyet
*
@@ -646,4 +648,6 @@ MatrixBase<Derived>::svd() const
return SVD<PlainObject>(derived());
}
} // end namespace Eigen
#endif // EIGEN2_SVD_H

View File

@@ -25,6 +25,8 @@
#ifndef EIGEN_TRIANGULAR_SOLVER2_H
#define EIGEN_TRIANGULAR_SOLVER2_H
namespace Eigen {
const unsigned int UnitDiagBit = UnitDiag;
const unsigned int SelfAdjointBit = SelfAdjoint;
const unsigned int UpperTriangularBit = Upper;
@@ -49,5 +51,7 @@ void Flagged<ExpressionType,Added,Removed>::solveTriangularInPlace(const MatrixB
{
m_matrix.template triangularView<Added>().solveInPlace(other.derived());
}
} // end namespace Eigen
#endif // EIGEN_TRIANGULAR_SOLVER2_H

View File

@@ -26,6 +26,8 @@
#ifndef EIGEN2_VECTORBLOCK_H
#define EIGEN2_VECTORBLOCK_H
namespace Eigen {
/** \deprecated use DenseMase::head(Index) */
template<typename Derived>
inline VectorBlock<Derived>
@@ -102,4 +104,6 @@ MatrixBase<Derived>::end() const
return VectorBlock<const Derived, Size>(derived(), size() - Size);
}
} // end namespace Eigen
#endif // EIGEN2_VECTORBLOCK_H