Skip to content
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -32,7 +32,7 @@ class BandMatrixBase : public EigenBase<Derived> ...@@ -32,7 +32,7 @@ class BandMatrixBase : public EigenBase<Derived>
}; };
typedef typename internal::traits<Derived>::Scalar Scalar; typedef typename internal::traits<Derived>::Scalar Scalar;
typedef Matrix<Scalar,RowsAtCompileTime,ColsAtCompileTime> DenseMatrixType; typedef Matrix<Scalar,RowsAtCompileTime,ColsAtCompileTime> DenseMatrixType;
typedef typename DenseMatrixType::Index Index; typedef typename DenseMatrixType::StorageIndex StorageIndex;
typedef typename internal::traits<Derived>::CoefficientsType CoefficientsType; typedef typename internal::traits<Derived>::CoefficientsType CoefficientsType;
typedef EigenBase<Derived> Base; typedef EigenBase<Derived> Base;
...@@ -161,15 +161,15 @@ class BandMatrixBase : public EigenBase<Derived> ...@@ -161,15 +161,15 @@ class BandMatrixBase : public EigenBase<Derived>
* *
* \brief Represents a rectangular matrix with a banded storage * \brief Represents a rectangular matrix with a banded storage
* *
* \param _Scalar Numeric type, i.e. float, double, int * \tparam _Scalar Numeric type, i.e. float, double, int
* \param Rows Number of rows, or \b Dynamic * \tparam _Rows Number of rows, or \b Dynamic
* \param Cols Number of columns, or \b Dynamic * \tparam _Cols Number of columns, or \b Dynamic
* \param Supers Number of super diagonal * \tparam _Supers Number of super diagonal
* \param Subs Number of sub diagonal * \tparam _Subs Number of sub diagonal
* \param _Options A combination of either \b #RowMajor or \b #ColMajor, and of \b #SelfAdjoint * \tparam _Options A combination of either \b #RowMajor or \b #ColMajor, and of \b #SelfAdjoint
* The former controls \ref TopicStorageOrders "storage order", and defaults to * The former controls \ref TopicStorageOrders "storage order", and defaults to
* column-major. The latter controls whether the matrix represents a selfadjoint * column-major. The latter controls whether the matrix represents a selfadjoint
* matrix in which case either Supers of Subs have to be null. * matrix in which case either Supers of Subs have to be null.
* *
* \sa class TridiagonalMatrix * \sa class TridiagonalMatrix
*/ */
...@@ -179,7 +179,7 @@ struct traits<BandMatrix<_Scalar,_Rows,_Cols,_Supers,_Subs,_Options> > ...@@ -179,7 +179,7 @@ struct traits<BandMatrix<_Scalar,_Rows,_Cols,_Supers,_Subs,_Options> >
{ {
typedef _Scalar Scalar; typedef _Scalar Scalar;
typedef Dense StorageKind; typedef Dense StorageKind;
typedef DenseIndex Index; typedef Eigen::Index StorageIndex;
enum { enum {
CoeffReadCost = NumTraits<Scalar>::ReadCost, CoeffReadCost = NumTraits<Scalar>::ReadCost,
RowsAtCompileTime = _Rows, RowsAtCompileTime = _Rows,
...@@ -201,10 +201,10 @@ class BandMatrix : public BandMatrixBase<BandMatrix<_Scalar,Rows,Cols,Supers,Sub ...@@ -201,10 +201,10 @@ class BandMatrix : public BandMatrixBase<BandMatrix<_Scalar,Rows,Cols,Supers,Sub
public: public:
typedef typename internal::traits<BandMatrix>::Scalar Scalar; typedef typename internal::traits<BandMatrix>::Scalar Scalar;
typedef typename internal::traits<BandMatrix>::Index Index; typedef typename internal::traits<BandMatrix>::StorageIndex StorageIndex;
typedef typename internal::traits<BandMatrix>::CoefficientsType CoefficientsType; typedef typename internal::traits<BandMatrix>::CoefficientsType CoefficientsType;
inline BandMatrix(Index rows=Rows, Index cols=Cols, Index supers=Supers, Index subs=Subs) explicit inline BandMatrix(Index rows=Rows, Index cols=Cols, Index supers=Supers, Index subs=Subs)
: m_coeffs(1+supers+subs,cols), : m_coeffs(1+supers+subs,cols),
m_rows(rows), m_supers(supers), m_subs(subs) m_rows(rows), m_supers(supers), m_subs(subs)
{ {
...@@ -241,7 +241,7 @@ struct traits<BandMatrixWrapper<_CoefficientsType,_Rows,_Cols,_Supers,_Subs,_Opt ...@@ -241,7 +241,7 @@ struct traits<BandMatrixWrapper<_CoefficientsType,_Rows,_Cols,_Supers,_Subs,_Opt
{ {
typedef typename _CoefficientsType::Scalar Scalar; typedef typename _CoefficientsType::Scalar Scalar;
typedef typename _CoefficientsType::StorageKind StorageKind; typedef typename _CoefficientsType::StorageKind StorageKind;
typedef typename _CoefficientsType::Index Index; typedef typename _CoefficientsType::StorageIndex StorageIndex;
enum { enum {
CoeffReadCost = internal::traits<_CoefficientsType>::CoeffReadCost, CoeffReadCost = internal::traits<_CoefficientsType>::CoeffReadCost,
RowsAtCompileTime = _Rows, RowsAtCompileTime = _Rows,
...@@ -264,9 +264,9 @@ class BandMatrixWrapper : public BandMatrixBase<BandMatrixWrapper<_CoefficientsT ...@@ -264,9 +264,9 @@ class BandMatrixWrapper : public BandMatrixBase<BandMatrixWrapper<_CoefficientsT
typedef typename internal::traits<BandMatrixWrapper>::Scalar Scalar; typedef typename internal::traits<BandMatrixWrapper>::Scalar Scalar;
typedef typename internal::traits<BandMatrixWrapper>::CoefficientsType CoefficientsType; typedef typename internal::traits<BandMatrixWrapper>::CoefficientsType CoefficientsType;
typedef typename internal::traits<BandMatrixWrapper>::Index Index; typedef typename internal::traits<BandMatrixWrapper>::StorageIndex StorageIndex;
inline BandMatrixWrapper(const CoefficientsType& coeffs, Index rows=_Rows, Index cols=_Cols, Index supers=_Supers, Index subs=_Subs) explicit inline BandMatrixWrapper(const CoefficientsType& coeffs, Index rows=_Rows, Index cols=_Cols, Index supers=_Supers, Index subs=_Subs)
: m_coeffs(coeffs), : m_coeffs(coeffs),
m_rows(rows), m_supers(supers), m_subs(subs) m_rows(rows), m_supers(supers), m_subs(subs)
{ {
...@@ -302,9 +302,9 @@ class BandMatrixWrapper : public BandMatrixBase<BandMatrixWrapper<_CoefficientsT ...@@ -302,9 +302,9 @@ class BandMatrixWrapper : public BandMatrixBase<BandMatrixWrapper<_CoefficientsT
* *
* \brief Represents a tridiagonal matrix with a compact banded storage * \brief Represents a tridiagonal matrix with a compact banded storage
* *
* \param _Scalar Numeric type, i.e. float, double, int * \tparam Scalar Numeric type, i.e. float, double, int
* \param Size Number of rows and cols, or \b Dynamic * \tparam Size Number of rows and cols, or \b Dynamic
* \param _Options Can be 0 or \b SelfAdjoint * \tparam Options Can be 0 or \b SelfAdjoint
* *
* \sa class BandMatrix * \sa class BandMatrix
*/ */
...@@ -312,9 +312,9 @@ template<typename Scalar, int Size, int Options> ...@@ -312,9 +312,9 @@ template<typename Scalar, int Size, int Options>
class TridiagonalMatrix : public BandMatrix<Scalar,Size,Size,Options&SelfAdjoint?0:1,1,Options|RowMajor> class TridiagonalMatrix : public BandMatrix<Scalar,Size,Size,Options&SelfAdjoint?0:1,1,Options|RowMajor>
{ {
typedef BandMatrix<Scalar,Size,Size,Options&SelfAdjoint?0:1,1,Options|RowMajor> Base; typedef BandMatrix<Scalar,Size,Size,Options&SelfAdjoint?0:1,1,Options|RowMajor> Base;
typedef typename Base::Index Index; typedef typename Base::StorageIndex StorageIndex;
public: public:
TridiagonalMatrix(Index size = Size) : Base(size,size,Options&SelfAdjoint?0:1,1) {} explicit TridiagonalMatrix(Index size = Size) : Base(size,size,Options&SelfAdjoint?0:1,1) {}
inline typename Base::template DiagonalIntReturnType<1>::Type super() inline typename Base::template DiagonalIntReturnType<1>::Type super()
{ return Base::template diagonal<1>(); } { return Base::template diagonal<1>(); }
...@@ -327,6 +327,25 @@ class TridiagonalMatrix : public BandMatrix<Scalar,Size,Size,Options&SelfAdjoint ...@@ -327,6 +327,25 @@ class TridiagonalMatrix : public BandMatrix<Scalar,Size,Size,Options&SelfAdjoint
protected: protected:
}; };
struct BandShape {};
template<typename _Scalar, int _Rows, int _Cols, int _Supers, int _Subs, int _Options>
struct evaluator_traits<BandMatrix<_Scalar,_Rows,_Cols,_Supers,_Subs,_Options> >
: public evaluator_traits_base<BandMatrix<_Scalar,_Rows,_Cols,_Supers,_Subs,_Options> >
{
typedef BandShape Shape;
};
template<typename _CoefficientsType,int _Rows, int _Cols, int _Supers, int _Subs,int _Options>
struct evaluator_traits<BandMatrixWrapper<_CoefficientsType,_Rows,_Cols,_Supers,_Subs,_Options> >
: public evaluator_traits_base<BandMatrixWrapper<_CoefficientsType,_Rows,_Cols,_Supers,_Subs,_Options> >
{
typedef BandShape Shape;
};
template<> struct AssignmentKind<DenseShape,BandShape> { typedef EigenBase2EigenBase Kind; };
} // end namespace internal } // end namespace internal
} // end namespace Eigen } // end namespace Eigen
......
This diff is collapsed.
FILE(GLOB Eigen_Core_SRCS "*.h")
INSTALL(FILES
${Eigen_Core_SRCS}
DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core COMPONENT Devel
)
ADD_SUBDIRECTORY(products)
ADD_SUBDIRECTORY(util)
ADD_SUBDIRECTORY(arch)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.