From 3264d3c761e6b08101e7577b4278119dea42ec09 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Fri, 6 Jan 2017 21:53:32 +0100 Subject: Add support for plain-array as indices, e.g., mat({1,2,3,4}) --- Eigen/src/Core/DenseBase.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Eigen/src/Core/DenseBase.h') 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 class DenseBase derived(), internal::make_indexing(rowIndices,derived().rows()), internal::make_indexing(colIndices,derived().cols())); } + template + IndexedView::type> + operator()(const RowIndicesT (&rowIndices)[RowIndicesN], const ColIndices& colIndices) const { + return IndexedView::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) -- cgit v1.2.3