Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Bisect module
mepython
2/26/2005 5:50:00 PM
Python has bisect module: This module provides support for maintaining
a list in sorted order without having to sort the list after each
insertion
http://python.active-venture.com/lib/module-b...
How to do this in Ruby?
2 Answers
Robert Klemme
2/28/2005 10:43:00 AM
0
"mepython" <a@agni.us> schrieb im Newsbeitrag
news:1109440208.140811.108860@l41g2000cwc.googlegroups.com...
> Python has bisect module: This module provides support for maintaining
> a list in sorted order without having to sort the list after each
> insertion
>
>
http://python.active-venture.com/lib/module-b...
>
> How to do this in Ruby?
Either look in the RAA - I'm pretty sure someone created such a thing
already. Or implement an ordered tree or subclass of array yourself.
Kind regards
robert
mepython
3/1/2005 8:02:00 PM
0
In RAA, I found rbtree which has ordered hash class (RBTree) and a
class for duplicate keys (MultiRBTree). So instead of using Ordered
List, I am using Ordered Hash with duplicate keys. Thank you.
Robert Klemme wrote:
> "mepython" <a@agni.us> schrieb im Newsbeitrag
> news:1109440208.140811.108860@l41g2000cwc.googlegroups.com...
> > Python has bisect module: This module provides support for
maintaining
> > a list in sorted order without having to sort the list after each
> > insertion
> >
> >
http://python.active-venture.com/lib/module-b...
> >
> > How to do this in Ruby?
>
> Either look in the RAA - I'm pretty sure someone created such a thing
> already. Or implement an ordered tree or subclass of array yourself.
>
> Kind regards
>
> robert
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Bisect module
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password