Re: TMatrix as vector

From: Victor Perevoztchikov (perev@bnl.gov)
Date: Mon Mar 06 2000 - 19:21:40 MET


Hi Eddi,

> Hi Victor,
> In your answer you mention dealing with sparse matrices.
> Is there in the current TMatrix support for that ?

No, not yet. I was talking about possible future.

Victor

Eddy Offermann wrote:
> 
> ------------- Begin Forwarded Message -------------
> 
> Hi Victor,
> In your answer you mention dealing with sparse matrices.
> Is there in the current TMatrix support for that ?
> 
> Eddy
> 
> Hi Nicolas,
> 
> > I dont think that providing overloading of
> > Double_t& operator[](Int_t i)
> > and
> > Double_t operator[](Int_t i) const
> 
> yes, you are right. I have misunderstand you.
> I thought that you want pointer to array.
> But functions above do not violate encapsulation.
> There could be some complications for sparced matricies,
> number of words is less than N*M , but it is solvable.
> 
> Victor
> 
> Nicolas Produit wrote:
> >
> > Hi Victor,
> >
> > > to provide such method you will broke encapsulation. Your code
> > > must not be dependent of matrix implementation inside a class.
> > > Let say, TMatrix will be improved and sparce matrices will be
> > > added.
> > > Then your method becomes unavailable, what leads to vialation
> > > of encapsulation.
> >
> > I dont think that providing overloading of
> > Double_t& operator[](Int_t i)
> > and
> > Double_t operator[](Int_t i) const
> >
> > on TMatrix to fetch or store a value in a 2 D matrix
> > at place (i/fCols,i%fCols)
> > would break encapsulation.
> >
> > I agree that method GetfElement is, it is why I prefer [].
> >
> > For Eddy,
> >
> > thanks a lot for the suggestion. But I think your suggestion
> > is actually a fancy way of doing a copy to TArray, I would rather
> > have a solution not involving copying.
> > Anyway I can perhaps use your trick in some case.
> >
> > --
> > Nicolas Produit
> > INTEGRAL Science Data Center    Phone:  +41 22 950 91 40
> > 16, Chemin d'Ecogia             Fax:    +41 22 950 91 33
> > CH-1290 Versoix                 www:    http://isdc.unige.ch/
> 
> --
> Victor M. Perevoztchikov   perev@bnl.gov  perev@vxcern.cern.ch
> Brookhaven National Laboratory MS 510A PO Box 5000 Upton NY 11973-5000
> tel office : 631-344-7894; fax 631-344-4206; home 631-345-2690
> 
> ------------- End Forwarded Message -------------
> 
> Eddy A.J.M. Offermann
> Renaissance Technologies Corp.
> 25 East Loop Rd.
> Suite 211
> Stony Brook, NY 11790
> e-mail: eddy@rentec.com
> phone: (516)246-5550
> fax: (516)246-5761

-- 
Victor M. Perevoztchikov   perev@bnl.gov  perev@vxcern.cern.ch       
Brookhaven National Laboratory MS 510A PO Box 5000 Upton NY 11973-5000
tel office : 631-344-7894; fax 631-344-4206; home 631-345-2690



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:21 MET