aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/SparseCore/SparseMatrixBase.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2012-11-16 09:02:50 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2012-11-16 09:02:50 +0100
commit4e60283289c75f34ea12df14e781399ce733d7d5 (patch)
tree329279e0baddd8f2f1ef056fed9b8c112ca0c4fd /Eigen/src/SparseCore/SparseMatrixBase.h
parent3dc8f8536a080afb427f137b8598d31605fb3f05 (diff)
Remove Sparse/InnerVectorSet expression in favor of a more general Block<> specialization for Sparse expression.
The specializations for "InnerPanels" are still preserved for efficiency reasons and because they offer additional usefull features.
Diffstat (limited to 'Eigen/src/SparseCore/SparseMatrixBase.h')
-rw-r--r--Eigen/src/SparseCore/SparseMatrixBase.h31
1 files changed, 10 insertions, 21 deletions
diff --git a/Eigen/src/SparseCore/SparseMatrixBase.h b/Eigen/src/SparseCore/SparseMatrixBase.h
index 39332a178..2ef841616 100644
--- a/Eigen/src/SparseCore/SparseMatrixBase.h
+++ b/Eigen/src/SparseCore/SparseMatrixBase.h
@@ -136,13 +136,13 @@ template<typename Derived> class SparseMatrixBase : public EigenBase<Derived>
# include "../plugins/CommonCwiseBinaryOps.h"
# include "../plugins/MatrixCwiseUnaryOps.h"
# include "../plugins/MatrixCwiseBinaryOps.h"
+# include "../plugins/BlockMethods.h"
# ifdef EIGEN_SPARSEMATRIXBASE_PLUGIN
# include EIGEN_SPARSEMATRIXBASE_PLUGIN
# endif
# undef EIGEN_CURRENT_STORAGE_BASE_CLASS
#undef EIGEN_CURRENT_STORAGE_BASE_CLASS
-
/** \returns the number of rows. \sa cols() */
inline Index rows() const { return derived().rows(); }
/** \returns the number of columns. \sa rows() */
@@ -392,26 +392,15 @@ template<typename Derived> class SparseMatrixBase : public EigenBase<Derived>
const Transpose<const Derived> transpose() const { return derived(); }
const AdjointReturnType adjoint() const { return transpose(); }
- // sub-vector
- SparseInnerVectorSet<Derived,1> row(Index i);
- const SparseInnerVectorSet<Derived,1> row(Index i) const;
- SparseInnerVectorSet<Derived,1> col(Index j);
- const SparseInnerVectorSet<Derived,1> col(Index j) const;
- SparseInnerVectorSet<Derived,1> innerVector(Index outer);
- const SparseInnerVectorSet<Derived,1> innerVector(Index outer) const;
-
- // set of sub-vectors
- SparseInnerVectorSet<Derived,Dynamic> subrows(Index start, Index size);
- const SparseInnerVectorSet<Derived,Dynamic> subrows(Index start, Index size) const;
- SparseInnerVectorSet<Derived,Dynamic> subcols(Index start, Index size);
- const SparseInnerVectorSet<Derived,Dynamic> subcols(Index start, Index size) const;
-
- SparseInnerVectorSet<Derived,Dynamic> middleRows(Index start, Index size);
- const SparseInnerVectorSet<Derived,Dynamic> middleRows(Index start, Index size) const;
- SparseInnerVectorSet<Derived,Dynamic> middleCols(Index start, Index size);
- const SparseInnerVectorSet<Derived,Dynamic> middleCols(Index start, Index size) const;
- SparseInnerVectorSet<Derived,Dynamic> innerVectors(Index outerStart, Index outerSize);
- const SparseInnerVectorSet<Derived,Dynamic> innerVectors(Index outerStart, Index outerSize) const;
+ // inner-vector
+ typedef Block<Derived,IsRowMajor?1:Dynamic,IsRowMajor?Dynamic:1,true> InnerVectorReturnType;
+ typedef Block<const Derived,IsRowMajor?1:Dynamic,IsRowMajor?Dynamic:1,true> ConstInnerVectorReturnType;
+ InnerVectorReturnType innerVector(Index outer);
+ const ConstInnerVectorReturnType innerVector(Index outer) const;
+
+ // set of inner-vectors
+ Block<Derived,Dynamic,Dynamic,true> innerVectors(Index outerStart, Index outerSize);
+ const Block<const Derived,Dynamic,Dynamic,true> innerVectors(Index outerStart, Index outerSize) const;
/** \internal use operator= */
template<typename DenseDerived>