DynamicMatrix comparison operators¶

bool operator==(DynamicMatrix const &that) const¶
Equality operator.
 Parameters
that – matrix for comparison.
 Returns
true
if*this
andthat
are equal andfalse
if 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
true
if*this
andthat
are equal andfalse
if they are not. In particular, if*this
has more than one row, thenfalse
is 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()
orRowView
 Parameters
that – the matrix or row view for comparison.
 Returns
the negation of
operator==(that)
. Complexity
see
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
true
if*this
is less thanthat
andfalse
if it is not. Complexity
At worst \(O(mn)\) where \(m\) is
number_of_rows()
and \(n\) isnumber_of_cols()

bool operator<(RowView const &that) const¶
Less than operator.
 Parameters
that – the row view for comparison.
 Returns
true
if*this
is less thanthat
, andfalse
otherwise. In particular, if*this
has more than one row, thenfalse
is returned. Complexity
At worst \(O(n)\) where \(n\) is
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
true
if*this
is less thanthat
andfalse
if it is not. Complexity
At worst \(O(mn)\) where \(m\) is
number_of_rows()
and \(m\) isnumber_of_cols()