This page contains details of the function templates for finding the rows of a matrix in the namespace matrix_helper
.
std::vector<typename T::RowView> rows(T const& x)
Returns a vector of row views into all of the rows of the dynamic matrix
x
.
- param x
the matrix.
- returns
A vector of
T::RowView
of sizex.number_of_rows()
.- exceptions
Throws if
T::rows
throws, orstd::bad_alloc
is thrown.- complexity
O(m) where m is the number of rows in the matrix
x
.
Returns a static vector of row views into all of the rows of the static matrix
x
. Static vectors have the same interface asstd::vector
but their capacity is defined at compile time.
- param x
the matrix
- returns
A static vector of
T::RowView
of sizex.number_of_rows()
.- exceptions
Throws if
T::rows
throws, orstd::bad_alloc
is thrown.- complexity
O(m) where m is the number of rows in the matrix
x
.