aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/DenseBase.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2017-01-06 00:01:44 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2017-01-06 00:01:44 +0100
commitac7e4ac9c071ee879e9da278a9a2cf6cef82f053 (patch)
treedd1f97f89f229cf650445d6d465567d00e11b713 /Eigen/src/Core/DenseBase.h
parentf3f026c9aacfc3ad28c54b4f5287b7b58e62d8ac (diff)
Initial commit to add a generic indexed-based view of matrices.
This version already works as a read-only expression. Numerous refactoring, renaming, extension, tuning passes are expected...
Diffstat (limited to 'Eigen/src/Core/DenseBase.h')
-rw-r--r--Eigen/src/Core/DenseBase.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/Eigen/src/Core/DenseBase.h b/Eigen/src/Core/DenseBase.h
index 9f3c7c8a9..f8a6b2625 100644
--- a/Eigen/src/Core/DenseBase.h
+++ b/Eigen/src/Core/DenseBase.h
@@ -557,6 +557,15 @@ template<typename Derived> class DenseBase
}
EIGEN_DEVICE_FUNC void reverseInPlace();
+ template<typename RowIndices, typename ColIndices>
+ typename internal::enable_if<
+ !(internal::is_integral<RowIndices>::value && internal::is_integral<ColIndices>::value),
+ IndexedView<const Derived,typename internal::MakeIndexing<RowIndices>::type,typename internal::MakeIndexing<ColIndices>::type> >::type
+ operator()(const RowIndices& rowIndices, const ColIndices& colIndices) const {
+ return IndexedView<const Derived,typename internal::MakeIndexing<RowIndices>::type,typename internal::MakeIndexing<ColIndices>::type>(
+ derived(), internal::make_indexing(rowIndices,derived().rows()), internal::make_indexing(colIndices,derived().cols()));
+ }
+
#define EIGEN_CURRENT_STORAGE_BASE_CLASS Eigen::DenseBase
#define EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
#define EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(COND)