aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/DenseBase.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2017-01-06 21:53:32 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2017-01-06 21:53:32 +0100
commit3264d3c761e6b08101e7577b4278119dea42ec09 (patch)
treec3ccee6cab6e28143dd61e5b0661d1580c2d0557 /Eigen/src/Core/DenseBase.h
parenta875167d99cffa76a662de5475627d60238f0f36 (diff)
Add support for plain-array as indices, e.g., mat({1,2,3,4})
Diffstat (limited to 'Eigen/src/Core/DenseBase.h')
-rw-r--r--Eigen/src/Core/DenseBase.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/Eigen/src/Core/DenseBase.h b/Eigen/src/Core/DenseBase.h
index f8a6b2625..13aa3854a 100644
--- a/Eigen/src/Core/DenseBase.h
+++ b/Eigen/src/Core/DenseBase.h
@@ -566,6 +566,13 @@ template<typename Derived> class DenseBase
derived(), internal::make_indexing(rowIndices,derived().rows()), internal::make_indexing(colIndices,derived().cols()));
}
+ template<typename RowIndicesT, std::size_t RowIndicesN, typename ColIndices>
+ IndexedView<const Derived,const RowIndicesT (&)[RowIndicesN],typename internal::MakeIndexing<ColIndices>::type>
+ operator()(const RowIndicesT (&rowIndices)[RowIndicesN], const ColIndices& colIndices) const {
+ return IndexedView<const Derived,const RowIndicesT (&) [RowIndicesN],typename internal::MakeIndexing<ColIndices>::type>(
+ derived(), rowIndices, 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)