Re: [Mathlib-develop] Change to MathLibObject/VariableList implementation
Status: Beta
Brought to you by:
st_mueller
From: mark <msp...@ya...> - 2003-07-25 20:20:50
|
On Wednesday 23 Jul 2003 7:46 pm, Stefan Mueller wrote: > HI Mark, > I aggree. Please go ahead. > Stefan. > > mark wrote: > > Hi, > > > > Both the MathLibObject and the VariableList classes implement lists o= f > > named variables. They are both implemented using ArrayLists. > > > > This is ineficient since when finding a variable by name it is necess= ary > > to iterate through the list until we find the correct variable. > > > > I think that it would be better to implement these classes using a > > HashMap since it would speed up variable access and is a better fit t= o > > the problem. > > > > The only downside I can see is that the code needed to iterate throug= h a > > hashes key/value pairs is, to put it politely, suboptimal. > > > > What I will most likely do is work on this in a local copy of the cod= e > > and only commit it if there aren't any problems. > > > > Any comments? > > Okay I've changed the MathLibObject and VariableList to use a hash and=20 committed them. You'll probably need to do an ant clean before rebuildin= g. Best regards Mark Sparshatt =20 |