diff options
author | Gael Guennebaud <g.gael@free.fr> | 2017-01-06 22:01:53 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2017-01-06 22:01:53 +0100 |
commit | 233dff1b3505dcf0592f11a82ac442b28c577f87 (patch) | |
tree | fa93895d8b5c1aa4a24c7ea7b2d8cfa85b342d5e /Eigen/src/Core/DenseBase.h | |
parent | 76e183bd52b5b008c32c2e07428f9672ab8e1c6f (diff) |
Add support for plain arrays for columns and both rows/columns
Diffstat (limited to 'Eigen/src/Core/DenseBase.h')
-rw-r--r-- | Eigen/src/Core/DenseBase.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/Eigen/src/Core/DenseBase.h b/Eigen/src/Core/DenseBase.h index 13aa3854a..07057ce69 100644 --- a/Eigen/src/Core/DenseBase.h +++ b/Eigen/src/Core/DenseBase.h @@ -569,10 +569,24 @@ template<typename Derived> class DenseBase 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>( + return IndexedView<const Derived,const RowIndicesT (&)[RowIndicesN],typename internal::MakeIndexing<ColIndices>::type>( derived(), rowIndices, internal::make_indexing(colIndices,derived().cols())); } + template<typename RowIndices, typename ColIndicesT, std::size_t ColIndicesN> + IndexedView<const Derived,typename internal::MakeIndexing<RowIndices>::type, const ColIndicesT (&)[ColIndicesN]> + operator()(const RowIndices& rowIndices, const ColIndicesT (&colIndices)[ColIndicesN]) const { + return IndexedView<const Derived,typename internal::MakeIndexing<RowIndices>::type,const ColIndicesT (&)[ColIndicesN]>( + derived(), internal::make_indexing(rowIndices,derived().rows()), colIndices); + } + + template<typename RowIndicesT, std::size_t RowIndicesN, typename ColIndicesT, std::size_t ColIndicesN> + IndexedView<const Derived,const RowIndicesT (&)[RowIndicesN], const ColIndicesT (&)[ColIndicesN]> + operator()(const RowIndicesT (&rowIndices)[RowIndicesN], const ColIndicesT (&colIndices)[ColIndicesN]) const { + return IndexedView<const Derived,const RowIndicesT (&)[RowIndicesN],const ColIndicesT (&)[ColIndicesN]>( + derived(), rowIndices, colIndices); + } + #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) |