|
Ublas : |
From: Gunter Winkler (guwi17_at_[hidden])
Date: 2007-01-01 19:09:21
Joseph Turian schrieb:
> Why don't the uBLAS types support operator==?
> Just curious
There is no vector::operator== or matrix::operator==
because the definition of "equal" depends on the user of the library.
However, you can use any norm to check equality:
binary equality: use strlcmp() on x.data() and y.data()
strict equality: norm_inf(x-y) == 0, norm_2(x-y) == 0
equality up to round-up errors: equals(x,y,...),
norm_inf(x-y) < eps * (norm_inf(x) + norm_inf(y)),
norm_1(x-y) < ... and much more.
mfg
Gunter