Returns a matrix representation of the vector in column-major order with the specified number of rows and columns.
- Template Parameters
-
| T | type of elements in the vector |
- Parameters
-
| x | vector of values |
| m | rows |
| n | columns |
| col_major | column-major indicator: if 1, output matrix is transversed in column-major order, if 0, output matrix is transversed in row-major order, otherwise function throws std::invalid_argument |
- Returns
- the matrix representation of the input
- Exceptions
-
| <code>std::invalid_argument</code> | if the sizes do not match |
Definition at line 197 of file to_matrix.hpp.