StaticMatrix comparison operators

bool operator==(StaticMatrix const &that) const

Equality operator.

Parameters:

that – matrix for comparison.

Returns:

true if *this and that are equal and false 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 and that are equal and false if they are not. In particular, if *this has more than one row, then false 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 StaticMatrix() or RowView

Parameters:

that – the matrix or row view for comparison.

Returns:

the negation of operator==(that).

Complexity:

see operator==()

bool operator<(StaticMatrix 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 than that and false if it is not.

Complexity:

At worst \(O(mn)\) where \(m\) is number_of_rows and \(n\) is number_of_cols

bool operator<(RowView const &that) const

Less than operator.

Parameters:

that – the row view for comparison.

Returns:

true if *this is less than that, and false otherwise. In particular, if *this has more than one row, then false is returned.

Complexity:

At worst \(O(n)\) where \(n\) is number_of_cols

bool operator>(StaticMatrix 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 than that and false if it is not.

Complexity:

At worst \(O(mn)\) where \(m\) is number_of_rows and \(m\) is number_of_cols