DynamicMatrix comparison operators¶
-
bool operator==(DynamicMatrix const &that) const¶
Equality operator.
- Parameters:
that – matrix for comparison.
- Returns:
trueif*thisandthatare equal andfalseif they are not.- Complexity:
At worst \(O(mn)\) where \(m\) is the number of rows and \(n\) is the number of columns of the matrix.
-
bool operator==(RowView const &that) const¶
Equality operator.
- Parameters:
that – the row view for comparison.
- Returns:
trueif*thisandthatare equal andfalseif they are not. In particular, if*thishas more than one row, thenfalseis returned.- Complexity:
At worst \(O(n)\) where \(n\) is the number of columns of the matrix.
-
template<typename T>
bool operator!=(T const &that) const¶ Inequality operator.
- Template Parameters:
T – either
DynamicMatrix()orDynamicMatrix::RowView- Parameters:
that – the matrix or row view for comparison.
- Returns:
the negation of
operator==(that).- Complexity:
see
DynamicMatrix::operator==
-
bool operator<(DynamicMatrix const &that) const¶
Less than operator.
This operator defines a total order on the set of matrices of the same type, the details of which is implementation specific.
- Parameters:
that – the matrix for comparison.
- Returns:
trueif*thisis less thanthatandfalseif it is not.- Complexity:
At worst \(O(mn)\) where \(m\) is
DynamicMatrix::number_of_rowsand \(n\) isDynamicMatrix::number_of_cols
-
bool operator<(RowView const &that) const¶
Less than operator.
- Parameters:
that – the row view for comparison.
- Returns:
trueif*thisis less thanthat, andfalseotherwise. In particular, if*thishas more than one row, thenfalseis returned.- Complexity:
At worst \(O(n)\) where \(n\) is
DynamicMatrix::number_of_cols
-
bool operator>(DynamicMatrix const &that) const¶
Greater than operator.
This operator defines a total order on the set of matrices of the same type, the details of which is implementation specific.
- Parameters:
that – the matrix for comparison.
- Returns:
trueif*thisis less thanthatandfalseif it is not.- Complexity:
At worst \(O(mn)\) where \(m\) is
DynamicMatrix::number_of_rowsand \(m\) isDynamicMatrix::number_of_cols