numeric_matrix
Defined in header: <ixion/matrix.hpp>
-
class numeric_matrix
2-dimensional matrix whose elements are all numeric, stored in column-major order.
Public Functions
-
numeric_matrix()
Construct an empty matrix with no rows and no columns.
-
numeric_matrix(size_t rows, size_t cols)
Construct a matrix of the given size, with all elements set to 0.
-
numeric_matrix(std::vector<double> array, size_t rows, size_t cols)
Constructor with initial values.
- Parameters:
array – Array of initial values stored in column-major order.
rows – Number of rows.
cols – Number of columns.
-
numeric_matrix(numeric_matrix &&r)
Move constructor.
-
~numeric_matrix()
-
numeric_matrix &operator=(numeric_matrix other)
Assignment.
-
double &operator()(size_t row, size_t col)
Access an element. The position is not range-checked.
- Parameters:
row – Row position of the element.
col – Column position of the element.
- Returns:
Reference to the element.
-
const double &operator()(size_t row, size_t col) const
Access an element. The position is not range-checked.
- Parameters:
row – Row position of the element.
col – Column position of the element.
- Returns:
Reference to the element.
-
void swap(numeric_matrix &r)
Swap the content with another matrix.
-
size_t row_size() const
Get the number of rows.
-
size_t col_size() const
Get the number of columns.
-
numeric_matrix()