Lightweight owned column-major matrix. More...
#include <core.hpp>
Public Member Functions | |
| Matrix ()=default | |
| Matrix (std::size_t rows, std::size_t cols) | |
| Matrix (std::size_t rows, std::size_t cols, std::vector< double > data) | |
| std::size_t | rows () const noexcept |
| std::size_t | cols () const noexcept |
| std::size_t | size () const noexcept |
| bool | empty () const noexcept |
| double * | data () noexcept |
| const double * | data () const noexcept |
| std::vector< double > & | values () noexcept |
| const std::vector< double > & | values () const noexcept |
| MatrixView | view () const noexcept |
| double & | operator() (std::size_t row, std::size_t col) noexcept |
| double | operator() (std::size_t row, std::size_t col) const noexcept |
Static Public Member Functions | |
| static Matrix | from_rows (std::initializer_list< std::initializer_list< double > > rows) |
| Build a matrix from row-major initializer-list notation. | |
| static Matrix | from_columns (std::initializer_list< std::initializer_list< double > > columns) |
| Build a matrix from column-major initializer-list notation. | |
Lightweight owned column-major matrix.
This type is intentionally just storage plus shape. It does not implement linear algebra. The data layout is always column-major and matches nalgebra: matrix(row, col) is stored at row + col * rows().
Eigen integration lives in copp/eigen.hpp as adapters over this storage rather than changing the core return type. This keeps the core API usable without Eigen while still making Eigen views cheap for common users.
|
default |
|
inline |
|
inline |
|
inlinestatic |
Build a matrix from row-major initializer-list notation.
| rows | Outer list of matrix rows. Every row must have the same number of columns. |
| copp::Error | if input is empty or not rectangular. |
|
inlinestatic |
Build a matrix from column-major initializer-list notation.
This is convenient for waypoint paths because COPP represents waypoint matrices as (dim x n_points), where each column is one waypoint:
| columns | Outer list of waypoint columns. Every column must have the same dimension. |
| copp::Error | if input is empty or not rectangular. |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |