Bug#44807: Hayes randomize mode unusable
Neil Stevens
neil at qualityassistant.com
Sun Jul 7 01:51:56 BST 2002
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Saturday July 06, 2002 03:47, Carsten Pfeiffer wrote:
> On Saturday 06 July 2002 22:16, Neil Stevens wrote:
> > Well, as it turns out, it's hard to get a well-distributed shuffle
> > mode when you have a policy of not opening directories in the
> > KFileTreeView unless absolutely necessary.
>
> I see -- you don't know the entire domain before.
>
> What do you think of this idea:
>
> You start with reading the toplevel directory, so you know its contents
> (files and directories). Every file gets a weight of 1, every directory
> a weight of say 50 (just a guessed number).
>
> Now you choose a random file in the toplevel hierarchy. Directories will
> have a higher probability to get hit, due to their bigger weight. As
> soon as a directory is chosen, you read its contents, and adjust its
> weight accordingly (sum of the weight of all its files + its
> directories).
>
> Repeat this until you have chosen a file.
Heh.. you just rewrote exactly my idea that I plan to implement, almost
word for word how I described it. :-)
The biggest reason Hayes hasn't had it done already is that Hayes' position
in the release was uncertain.. I was waiting on it moving to nonbeta or
extragear or addons or something.
thanks!
- --
Neil Stevens - neil at qualityassistant.com
"I always cheer up immensely if an attack is particularly wounding
because I think, well, if they attack one personally, it means they
have not a single political argument left." - Margaret Thatcher
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE9J5Csf7mnligQOmERAnleAKCYclwnCzyZ9MSS5s/Sg0nHS06VQwCcCZGW
SKM827PEXYvM9gN3PNOhYWQ=
=VnuO
-----END PGP SIGNATURE-----
(Complete bug history is available at http://bugs.kde.org/db/44/44807.html)
More information about the kde-multimedia
mailing list