Boost logo

Glas :

Re: [glas] norms etc

From: Neal Becker (ndbecker2_at_[hidden])
Date: 2005-10-13 06:02:33


On Thursday 13 October 2005 2:59 am, Karl Meerbergen wrote:
> 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().
>

I have some iterator adapters for complex types based on boost iterator
adapter. I am including them here in case they may be useful.