LongDouble_t matrix

Hi,

For my calculation, I need matrix with a long double precision.
I need to extract Eigen vectors and Eigen values.

Is it possible ?

Best,
Quentin

Hi,

If you are using Matrix the contained type is a template parameter. you can use it then for an extended double precision.
Also Matrix is defined as a template class, so it might work for another type.
However, you might need to explicit instantiate the new type in the library otherwise you might have linking problems.

Best Regards

Lorenzo

Hi Lorenzo,

This is what I tried and I get a lot of troubles.
My first attempt was to recreate a new TMatrixT type as:

template<class Element> class TMatrixT;
typedef TMatrixT<LongDouble_t> TMatrixLD;


template<class Element> class TMatrixTRow_const;
template<class Element> class TMatrixTColumn_const;
template<class Element> class TMatrixTDiag_const;
template<class Element> class TMatrixTFlat_const;
template<class Element> class TMatrixTSub_const;
template<class Element> class TMatrixTSparseRow_const;
template<class Element> class TMatrixTSparseDiag_const;

template<class Element> class TMatrixTRow;
template<class Element> class TMatrixTColumn;
template<class Element> class TMatrixTDiag;
template<class Element> class TMatrixTFlat;
template<class Element> class TMatrixTSub;
template<class Element> class TMatrixTSparseRow;
template<class Element> class TMatrixTSparseDiag;

template<class Element> class TElementActionT;
template<class Element> class TElementPosActionT;

typedef TMatrixTRow_const       <LongDouble_t> TMatrixLDRow_const;
typedef TMatrixTColumn_const    <LongDouble_t> TMatrixLDColumn_const;
typedef TMatrixTDiag_const      <LongDouble_t> TMatrixLDDiag_const;
typedef TMatrixTFlat_const      <LongDouble_t> TMatrixLDFlat_const;
typedef TMatrixTSub_const       <LongDouble_t> TMatrixLDSub_const;
typedef TMatrixTSparseRow_const <LongDouble_t> TMatrixLDSparseRow_const;
typedef TMatrixTSparseDiag_const<LongDouble_t> TMatrixLDSparseDiag_const;

typedef TMatrixTRow             <LongDouble_t> TMatrixLDRow;
typedef TMatrixTColumn          <LongDouble_t> TMatrixLDColumn;
typedef TMatrixTDiag            <LongDouble_t> TMatrixLDDiag;
typedef TMatrixTFlat            <LongDouble_t> TMatrixLDFlat;
typedef TMatrixTSub             <LongDouble_t> TMatrixLDSub;
typedef TMatrixTSparseRow       <LongDouble_t> TMatrixLDSparseRow;
typedef TMatrixTSparseDiag      <LongDouble_t> TMatrixLDSparseDiag;

typedef TElementActionT         <LongDouble_t> TElementActionLD;
typedef TElementPosActionT      <LongDouble_t> TElementPosActionLD;

But It crash when I tried to build it directly in cint.
Then I tried to hack root and to add it in the matrix folder by copying everything form TMAtrixD.
Here there is an other issue that is related to the TBuffer class.

Do you thin that this is feasible to overpass this issue ?

Quentin

Hi,
You might need to generate the dictionaries for the new type by adding the corresponding entries in the
math/matrix/inc/LinkDef.h file.

But which version of ROOT are you using ? If you are still using ROOT 5.34 based on CIT, it might be a slightly more complicated

Lorenzo

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.