A note in the docs seems like a reasonable solution, although I'm not sure 
I agree that it's a completely transparent design decision. I've always 
seen the real Schur form presented as an (important) computational trick to 
avoid complex arithmetic, while the complex form is the mental model. I 
have a feeling that many users may have never seen the real form before (as 
a dumb little metric, neither Wikipedia nor Mathworld seem to mention it). 
To bikeshed for a minute, calling an explicit conversion seems a little 
bolted on for getting a complex Schur decomposition from a real matrix, 
which seems like a common use case (at least for the MATLAB-style homework 
questions like the one I was working on a few hours ago...). Just my two 
cents.

On Thursday, April 17, 2014 1:15:10 AM UTC-4, Andreas Noack Jensen wrote:
>
> I prefer the present solution where we use dispatch instead of keywords. I 
> think it is transparent what is happening: real matrix -> real schur form, 
> complex matrix -> complex schur form. However, we could add a line in the 
> documentation explaining it. If you are okay with that idea, please open a 
> pr. 
>
>
> 2014-04-17 6:58 GMT+02:00 Joey Huchette <joehu...@gmail.com <javascript:>>
> :
>
>> Ahh simple enough, thanks. It might be nice to have a keyword argument 
>> that just dispatches on this---it's not completely obvious that's the right 
>> thing to do unless you dig around lapack.jl (or get a hint). I can PR.
>>
>>
>> On Thursday, April 17, 2014 12:18:00 AM UTC-4, Andreas Noack Jensen wrote:
>>
>>> The trick is to convert your matrix to complex before the calculation.
>>>
>>> schurfact(complex(A))[:T]
>>>
>>> gives the triangular part.
>>>
>>>
>>> 2014-04-17 1:18 GMT+02:00 Joey Huchette <joehu...@gmail.com>:
>>>
>>> Is there an implementation in Base (or elsewhere) of a Schur 
>>>> decomposition that returns a complex matrix matrix T that is triangular? 
>>>> For reference, MATLAB has a optional switch between the two forms. I 
>>>> didn't 
>>>> do enough digging to see if this option is exposed by Lapack, so maybe the 
>>>> conversion could be done at the Julia level? Apologies if I overlooked it 
>>>> in the docs/source.
>>>>
>>>
>>>
>>>
>>> -- 
>>> Med venlig hilsen
>>>
>>> Andreas Noack Jensen
>>>  
>>
>
>
> -- 
> Med venlig hilsen
>
> Andreas Noack Jensen
>  

Reply via email to