MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

is there really no efficient way to delete an element from a list??

  • To: mathgroup at smc.vnet.net
  • Subject: [mg23925] is there really no efficient way to delete an element from a list??
  • From: Martin Bauer <b at hcii.de>
  • Date: Fri, 16 Jun 2000 00:57:04 -0400 (EDT)
  • Organization: Technische Universitaet Muenchen, Germany
  • Sender: owner-wri-mathgroup at wolfram.com

hi, i tried to implement a queue with mathematica;
is it possible that there is no O(1) way to get
queue = Rest[queue]  ??

it seems that mathematica uses call by value instead of call by reference
here;
i know that there are PrependTo[] and ApendTo[] for building the list; is
there any equivalent to these functions to remove elements?

or is there another way to implement a stack or queue with constant time
access?


--martin.


----------------------------------------------------------------------------
Martin Bauer                          email:  martin.bauer at in.tum.de
Department of Computer Science          www:  http://www.in.tum.de/~bauerma
Technische Universitat Munchen          tel:  +49-89-289-25724
D-80290 Munchen, Germany               room:  3202  main bldg, Arcisstr.21
----------------------------------------------------------------------------




  • Prev by Date: Re: JLink
  • Next by Date: bug in JacobiAmplitude numerics?
  • Previous by thread: Re: problems saving and opening notebooks using menus
  • Next by thread: Re: is there really no efficient way to delete an element from a list??