Class Matrix::MatrixRow

Nested Relationships

This class is a nested type of Class Matrix.

Class Documentation

class MatrixRow

Public Functions

explicit MatrixRow(int n)

Constructs a new matrix row of the given size

MatrixRow(std::initializer_list<double> rowData)

Constructs a new matrix row with the given data

explicit MatrixRow(std::vector<double> rowData)

Constructs a new matrix row with the given data

MatrixRow(const MatrixRow &other)

Constructs a new matrix row that is a copy of the given row

double &operator[](int i)

Operator to get a reference to the element at the specified index

Throws

std::invalid_argument – if the index does not exist

const double &operator[](int i) const

Operator to get a const reference to the element at the specified index

Throws

std::invalid_argument – if the index does not exist

int size() const

Returns the number of elements in the matrix row

Vector getVector()

Returns the row as a Vector