Boost logo

Glas :

[glas] norms etc

From: Karl Meerbergen (Karl.Meerbergen_at_[hidden])
Date: 2005-10-13 01:59:51


Hi,

We currently have norm_2(), norm_1() and norm_inf()
and the alternatives abs_sum() (sum of absolute values of the real and
imaginary parts) and abs_max() (max of absolute values of real and imaginary
parts).

The latter could in fact be computed by interpreting a complex collection as a
real one of double size. (And similarly a quaternion). So I wonder whether we
need abs_sum() and abs_max().
Would it not be better to have an adaptor interpret_as_real(v)?
norm_1(interpret_as_real(v)) is then the same as abs_sum().

Anyway, it could just be the way to implement them: the functions abs_sum()
and abs_max() can stay.

Have a nice day,

Karl