mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 03:39:01 +08:00
Renamed AnyMatrixBase to EigenBase.
This commit is contained in:
parent
4f8773c23a
commit
f0c8dcf1e2
@ -164,7 +164,7 @@ struct Dense {};
|
|||||||
#include "src/Core/Functors.h"
|
#include "src/Core/Functors.h"
|
||||||
#include "src/Core/DenseBase.h"
|
#include "src/Core/DenseBase.h"
|
||||||
#include "src/Core/MatrixBase.h"
|
#include "src/Core/MatrixBase.h"
|
||||||
#include "src/Core/AnyMatrixBase.h"
|
#include "src/Core/EigenBase.h"
|
||||||
#include "src/Core/Coeffs.h"
|
#include "src/Core/Coeffs.h"
|
||||||
|
|
||||||
#ifndef EIGEN_PARSED_BY_DOXYGEN // work around Doxygen bug triggered by Assign.h r814874
|
#ifndef EIGEN_PARSED_BY_DOXYGEN // work around Doxygen bug triggered by Assign.h r814874
|
||||||
|
@ -61,7 +61,7 @@ class Array
|
|||||||
* the usage of 'using'. This should be done only for operator=.
|
* the usage of 'using'. This should be done only for operator=.
|
||||||
*/
|
*/
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
EIGEN_STRONG_INLINE Array& operator=(const AnyMatrixBase<OtherDerived> &other)
|
EIGEN_STRONG_INLINE Array& operator=(const EigenBase<OtherDerived> &other)
|
||||||
{
|
{
|
||||||
return Base::operator=(other);
|
return Base::operator=(other);
|
||||||
}
|
}
|
||||||
@ -196,9 +196,9 @@ class Array
|
|||||||
other.evalTo(*this);
|
other.evalTo(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \sa MatrixBase::operator=(const AnyMatrixBase<OtherDerived>&) */
|
/** \sa MatrixBase::operator=(const EigenBase<OtherDerived>&) */
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
EIGEN_STRONG_INLINE Array(const AnyMatrixBase<OtherDerived> &other)
|
EIGEN_STRONG_INLINE Array(const EigenBase<OtherDerived> &other)
|
||||||
: Base(other.derived().rows() * other.derived().cols(), other.derived().rows(), other.derived().cols())
|
: Base(other.derived().rows() * other.derived().cols(), other.derived().rows(), other.derived().cols())
|
||||||
{
|
{
|
||||||
Base::_check_template_params();
|
Base::_check_template_params();
|
||||||
|
@ -57,7 +57,7 @@ struct ei_traits<BandMatrix<_Scalar,Rows,Cols,Supers,Subs,Options> >
|
|||||||
};
|
};
|
||||||
|
|
||||||
template<typename _Scalar, int Rows, int Cols, int Supers, int Subs, int Options>
|
template<typename _Scalar, int Rows, int Cols, int Supers, int Subs, int Options>
|
||||||
class BandMatrix : public AnyMatrixBase<BandMatrix<_Scalar,Rows,Cols,Supers,Subs,Options> >
|
class BandMatrix : public EigenBase<BandMatrix<_Scalar,Rows,Cols,Supers,Subs,Options> >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ template<typename Derived> class DenseBase
|
|||||||
: public ei_special_scalar_op_base<Derived,typename ei_traits<Derived>::Scalar,
|
: public ei_special_scalar_op_base<Derived,typename ei_traits<Derived>::Scalar,
|
||||||
typename NumTraits<typename ei_traits<Derived>::Scalar>::Real>
|
typename NumTraits<typename ei_traits<Derived>::Scalar>::Real>
|
||||||
#else
|
#else
|
||||||
: public AnyMatrixBase<Derived>
|
: public EigenBase<Derived>
|
||||||
#endif // not EIGEN_PARSED_BY_DOXYGEN
|
#endif // not EIGEN_PARSED_BY_DOXYGEN
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -53,8 +53,8 @@ template<typename Derived> class DenseBase
|
|||||||
typedef typename ei_traits<Derived>::Scalar Scalar;
|
typedef typename ei_traits<Derived>::Scalar Scalar;
|
||||||
typedef typename ei_packet_traits<Scalar>::type PacketScalar;
|
typedef typename ei_packet_traits<Scalar>::type PacketScalar;
|
||||||
|
|
||||||
using AnyMatrixBase<Derived>::derived;
|
using EigenBase<Derived>::derived;
|
||||||
using AnyMatrixBase<Derived>::const_cast_derived;
|
using EigenBase<Derived>::const_cast_derived;
|
||||||
#endif // not EIGEN_PARSED_BY_DOXYGEN
|
#endif // not EIGEN_PARSED_BY_DOXYGEN
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
@ -214,13 +214,13 @@ template<typename Derived> class DenseBase
|
|||||||
Derived& operator=(const DenseBase& other);
|
Derived& operator=(const DenseBase& other);
|
||||||
|
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
Derived& operator=(const AnyMatrixBase<OtherDerived> &other);
|
Derived& operator=(const EigenBase<OtherDerived> &other);
|
||||||
|
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
Derived& operator+=(const AnyMatrixBase<OtherDerived> &other);
|
Derived& operator+=(const EigenBase<OtherDerived> &other);
|
||||||
|
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
Derived& operator-=(const AnyMatrixBase<OtherDerived> &other);
|
Derived& operator-=(const EigenBase<OtherDerived> &other);
|
||||||
|
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
Derived& operator=(const ReturnByValue<OtherDerived>& func);
|
Derived& operator=(const ReturnByValue<OtherDerived>& func);
|
||||||
|
@ -355,19 +355,19 @@ class DenseStorageBase : public _Base<Derived>
|
|||||||
// EIGEN_INITIALIZE_BY_ZERO_IF_THAT_OPTION_IS_ENABLED
|
// EIGEN_INITIALIZE_BY_ZERO_IF_THAT_OPTION_IS_ENABLED
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \copydoc MatrixBase::operator=(const AnyMatrixBase<OtherDerived>&)
|
/** \copydoc MatrixBase::operator=(const EigenBase<OtherDerived>&)
|
||||||
*/
|
*/
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
EIGEN_STRONG_INLINE Derived& operator=(const AnyMatrixBase<OtherDerived> &other)
|
EIGEN_STRONG_INLINE Derived& operator=(const EigenBase<OtherDerived> &other)
|
||||||
{
|
{
|
||||||
resize(other.derived().rows(), other.derived().cols());
|
resize(other.derived().rows(), other.derived().cols());
|
||||||
Base::operator=(other.derived());
|
Base::operator=(other.derived());
|
||||||
return this->derived();
|
return this->derived();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \sa MatrixBase::operator=(const AnyMatrixBase<OtherDerived>&) */
|
/** \sa MatrixBase::operator=(const EigenBase<OtherDerived>&) */
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
EIGEN_STRONG_INLINE DenseStorageBase(const AnyMatrixBase<OtherDerived> &other)
|
EIGEN_STRONG_INLINE DenseStorageBase(const EigenBase<OtherDerived> &other)
|
||||||
: m_storage(other.derived().rows() * other.derived().cols(), other.derived().rows(), other.derived().cols())
|
: m_storage(other.derived().rows() * other.derived().cols(), other.derived().rows(), other.derived().cols())
|
||||||
{
|
{
|
||||||
_check_template_params();
|
_check_template_params();
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
class DiagonalBase : public AnyMatrixBase<Derived>
|
class DiagonalBase : public EigenBase<Derived>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef typename ei_traits<Derived>::DiagonalVectorType DiagonalVectorType;
|
typedef typename ei_traits<Derived>::DiagonalVectorType DiagonalVectorType;
|
||||||
|
@ -23,19 +23,19 @@
|
|||||||
// License and a copy of the GNU General Public License along with
|
// License and a copy of the GNU General Public License along with
|
||||||
// Eigen. If not, see <http://www.gnu.org/licenses/>.
|
// Eigen. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
#ifndef EIGEN_ANYMATRIXBASE_H
|
#ifndef EIGEN_EIGENBASE_H
|
||||||
#define EIGEN_ANYMATRIXBASE_H
|
#define EIGEN_EIGENBASE_H
|
||||||
|
|
||||||
|
|
||||||
/** Common base class for all classes T such that MatrixBase has an operator=(T) and a constructor MatrixBase(T).
|
/** Common base class for all classes T such that MatrixBase has an operator=(T) and a constructor MatrixBase(T).
|
||||||
*
|
*
|
||||||
* In other words, an AnyMatrixBase object is an object that can be copied into a MatrixBase.
|
* In other words, an EigenBase object is an object that can be copied into a MatrixBase.
|
||||||
*
|
*
|
||||||
* Besides MatrixBase-derived classes, this also includes special matrix classes such as diagonal matrices, etc.
|
* Besides MatrixBase-derived classes, this also includes special matrix classes such as diagonal matrices, etc.
|
||||||
*
|
*
|
||||||
* Notice that this class is trivial, it is only used to disambiguate overloaded functions.
|
* Notice that this class is trivial, it is only used to disambiguate overloaded functions.
|
||||||
*/
|
*/
|
||||||
template<typename Derived> struct AnyMatrixBase
|
template<typename Derived> struct EigenBase
|
||||||
{
|
{
|
||||||
// typedef typename ei_plain_matrix_type<Derived>::type PlainMatrixType;
|
// typedef typename ei_plain_matrix_type<Derived>::type PlainMatrixType;
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ template<typename Derived> struct AnyMatrixBase
|
|||||||
const Derived& derived() const { return *static_cast<const Derived*>(this); }
|
const Derived& derived() const { return *static_cast<const Derived*>(this); }
|
||||||
|
|
||||||
inline Derived& const_cast_derived() const
|
inline Derived& const_cast_derived() const
|
||||||
{ return *static_cast<Derived*>(const_cast<AnyMatrixBase*>(this)); }
|
{ return *static_cast<Derived*>(const_cast<EigenBase*>(this)); }
|
||||||
|
|
||||||
/** \returns the number of rows. \sa cols(), RowsAtCompileTime */
|
/** \returns the number of rows. \sa cols(), RowsAtCompileTime */
|
||||||
inline int rows() const { return derived().rows(); }
|
inline int rows() const { return derived().rows(); }
|
||||||
@ -108,7 +108,7 @@ template<typename Derived> struct AnyMatrixBase
|
|||||||
*/
|
*/
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
Derived& DenseBase<Derived>::operator=(const AnyMatrixBase<OtherDerived> &other)
|
Derived& DenseBase<Derived>::operator=(const EigenBase<OtherDerived> &other)
|
||||||
{
|
{
|
||||||
other.derived().evalTo(derived());
|
other.derived().evalTo(derived());
|
||||||
return derived();
|
return derived();
|
||||||
@ -116,7 +116,7 @@ Derived& DenseBase<Derived>::operator=(const AnyMatrixBase<OtherDerived> &other)
|
|||||||
|
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
Derived& DenseBase<Derived>::operator+=(const AnyMatrixBase<OtherDerived> &other)
|
Derived& DenseBase<Derived>::operator+=(const EigenBase<OtherDerived> &other)
|
||||||
{
|
{
|
||||||
other.derived().addTo(derived());
|
other.derived().addTo(derived());
|
||||||
return derived();
|
return derived();
|
||||||
@ -124,7 +124,7 @@ Derived& DenseBase<Derived>::operator+=(const AnyMatrixBase<OtherDerived> &other
|
|||||||
|
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
Derived& DenseBase<Derived>::operator-=(const AnyMatrixBase<OtherDerived> &other)
|
Derived& DenseBase<Derived>::operator-=(const EigenBase<OtherDerived> &other)
|
||||||
{
|
{
|
||||||
other.derived().subTo(derived());
|
other.derived().subTo(derived());
|
||||||
return derived();
|
return derived();
|
||||||
@ -137,7 +137,7 @@ Derived& DenseBase<Derived>::operator-=(const AnyMatrixBase<OtherDerived> &other
|
|||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
inline Derived&
|
inline Derived&
|
||||||
MatrixBase<Derived>::operator*=(const AnyMatrixBase<OtherDerived> &other)
|
MatrixBase<Derived>::operator*=(const EigenBase<OtherDerived> &other)
|
||||||
{
|
{
|
||||||
other.derived().applyThisOnTheRight(derived());
|
other.derived().applyThisOnTheRight(derived());
|
||||||
return derived();
|
return derived();
|
||||||
@ -146,7 +146,7 @@ MatrixBase<Derived>::operator*=(const AnyMatrixBase<OtherDerived> &other)
|
|||||||
/** replaces \c *this by \c *this * \a other. It is equivalent to MatrixBase::operator*=() */
|
/** replaces \c *this by \c *this * \a other. It is equivalent to MatrixBase::operator*=() */
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
inline void MatrixBase<Derived>::applyOnTheRight(const AnyMatrixBase<OtherDerived> &other)
|
inline void MatrixBase<Derived>::applyOnTheRight(const EigenBase<OtherDerived> &other)
|
||||||
{
|
{
|
||||||
other.derived().applyThisOnTheRight(derived());
|
other.derived().applyThisOnTheRight(derived());
|
||||||
}
|
}
|
||||||
@ -154,9 +154,9 @@ inline void MatrixBase<Derived>::applyOnTheRight(const AnyMatrixBase<OtherDerive
|
|||||||
/** replaces \c *this by \c *this * \a other. */
|
/** replaces \c *this by \c *this * \a other. */
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
inline void MatrixBase<Derived>::applyOnTheLeft(const AnyMatrixBase<OtherDerived> &other)
|
inline void MatrixBase<Derived>::applyOnTheLeft(const EigenBase<OtherDerived> &other)
|
||||||
{
|
{
|
||||||
other.derived().applyThisOnTheLeft(derived());
|
other.derived().applyThisOnTheLeft(derived());
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // EIGEN_ANYMATRIXBASE_H
|
#endif // EIGEN_EIGENBASE_H
|
@ -181,10 +181,10 @@ class Matrix
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Copies the generic expression \a other into *this.
|
* \brief Copies the generic expression \a other into *this.
|
||||||
* \copydetails DenseBase::operator=(const AnyMatrixBase<OtherDerived> &other)
|
* \copydetails DenseBase::operator=(const EigenBase<OtherDerived> &other)
|
||||||
*/
|
*/
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
EIGEN_STRONG_INLINE Matrix& operator=(const AnyMatrixBase<OtherDerived> &other)
|
EIGEN_STRONG_INLINE Matrix& operator=(const EigenBase<OtherDerived> &other)
|
||||||
{
|
{
|
||||||
return Base::operator=(other);
|
return Base::operator=(other);
|
||||||
}
|
}
|
||||||
@ -297,10 +297,10 @@ class Matrix
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** \brief Copy constructor for generic expressions.
|
/** \brief Copy constructor for generic expressions.
|
||||||
* \sa MatrixBase::operator=(const AnyMatrixBase<OtherDerived>&)
|
* \sa MatrixBase::operator=(const EigenBase<OtherDerived>&)
|
||||||
*/
|
*/
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
EIGEN_STRONG_INLINE Matrix(const AnyMatrixBase<OtherDerived> &other)
|
EIGEN_STRONG_INLINE Matrix(const EigenBase<OtherDerived> &other)
|
||||||
: Base(other.derived().rows() * other.derived().cols(), other.derived().rows(), other.derived().cols())
|
: Base(other.derived().rows() * other.derived().cols(), other.derived().rows(), other.derived().cols())
|
||||||
{
|
{
|
||||||
Base::_check_template_params();
|
Base::_check_template_params();
|
||||||
|
@ -193,13 +193,13 @@ template<typename Derived> class MatrixBase
|
|||||||
lazyProduct(const MatrixBase<OtherDerived> &other) const;
|
lazyProduct(const MatrixBase<OtherDerived> &other) const;
|
||||||
|
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
Derived& operator*=(const AnyMatrixBase<OtherDerived>& other);
|
Derived& operator*=(const EigenBase<OtherDerived>& other);
|
||||||
|
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
void applyOnTheLeft(const AnyMatrixBase<OtherDerived>& other);
|
void applyOnTheLeft(const EigenBase<OtherDerived>& other);
|
||||||
|
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
void applyOnTheRight(const AnyMatrixBase<OtherDerived>& other);
|
void applyOnTheRight(const EigenBase<OtherDerived>& other);
|
||||||
|
|
||||||
template<typename DiagonalDerived>
|
template<typename DiagonalDerived>
|
||||||
const DiagonalProduct<Derived, DiagonalDerived, OnTheRight>
|
const DiagonalProduct<Derived, DiagonalDerived, OnTheRight>
|
||||||
|
@ -55,7 +55,7 @@ struct ei_traits<PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime> >
|
|||||||
{};
|
{};
|
||||||
|
|
||||||
template<int SizeAtCompileTime, int MaxSizeAtCompileTime>
|
template<int SizeAtCompileTime, int MaxSizeAtCompileTime>
|
||||||
class PermutationMatrix : public AnyMatrixBase<PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime> >
|
class PermutationMatrix : public EigenBase<PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime> >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -144,7 +144,7 @@ class PermutationMatrix : public AnyMatrixBase<PermutationMatrix<SizeAtCompileTi
|
|||||||
|
|
||||||
/** \returns a Matrix object initialized from this permutation matrix. Notice that it
|
/** \returns a Matrix object initialized from this permutation matrix. Notice that it
|
||||||
* is inefficient to return this Matrix object by value. For efficiency, favor using
|
* is inefficient to return this Matrix object by value. For efficiency, favor using
|
||||||
* the Matrix constructor taking AnyMatrixBase objects.
|
* the Matrix constructor taking EigenBase objects.
|
||||||
*/
|
*/
|
||||||
DenseMatrixType toDenseMatrix() const
|
DenseMatrixType toDenseMatrix() const
|
||||||
{
|
{
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
*
|
*
|
||||||
* \brief Base class for triangular part in a matrix
|
* \brief Base class for triangular part in a matrix
|
||||||
*/
|
*/
|
||||||
template<typename Derived> class TriangularBase : public AnyMatrixBase<Derived>
|
template<typename Derived> class TriangularBase : public EigenBase<Derived>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
template<typename T> struct ei_traits;
|
template<typename T> struct ei_traits;
|
||||||
template<typename T> struct NumTraits;
|
template<typename T> struct NumTraits;
|
||||||
|
|
||||||
template<typename Derived> struct AnyMatrixBase;
|
template<typename Derived> struct EigenBase;
|
||||||
|
|
||||||
template<typename _Scalar, int _Rows, int _Cols,
|
template<typename _Scalar, int _Rows, int _Cols,
|
||||||
int _Options = EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION | AutoAlign,
|
int _Options = EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION | AutoAlign,
|
||||||
|
@ -201,6 +201,28 @@ template<typename T> struct ei_plain_matrix_type_row_major
|
|||||||
// we should be able to get rid of this one too
|
// we should be able to get rid of this one too
|
||||||
template<typename T> struct ei_must_nest_by_value { enum { ret = false }; };
|
template<typename T> struct ei_must_nest_by_value { enum { ret = false }; };
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
struct ei_is_reference
|
||||||
|
{
|
||||||
|
#ifndef NDEBUG
|
||||||
|
static void check() { std::cout << typeid(T).name() << std::endl; }
|
||||||
|
#else
|
||||||
|
static void check() {}
|
||||||
|
#endif
|
||||||
|
enum { ret = false };
|
||||||
|
};
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
struct ei_is_reference<T&>
|
||||||
|
{
|
||||||
|
#ifndef NDEBUG
|
||||||
|
static void check() { std::cout << typeid(T).name() << "&" << std::endl; }
|
||||||
|
#else
|
||||||
|
static void check() {}
|
||||||
|
#endif
|
||||||
|
enum { ret = true };
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The reference selector for template expressions. The idea is that we don't
|
* The reference selector for template expressions. The idea is that we don't
|
||||||
* need to use references for expressions since they are light weight proxy
|
* need to use references for expressions since they are light weight proxy
|
||||||
@ -258,7 +280,7 @@ template<unsigned int Flags> struct ei_are_flags_consistent
|
|||||||
* overloads for complex types */
|
* overloads for complex types */
|
||||||
template<typename Derived,typename Scalar,typename OtherScalar,
|
template<typename Derived,typename Scalar,typename OtherScalar,
|
||||||
bool EnableIt = !ei_is_same_type<Scalar,OtherScalar>::ret >
|
bool EnableIt = !ei_is_same_type<Scalar,OtherScalar>::ret >
|
||||||
struct ei_special_scalar_op_base : public AnyMatrixBase<Derived>
|
struct ei_special_scalar_op_base : public EigenBase<Derived>
|
||||||
{
|
{
|
||||||
// dummy operator* so that the
|
// dummy operator* so that the
|
||||||
// "using ei_special_scalar_op_base::operator*" compiles
|
// "using ei_special_scalar_op_base::operator*" compiles
|
||||||
@ -266,7 +288,7 @@ struct ei_special_scalar_op_base : public AnyMatrixBase<Derived>
|
|||||||
};
|
};
|
||||||
|
|
||||||
template<typename Derived,typename Scalar,typename OtherScalar>
|
template<typename Derived,typename Scalar,typename OtherScalar>
|
||||||
struct ei_special_scalar_op_base<Derived,Scalar,OtherScalar,true> : public AnyMatrixBase<Derived>
|
struct ei_special_scalar_op_base<Derived,Scalar,OtherScalar,true> : public EigenBase<Derived>
|
||||||
{
|
{
|
||||||
const CwiseUnaryOp<ei_scalar_multiple2_op<Scalar,OtherScalar>, Derived>
|
const CwiseUnaryOp<ei_scalar_multiple2_op<Scalar,OtherScalar>, Derived>
|
||||||
operator*(const OtherScalar& scalar) const
|
operator*(const OtherScalar& scalar) const
|
||||||
|
@ -74,12 +74,12 @@ class RotationBase
|
|||||||
*/
|
*/
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
EIGEN_STRONG_INLINE typename ei_rotation_base_generic_product_selector<Derived,OtherDerived,OtherDerived::IsVectorAtCompileTime>::ReturnType
|
EIGEN_STRONG_INLINE typename ei_rotation_base_generic_product_selector<Derived,OtherDerived,OtherDerived::IsVectorAtCompileTime>::ReturnType
|
||||||
operator*(const AnyMatrixBase<OtherDerived>& e) const
|
operator*(const EigenBase<OtherDerived>& e) const
|
||||||
{ return ei_rotation_base_generic_product_selector<Derived,OtherDerived>::run(derived(), e.derived()); }
|
{ return ei_rotation_base_generic_product_selector<Derived,OtherDerived>::run(derived(), e.derived()); }
|
||||||
|
|
||||||
/** \returns the concatenation of a linear transformation \a l with the rotation \a r */
|
/** \returns the concatenation of a linear transformation \a l with the rotation \a r */
|
||||||
template<typename OtherDerived> friend
|
template<typename OtherDerived> friend
|
||||||
inline RotationMatrixType operator*(const AnyMatrixBase<OtherDerived>& l, const Derived& r)
|
inline RotationMatrixType operator*(const EigenBase<OtherDerived>& l, const Derived& r)
|
||||||
{ return l.derived() * r.toRotationMatrix(); }
|
{ return l.derived() * r.toRotationMatrix(); }
|
||||||
|
|
||||||
/** \returns the concatenation of the rotation \c *this with a transformation \a t */
|
/** \returns the concatenation of the rotation \c *this with a transformation \a t */
|
||||||
|
@ -226,14 +226,14 @@ public:
|
|||||||
|
|
||||||
/** Constructs and initializes a transformation from a Dim^2 or a (Dim+1)^2 matrix. */
|
/** Constructs and initializes a transformation from a Dim^2 or a (Dim+1)^2 matrix. */
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
inline explicit Transform(const AnyMatrixBase<OtherDerived>& other)
|
inline explicit Transform(const EigenBase<OtherDerived>& other)
|
||||||
{
|
{
|
||||||
ei_transform_construct_from_matrix<OtherDerived,Mode,Dim,HDim>::run(this, other.derived());
|
ei_transform_construct_from_matrix<OtherDerived,Mode,Dim,HDim>::run(this, other.derived());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Set \c *this from a Dim^2 or (Dim+1)^2 matrix. */
|
/** Set \c *this from a Dim^2 or (Dim+1)^2 matrix. */
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
inline Transform& operator=(const AnyMatrixBase<OtherDerived>& other)
|
inline Transform& operator=(const EigenBase<OtherDerived>& other)
|
||||||
{
|
{
|
||||||
ei_transform_construct_from_matrix<OtherDerived,Mode,Dim,HDim>::run(this, other.derived());
|
ei_transform_construct_from_matrix<OtherDerived,Mode,Dim,HDim>::run(this, other.derived());
|
||||||
return *this;
|
return *this;
|
||||||
@ -310,7 +310,7 @@ public:
|
|||||||
// note: this function is defined here because some compilers cannot find the respective declaration
|
// note: this function is defined here because some compilers cannot find the respective declaration
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
inline const typename ei_transform_right_product_impl<OtherDerived,Mode,_Dim,_Dim+1>::ResultType
|
inline const typename ei_transform_right_product_impl<OtherDerived,Mode,_Dim,_Dim+1>::ResultType
|
||||||
operator * (const AnyMatrixBase<OtherDerived> &other) const
|
operator * (const EigenBase<OtherDerived> &other) const
|
||||||
{ return ei_transform_right_product_impl<OtherDerived,Mode,Dim,HDim>::run(*this,other.derived()); }
|
{ return ei_transform_right_product_impl<OtherDerived,Mode,Dim,HDim>::run(*this,other.derived()); }
|
||||||
|
|
||||||
/** \returns the product expression of a transformation matrix \a a times a transform \a b
|
/** \returns the product expression of a transformation matrix \a a times a transform \a b
|
||||||
@ -322,11 +322,11 @@ public:
|
|||||||
*/
|
*/
|
||||||
template<typename OtherDerived> friend
|
template<typename OtherDerived> friend
|
||||||
inline const typename ei_transform_left_product_impl<OtherDerived,Mode,_Dim,_Dim+1>::ResultType
|
inline const typename ei_transform_left_product_impl<OtherDerived,Mode,_Dim,_Dim+1>::ResultType
|
||||||
operator * (const AnyMatrixBase<OtherDerived> &a, const Transform &b)
|
operator * (const EigenBase<OtherDerived> &a, const Transform &b)
|
||||||
{ return ei_transform_left_product_impl<OtherDerived,Mode,Dim,HDim>::run(a.derived(),b); }
|
{ return ei_transform_left_product_impl<OtherDerived,Mode,Dim,HDim>::run(a.derived(),b); }
|
||||||
|
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
inline Transform& operator*=(const AnyMatrixBase<OtherDerived>& other) { return *this = *this * other; }
|
inline Transform& operator*=(const EigenBase<OtherDerived>& other) { return *this = *this * other; }
|
||||||
|
|
||||||
/** Contatenates two transformations */
|
/** Contatenates two transformations */
|
||||||
inline const Transform operator * (const Transform& other) const
|
inline const Transform operator * (const Transform& other) const
|
||||||
@ -1021,7 +1021,7 @@ struct ei_transform_construct_from_matrix<Other, AffineCompact,Dim,HDim, HDim,HD
|
|||||||
};
|
};
|
||||||
|
|
||||||
/*********************************************************
|
/*********************************************************
|
||||||
*** Specializations of operator* with a AnyMatrixBase ***
|
*** Specializations of operator* with a EigenBase ***
|
||||||
*********************************************************/
|
*********************************************************/
|
||||||
|
|
||||||
// ei_general_product_return_type is a generalization of ProductReturnType, for all types (including e.g. DiagonalBase...),
|
// ei_general_product_return_type is a generalization of ProductReturnType, for all types (including e.g. DiagonalBase...),
|
||||||
|
@ -93,7 +93,7 @@ public:
|
|||||||
|
|
||||||
/** Concatenates a translation and a linear transformation */
|
/** Concatenates a translation and a linear transformation */
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
inline AffineTransformType operator* (const AnyMatrixBase<OtherDerived>& linear) const;
|
inline AffineTransformType operator* (const EigenBase<OtherDerived>& linear) const;
|
||||||
|
|
||||||
/** Concatenates a translation and a rotation */
|
/** Concatenates a translation and a rotation */
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
@ -103,7 +103,7 @@ public:
|
|||||||
/** \returns the concatenation of a linear transformation \a l with the translation \a t */
|
/** \returns the concatenation of a linear transformation \a l with the translation \a t */
|
||||||
// its a nightmare to define a templated friend function outside its declaration
|
// its a nightmare to define a templated friend function outside its declaration
|
||||||
template<typename OtherDerived> friend
|
template<typename OtherDerived> friend
|
||||||
inline AffineTransformType operator*(const AnyMatrixBase<OtherDerived>& linear, const Translation& t)
|
inline AffineTransformType operator*(const EigenBase<OtherDerived>& linear, const Translation& t)
|
||||||
{
|
{
|
||||||
AffineTransformType res;
|
AffineTransformType res;
|
||||||
res.matrix().setZero();
|
res.matrix().setZero();
|
||||||
@ -182,7 +182,7 @@ Translation<Scalar,Dim>::operator* (const UniformScaling<Scalar>& other) const
|
|||||||
template<typename Scalar, int Dim>
|
template<typename Scalar, int Dim>
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
inline typename Translation<Scalar,Dim>::AffineTransformType
|
inline typename Translation<Scalar,Dim>::AffineTransformType
|
||||||
Translation<Scalar,Dim>::operator* (const AnyMatrixBase<OtherDerived>& linear) const
|
Translation<Scalar,Dim>::operator* (const EigenBase<OtherDerived>& linear) const
|
||||||
{
|
{
|
||||||
AffineTransformType res;
|
AffineTransformType res;
|
||||||
res.matrix().setZero();
|
res.matrix().setZero();
|
||||||
|
@ -97,7 +97,7 @@ template<typename OtherScalarType, typename MatrixType> struct ei_matrix_type_ti
|
|||||||
};
|
};
|
||||||
|
|
||||||
template<typename VectorsType, typename CoeffsType, int Side> class HouseholderSequence
|
template<typename VectorsType, typename CoeffsType, int Side> class HouseholderSequence
|
||||||
: public AnyMatrixBase<HouseholderSequence<VectorsType,CoeffsType,Side> >
|
: public EigenBase<HouseholderSequence<VectorsType,CoeffsType,Side> >
|
||||||
{
|
{
|
||||||
enum {
|
enum {
|
||||||
RowsAtCompileTime = ei_traits<HouseholderSequence>::RowsAtCompileTime,
|
RowsAtCompileTime = ei_traits<HouseholderSequence>::RowsAtCompileTime,
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
template<typename Derived> class SparseMatrixBase : public AnyMatrixBase<Derived>
|
template<typename Derived> class SparseMatrixBase : public EigenBase<Derived>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
* \param Derived
|
* \param Derived
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
template<typename Derived> class SkylineMatrixBase : public AnyMatrixBase<Derived> {
|
template<typename Derived> class SkylineMatrixBase : public EigenBase<Derived> {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef typename ei_traits<Derived>::Scalar Scalar;
|
typedef typename ei_traits<Derived>::Scalar Scalar;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user