Re: [eigen] Re: Missing methods on complex Matrix/Vector/Array

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi,

- conj() already exists.

- regarding norm(), it would be too confusing to support it,
especially the way the std defines it, i.e., as the coefficient-wise
Euclidean squared norm. We have array.abs2() for that.

- ok to add the others. For each of them, the different steps are:

1 - implement the respective functor in src/Core/Functors.h (for
instance search for _cos_ for a model)
2 - add the ArrayBase member in src/plugins/ArrayCwiseUnaryOps.h
(again search for cos() for a model)
3 - add the respective free-function in src/Core/GlobalFunctions.h
4 - add respective unit tests in test/array.cpp

once you're happy you can submit a patch there:
http://eigen.tuxfamily.org/bz/show_bug.cgi?id=100

thanks for looking at this,
gael

On Thu, Jun 20, 2013 at 3:18 AM, Dale Lukas Peterson
<hazelnusse@xxxxxxxxx> wrote:
> On Wed, Jun 19, 2013 at 5:45 PM, Dale Lukas Peterson
> <hazelnusse@xxxxxxxxx> wrote:
>> I was trying to take the argument of an Array of complex<double>
>> types, but found that this method is not available, even though ones
>> like real(), imag(), abs() are.  Is there a design reason for this, or
>> does it simply just need some development time to make it happen?
>>
>> If there isn't a reason other than it just hasn't been implemented, I
>> can try to work on this.
>>
>> Luke
>
> It seems that the following functions that are overload for
> std::complex types from the STL are not available as methods of Array:
> arg()
> norm()
> conj()
> polar()
> cosh()
> log10()
> sinh()
> tanh()
>
> Also, when Array is real, the pow() method does not work for complex
> powers, even though that functionality is provided by std::pow();
>
> Luke
>
>



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/