Boost logo

Ublas :

From: Gunter Winkler (guwi17_at_[hidden])
Date: 2005-05-03 05:29:20

On Tuesday 03 May 2005 11:22, Max Weinberg wrote:
> Well, I don't care if it's called operator==, but there definitely should
> be a way to compare matrices. Call it equal if you like and give it a
> functor parameter that handles the element comparison.

Can you give an example, in which situation you check the equality of two
matrices? I never needed it in my codes.

BTW: Using norm_1(A-B) or norm_inf(A-B) is a O(n*m) or O(nnz) operation. Doing
a elementwise comparison (optionally with short circuit) is O(n*m) or O(nnz),
too. So there is no difference regarding the algorithmic complexity.