Re: Matrixes with complex numbers

From: Mario Kadastik <mario.kadastik_at_cern.ch>
Date: Tue, 27 Feb 2007 19:06:22 +0200


I have to admit that I'm not that great with understanding the workings of CINT, dictionaries etc. Could you provide a simple example which creates the TMatrixT<TComplex> class and an example how to run it (I assume some prelinking will be needed or similar to get the new definitions in).

Mario

On Feb 27, 2007, at 6:57 PM, Edmond Offermann wrote:

> Hi,
>
> I had some emails to Mario only (unfortunately) . Here are the
> responses:
>
> Eddy->Mario:
> -----------
>
> Have a look at matrix/inc/TMatrixDfwd.h and you will see that
> TMatrixD
> is just a typedef of the templated clas TMatrixT:
>
> template<class Element> class TMatrixT;
> typedef TMatrixT<Double_t> TMatrixD;
>
> So for complex matrices one could try
>
> typedef TMatrixT<TComplex> TMatrixC
>
> Mario->Eddy:
> ------------
>
> root [0] typedef TMatrixT<TComplex> TMatrixC
> Limitation: Can't instantiate precompiled template
> TMatrixT<TComplex>
>
> (tmpfile):1:
> *** Interpreter error recovered ***
>
> any more ideas?
>
> Eddy->Mario:
> ------------
>
> You have an issue here with CINT .
> Have a look at matrix/inc/LinkDef.h and see what has to be done to
> have CINT understand this new type . For instance for TMatrixD you
> will find lines like :
>
> #pragma link C++ class TMatrixT <Double_t>-;
> #pragma link C++ typedef TMatrixD;
>
>
>
> --- Rene Brun <Rene.Brun_at_cern.ch> wrote:
>
>> Hi Mario,
>>
>> None of the matrix classes in ROOT can be used with complex numbers.
>> This could, in theory, be implemented withing TMatrix (already
>> templated).
>> However, the support for operations (of course what you want) would
>> require a bit more work.
>> May be, Eddy wants to add something to my mail ?
>>
>> Rene Brun
>>
>>
>> Mario Kadastik wrote:
>>> Hello,
>>>
>>> I have tried searching for a way to have matrices with complex
>> numbers
>>> in them and still have the functionality of matrices and have
>> turned
>>> up with a number of questions on the web however basically no
>> answers.
>>> Is there a way to use complex numbers in ROOT in matrices (there's
>> the
>>> complex class which enables one to have complex numbers and do
>>> operations on them, but there seems not to be a way to have a
>> matrix
>>> with complex numbers in it). I have used until now TMatrixD for
>>> matrices with doubles in them, but how do I extend that to include
>>> complex numbers?
>>>
>>> Mario
>>
>>
>
Received on Tue Feb 27 2007 - 18:03:05 CET

This archive was generated by hypermail 2.2.0 : Tue Feb 27 2007 - 23:50:01 CET