Skip to content

Latest commit

 

History

History
52 lines (33 loc) · 1.71 KB

rows.rst

File metadata and controls

52 lines (33 loc) · 1.71 KB

rows

This page contains details of the function templates for finding the rows of a matrix in the namespace matrix_helper.

For dynamic matrices

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 size x.number_of_rows().

exceptions

Throws if T::rows throws, or std::bad_alloc is thrown.

complexity

O(m) where m is the number of rows in the matrix x.

For static matrices

Returns a static vector of row views into all of the rows of the static matrix x. Static vectors have the same interface as std::vector but their capacity is defined at compile time.

param x

the matrix

returns

A static vector of T::RowView of size x.number_of_rows().

exceptions

Throws if T::rows throws, or std::bad_alloc is thrown.

complexity

O(m) where m is the number of rows in the matrix x.