mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
bug #86 : use internal:: namespace instead of ei_ prefix
This commit is contained in:
@@ -49,7 +49,7 @@ inline Block<Derived> DenseBase<Derived>
|
||||
switch(type)
|
||||
{
|
||||
default:
|
||||
ei_assert(false && "Bad corner type.");
|
||||
eigen_assert(false && "Bad corner type.");
|
||||
case TopLeft:
|
||||
return Block<Derived>(derived(), 0, 0, cRows, cCols);
|
||||
case TopRight:
|
||||
@@ -69,7 +69,7 @@ DenseBase<Derived>::corner(CornerType type, Index cRows, Index cCols) const
|
||||
switch(type)
|
||||
{
|
||||
default:
|
||||
ei_assert(false && "Bad corner type.");
|
||||
eigen_assert(false && "Bad corner type.");
|
||||
case TopLeft:
|
||||
return Block<Derived>(derived(), 0, 0, cRows, cCols);
|
||||
case TopRight:
|
||||
@@ -101,7 +101,7 @@ DenseBase<Derived>::corner(CornerType type)
|
||||
switch(type)
|
||||
{
|
||||
default:
|
||||
ei_assert(false && "Bad corner type.");
|
||||
eigen_assert(false && "Bad corner type.");
|
||||
case TopLeft:
|
||||
return Block<Derived, CRows, CCols>(derived(), 0, 0);
|
||||
case TopRight:
|
||||
@@ -122,7 +122,7 @@ DenseBase<Derived>::corner(CornerType type) const
|
||||
switch(type)
|
||||
{
|
||||
default:
|
||||
ei_assert(false && "Bad corner type.");
|
||||
eigen_assert(false && "Bad corner type.");
|
||||
case TopLeft:
|
||||
return Block<Derived, CRows, CCols>(derived(), 0, 0);
|
||||
case TopRight:
|
||||
|
||||
@@ -29,17 +29,17 @@
|
||||
/** \internal
|
||||
* convenient macro to defined the return type of a cwise binary operation */
|
||||
#define EIGEN_CWISE_BINOP_RETURN_TYPE(OP) \
|
||||
CwiseBinaryOp<OP<typename ei_traits<ExpressionType>::Scalar>, ExpressionType, OtherDerived>
|
||||
CwiseBinaryOp<OP<typename internal::traits<ExpressionType>::Scalar>, ExpressionType, OtherDerived>
|
||||
|
||||
/** \internal
|
||||
* convenient macro to defined the return type of a cwise unary operation */
|
||||
#define EIGEN_CWISE_UNOP_RETURN_TYPE(OP) \
|
||||
CwiseUnaryOp<OP<typename ei_traits<ExpressionType>::Scalar>, ExpressionType>
|
||||
CwiseUnaryOp<OP<typename internal::traits<ExpressionType>::Scalar>, ExpressionType>
|
||||
|
||||
/** \internal
|
||||
* convenient macro to defined the return type of a cwise comparison to a scalar */
|
||||
#define EIGEN_CWISE_COMP_TO_SCALAR_RETURN_TYPE(OP) \
|
||||
CwiseBinaryOp<OP<typename ei_traits<ExpressionType>::Scalar>, ExpressionType, \
|
||||
CwiseBinaryOp<OP<typename internal::traits<ExpressionType>::Scalar>, ExpressionType, \
|
||||
typename ExpressionType::ConstantReturnType >
|
||||
|
||||
/** \class Cwise
|
||||
@@ -61,10 +61,10 @@ template<typename ExpressionType> class Cwise
|
||||
{
|
||||
public:
|
||||
|
||||
typedef typename ei_traits<ExpressionType>::Scalar Scalar;
|
||||
typedef typename ei_meta_if<ei_must_nest_by_value<ExpressionType>::ret,
|
||||
typedef typename internal::traits<ExpressionType>::Scalar Scalar;
|
||||
typedef typename internal::meta_if<internal::must_nest_by_value<ExpressionType>::ret,
|
||||
ExpressionType, const ExpressionType&>::ret ExpressionTypeNested;
|
||||
typedef CwiseUnaryOp<ei_scalar_add_op<Scalar>, ExpressionType> ScalarAddReturnType;
|
||||
typedef CwiseUnaryOp<internal::scalar_add_op<Scalar>, ExpressionType> ScalarAddReturnType;
|
||||
|
||||
inline Cwise(const ExpressionType& matrix) : m_matrix(matrix) {}
|
||||
|
||||
@@ -76,28 +76,28 @@ template<typename ExpressionType> class Cwise
|
||||
operator*(const MatrixBase<OtherDerived> &other) const;
|
||||
|
||||
template<typename OtherDerived>
|
||||
const EIGEN_CWISE_BINOP_RETURN_TYPE(ei_scalar_quotient_op)
|
||||
const EIGEN_CWISE_BINOP_RETURN_TYPE(internal::scalar_quotient_op)
|
||||
operator/(const MatrixBase<OtherDerived> &other) const;
|
||||
|
||||
template<typename OtherDerived>
|
||||
const EIGEN_CWISE_BINOP_RETURN_TYPE(ei_scalar_min_op)
|
||||
const EIGEN_CWISE_BINOP_RETURN_TYPE(internal::scalar_min_op)
|
||||
min(const MatrixBase<OtherDerived> &other) const;
|
||||
|
||||
template<typename OtherDerived>
|
||||
const EIGEN_CWISE_BINOP_RETURN_TYPE(ei_scalar_max_op)
|
||||
const EIGEN_CWISE_BINOP_RETURN_TYPE(internal::scalar_max_op)
|
||||
max(const MatrixBase<OtherDerived> &other) const;
|
||||
|
||||
const EIGEN_CWISE_UNOP_RETURN_TYPE(ei_scalar_abs_op) abs() const;
|
||||
const EIGEN_CWISE_UNOP_RETURN_TYPE(ei_scalar_abs2_op) abs2() const;
|
||||
const EIGEN_CWISE_UNOP_RETURN_TYPE(ei_scalar_square_op) square() const;
|
||||
const EIGEN_CWISE_UNOP_RETURN_TYPE(ei_scalar_cube_op) cube() const;
|
||||
const EIGEN_CWISE_UNOP_RETURN_TYPE(ei_scalar_inverse_op) inverse() const;
|
||||
const EIGEN_CWISE_UNOP_RETURN_TYPE(ei_scalar_sqrt_op) sqrt() const;
|
||||
const EIGEN_CWISE_UNOP_RETURN_TYPE(ei_scalar_exp_op) exp() const;
|
||||
const EIGEN_CWISE_UNOP_RETURN_TYPE(ei_scalar_log_op) log() const;
|
||||
const EIGEN_CWISE_UNOP_RETURN_TYPE(ei_scalar_cos_op) cos() const;
|
||||
const EIGEN_CWISE_UNOP_RETURN_TYPE(ei_scalar_sin_op) sin() const;
|
||||
const EIGEN_CWISE_UNOP_RETURN_TYPE(ei_scalar_pow_op) pow(const Scalar& exponent) const;
|
||||
const EIGEN_CWISE_UNOP_RETURN_TYPE(internal::scalar_abs_op) abs() const;
|
||||
const EIGEN_CWISE_UNOP_RETURN_TYPE(internal::scalar_abs2_op) abs2() const;
|
||||
const EIGEN_CWISE_UNOP_RETURN_TYPE(internal::scalar_square_op) square() const;
|
||||
const EIGEN_CWISE_UNOP_RETURN_TYPE(internal::scalar_cube_op) cube() const;
|
||||
const EIGEN_CWISE_UNOP_RETURN_TYPE(internal::scalar_inverse_op) inverse() const;
|
||||
const EIGEN_CWISE_UNOP_RETURN_TYPE(internal::scalar_sqrt_op) sqrt() const;
|
||||
const EIGEN_CWISE_UNOP_RETURN_TYPE(internal::scalar_exp_op) exp() const;
|
||||
const EIGEN_CWISE_UNOP_RETURN_TYPE(internal::scalar_log_op) log() const;
|
||||
const EIGEN_CWISE_UNOP_RETURN_TYPE(internal::scalar_cos_op) cos() const;
|
||||
const EIGEN_CWISE_UNOP_RETURN_TYPE(internal::scalar_sin_op) sin() const;
|
||||
const EIGEN_CWISE_UNOP_RETURN_TYPE(internal::scalar_pow_op) pow(const Scalar& exponent) const;
|
||||
|
||||
const ScalarAddReturnType
|
||||
operator+(const Scalar& scalar) const;
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
/** \deprecated ArrayBase::abs() */
|
||||
template<typename ExpressionType>
|
||||
EIGEN_STRONG_INLINE const EIGEN_CWISE_UNOP_RETURN_TYPE(ei_scalar_abs_op)
|
||||
EIGEN_STRONG_INLINE const EIGEN_CWISE_UNOP_RETURN_TYPE(internal::scalar_abs_op)
|
||||
Cwise<ExpressionType>::abs() const
|
||||
{
|
||||
return _expression();
|
||||
@@ -40,7 +40,7 @@ Cwise<ExpressionType>::abs() const
|
||||
|
||||
/** \deprecated ArrayBase::abs2() */
|
||||
template<typename ExpressionType>
|
||||
EIGEN_STRONG_INLINE const EIGEN_CWISE_UNOP_RETURN_TYPE(ei_scalar_abs2_op)
|
||||
EIGEN_STRONG_INLINE const EIGEN_CWISE_UNOP_RETURN_TYPE(internal::scalar_abs2_op)
|
||||
Cwise<ExpressionType>::abs2() const
|
||||
{
|
||||
return _expression();
|
||||
@@ -48,7 +48,7 @@ Cwise<ExpressionType>::abs2() const
|
||||
|
||||
/** \deprecated ArrayBase::exp() */
|
||||
template<typename ExpressionType>
|
||||
inline const EIGEN_CWISE_UNOP_RETURN_TYPE(ei_scalar_exp_op)
|
||||
inline const EIGEN_CWISE_UNOP_RETURN_TYPE(internal::scalar_exp_op)
|
||||
Cwise<ExpressionType>::exp() const
|
||||
{
|
||||
return _expression();
|
||||
@@ -56,7 +56,7 @@ Cwise<ExpressionType>::exp() const
|
||||
|
||||
/** \deprecated ArrayBase::log() */
|
||||
template<typename ExpressionType>
|
||||
inline const EIGEN_CWISE_UNOP_RETURN_TYPE(ei_scalar_log_op)
|
||||
inline const EIGEN_CWISE_UNOP_RETURN_TYPE(internal::scalar_log_op)
|
||||
Cwise<ExpressionType>::log() const
|
||||
{
|
||||
return _expression();
|
||||
@@ -74,10 +74,10 @@ Cwise<ExpressionType>::operator*(const MatrixBase<OtherDerived> &other) const
|
||||
/** \deprecated ArrayBase::operator/() */
|
||||
template<typename ExpressionType>
|
||||
template<typename OtherDerived>
|
||||
EIGEN_STRONG_INLINE const EIGEN_CWISE_BINOP_RETURN_TYPE(ei_scalar_quotient_op)
|
||||
EIGEN_STRONG_INLINE const EIGEN_CWISE_BINOP_RETURN_TYPE(internal::scalar_quotient_op)
|
||||
Cwise<ExpressionType>::operator/(const MatrixBase<OtherDerived> &other) const
|
||||
{
|
||||
return EIGEN_CWISE_BINOP_RETURN_TYPE(ei_scalar_quotient_op)(_expression(), other.derived());
|
||||
return EIGEN_CWISE_BINOP_RETURN_TYPE(internal::scalar_quotient_op)(_expression(), other.derived());
|
||||
}
|
||||
|
||||
/** \deprecated ArrayBase::operator*=() */
|
||||
@@ -99,19 +99,19 @@ inline ExpressionType& Cwise<ExpressionType>::operator/=(const MatrixBase<OtherD
|
||||
/** \deprecated ArrayBase::min() */
|
||||
template<typename ExpressionType>
|
||||
template<typename OtherDerived>
|
||||
EIGEN_STRONG_INLINE const EIGEN_CWISE_BINOP_RETURN_TYPE(ei_scalar_min_op)
|
||||
EIGEN_STRONG_INLINE const EIGEN_CWISE_BINOP_RETURN_TYPE(internal::scalar_min_op)
|
||||
Cwise<ExpressionType>::min(const MatrixBase<OtherDerived> &other) const
|
||||
{
|
||||
return EIGEN_CWISE_BINOP_RETURN_TYPE(ei_scalar_min_op)(_expression(), other.derived());
|
||||
return EIGEN_CWISE_BINOP_RETURN_TYPE(internal::scalar_min_op)(_expression(), other.derived());
|
||||
}
|
||||
|
||||
/** \deprecated ArrayBase::max() */
|
||||
template<typename ExpressionType>
|
||||
template<typename OtherDerived>
|
||||
EIGEN_STRONG_INLINE const EIGEN_CWISE_BINOP_RETURN_TYPE(ei_scalar_max_op)
|
||||
EIGEN_STRONG_INLINE const EIGEN_CWISE_BINOP_RETURN_TYPE(internal::scalar_max_op)
|
||||
Cwise<ExpressionType>::max(const MatrixBase<OtherDerived> &other) const
|
||||
{
|
||||
return EIGEN_CWISE_BINOP_RETURN_TYPE(ei_scalar_max_op)(_expression(), other.derived());
|
||||
return EIGEN_CWISE_BINOP_RETURN_TYPE(internal::scalar_max_op)(_expression(), other.derived());
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
@@ -122,7 +122,7 @@ Cwise<ExpressionType>::max(const MatrixBase<OtherDerived> &other) const
|
||||
|
||||
/** \deprecated ArrayBase::sqrt() */
|
||||
template<typename ExpressionType>
|
||||
inline const EIGEN_CWISE_UNOP_RETURN_TYPE(ei_scalar_sqrt_op)
|
||||
inline const EIGEN_CWISE_UNOP_RETURN_TYPE(internal::scalar_sqrt_op)
|
||||
Cwise<ExpressionType>::sqrt() const
|
||||
{
|
||||
return _expression();
|
||||
@@ -130,7 +130,7 @@ Cwise<ExpressionType>::sqrt() const
|
||||
|
||||
/** \deprecated ArrayBase::cos() */
|
||||
template<typename ExpressionType>
|
||||
inline const EIGEN_CWISE_UNOP_RETURN_TYPE(ei_scalar_cos_op)
|
||||
inline const EIGEN_CWISE_UNOP_RETURN_TYPE(internal::scalar_cos_op)
|
||||
Cwise<ExpressionType>::cos() const
|
||||
{
|
||||
return _expression();
|
||||
@@ -139,7 +139,7 @@ Cwise<ExpressionType>::cos() const
|
||||
|
||||
/** \deprecated ArrayBase::sin() */
|
||||
template<typename ExpressionType>
|
||||
inline const EIGEN_CWISE_UNOP_RETURN_TYPE(ei_scalar_sin_op)
|
||||
inline const EIGEN_CWISE_UNOP_RETURN_TYPE(internal::scalar_sin_op)
|
||||
Cwise<ExpressionType>::sin() const
|
||||
{
|
||||
return _expression();
|
||||
@@ -148,16 +148,16 @@ Cwise<ExpressionType>::sin() const
|
||||
|
||||
/** \deprecated ArrayBase::log() */
|
||||
template<typename ExpressionType>
|
||||
inline const EIGEN_CWISE_UNOP_RETURN_TYPE(ei_scalar_pow_op)
|
||||
inline const EIGEN_CWISE_UNOP_RETURN_TYPE(internal::scalar_pow_op)
|
||||
Cwise<ExpressionType>::pow(const Scalar& exponent) const
|
||||
{
|
||||
return EIGEN_CWISE_UNOP_RETURN_TYPE(ei_scalar_pow_op)(_expression(), ei_scalar_pow_op<Scalar>(exponent));
|
||||
return EIGEN_CWISE_UNOP_RETURN_TYPE(internal::scalar_pow_op)(_expression(), internal::scalar_pow_op<Scalar>(exponent));
|
||||
}
|
||||
|
||||
|
||||
/** \deprecated ArrayBase::inverse() */
|
||||
template<typename ExpressionType>
|
||||
inline const EIGEN_CWISE_UNOP_RETURN_TYPE(ei_scalar_inverse_op)
|
||||
inline const EIGEN_CWISE_UNOP_RETURN_TYPE(internal::scalar_inverse_op)
|
||||
Cwise<ExpressionType>::inverse() const
|
||||
{
|
||||
return _expression();
|
||||
@@ -165,7 +165,7 @@ Cwise<ExpressionType>::inverse() const
|
||||
|
||||
/** \deprecated ArrayBase::square() */
|
||||
template<typename ExpressionType>
|
||||
inline const EIGEN_CWISE_UNOP_RETURN_TYPE(ei_scalar_square_op)
|
||||
inline const EIGEN_CWISE_UNOP_RETURN_TYPE(internal::scalar_square_op)
|
||||
Cwise<ExpressionType>::square() const
|
||||
{
|
||||
return _expression();
|
||||
@@ -173,7 +173,7 @@ Cwise<ExpressionType>::square() const
|
||||
|
||||
/** \deprecated ArrayBase::cube() */
|
||||
template<typename ExpressionType>
|
||||
inline const EIGEN_CWISE_UNOP_RETURN_TYPE(ei_scalar_cube_op)
|
||||
inline const EIGEN_CWISE_UNOP_RETURN_TYPE(internal::scalar_cube_op)
|
||||
Cwise<ExpressionType>::cube() const
|
||||
{
|
||||
return _expression();
|
||||
@@ -299,7 +299,7 @@ template<typename ExpressionType>
|
||||
inline const typename Cwise<ExpressionType>::ScalarAddReturnType
|
||||
Cwise<ExpressionType>::operator+(const Scalar& scalar) const
|
||||
{
|
||||
return typename Cwise<ExpressionType>::ScalarAddReturnType(m_matrix, ei_scalar_add_op<Scalar>(scalar));
|
||||
return typename Cwise<ExpressionType>::ScalarAddReturnType(m_matrix, internal::scalar_add_op<Scalar>(scalar));
|
||||
}
|
||||
|
||||
/** \deprecated ArrayBase::operator+=(Scalar) */
|
||||
|
||||
@@ -38,12 +38,14 @@
|
||||
*
|
||||
* \sa MatrixBase::minor()
|
||||
*/
|
||||
|
||||
namespace internal {
|
||||
template<typename MatrixType>
|
||||
struct ei_traits<Minor<MatrixType> >
|
||||
: ei_traits<MatrixType>
|
||||
struct traits<Minor<MatrixType> >
|
||||
: traits<MatrixType>
|
||||
{
|
||||
typedef typename ei_nested<MatrixType>::type MatrixTypeNested;
|
||||
typedef typename ei_unref<MatrixTypeNested>::type _MatrixTypeNested;
|
||||
typedef typename nested<MatrixType>::type MatrixTypeNested;
|
||||
typedef typename unref<MatrixTypeNested>::type _MatrixTypeNested;
|
||||
typedef typename MatrixType::StorageKind StorageKind;
|
||||
enum {
|
||||
RowsAtCompileTime = (MatrixType::RowsAtCompileTime != Dynamic) ?
|
||||
@@ -59,6 +61,7 @@ struct ei_traits<Minor<MatrixType> >
|
||||
// where loops are unrolled and the 'if' evaluates at compile time
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
template<typename MatrixType> class Minor
|
||||
: public MatrixBase<Minor<MatrixType> >
|
||||
@@ -72,7 +75,7 @@ template<typename MatrixType> class Minor
|
||||
Index row, Index col)
|
||||
: m_matrix(matrix), m_row(row), m_col(col)
|
||||
{
|
||||
ei_assert(row >= 0 && row < matrix.rows()
|
||||
eigen_assert(row >= 0 && row < matrix.rows()
|
||||
&& col >= 0 && col < matrix.cols());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user