Add support for plain-array as indices, e.g., mat({1,2,3,4})

This commit is contained in:
Gael Guennebaud
2017-01-06 21:53:32 +01:00
parent a875167d99
commit 3264d3c761
4 changed files with 23 additions and 2 deletions

View File

@@ -70,8 +70,8 @@ public:
IndexedView(XprType& xpr, const T0& rowIndices, const T1& colIndices)
: m_xpr(xpr), m_rowIndices(rowIndices), m_colIndices(colIndices)
{}
Index rows() const { return m_rowIndices.size(); }
Index cols() const { return m_colIndices.size(); }
Index rows() const { return internal::size(m_rowIndices); }
Index cols() const { return internal::size(m_colIndices); }
/** \returns the nested expression */
const typename internal::remove_all<XprType>::type&