[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Pspp-cvs] Changes to pspp/src/algorithm.c
From: |
Ben Pfaff |
Subject: |
Re: [Pspp-cvs] Changes to pspp/src/algorithm.c |
Date: |
Mon, 24 Oct 2005 07:21:07 -0700 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) |
John, it looks like you deleted the random_shuffle() function.
Is there a reason for that?
John Darrington <address@hidden> writes:
> Index: pspp/src/algorithm.c
> diff -u pspp/src/algorithm.c:1.16 pspp/src/algorithm.c:1.17
> --- pspp/src/algorithm.c:1.16 Sun Jul 31 05:35:05 2005
> +++ pspp/src/algorithm.c Mon Oct 24 05:41:45 2005
> @@ -307,32 +307,6 @@
> return 1;
> }
>
> -/* A algo_random_func that uses random.h. */
> -unsigned
> -algo_default_random (unsigned max, void *aux UNUSED)
> -{
> - unsigned long r_min = gsl_rng_min (get_rng ());
> - return (gsl_rng_get (get_rng ()) - r_min) % max;
> -}
> -
> -/* Randomly reorders ARRAY, which contains COUNT elements of SIZE
> - bytes each. Uses RANDOM as a source of random data, passing
> - AUX as the auxiliary data. RANDOM may be null to use a
> - default random source. */
> -void
> -random_shuffle (void *array_, size_t count, size_t size,
> - algo_random_func *random, void *aux)
> -{
> - unsigned char *array = array_;
> - int i;
> -
> - if (random == NULL)
> - random = algo_default_random;
> -
> - for (i = 1; i < count; i++)
> - SWAP (array + i * size, array + random (i + 1, aux) * size, size);
> -}
> -
> /* Copies the COUNT elements of SIZE bytes each from ARRAY to
> RESULT, except that elements for which PREDICATE is false are
> not copied. Returns the number of elements copied. AUX is
>
>
> _______________________________________________
> Pspp-cvs mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/pspp-cvs
--
"I don't want to learn the constitution and the declaration of
independence (marvelous poetry though it be) by heart, and worship the
flag and believe that there is a god and the dollar is its prophet."
--Maarten Wiltink in the Monastery
- Re: [Pspp-cvs] Changes to pspp/src/algorithm.c,
Ben Pfaff <=
- Re: [Pspp-cvs] Changes to pspp/src/algorithm.c, John Darrington, 2005/10/24
- Re: [Pspp-cvs] Changes to pspp/src/algorithm.c, Ben Pfaff, 2005/10/24
- Re: [Pspp-cvs] Changes to pspp/src/algorithm.c, John Darrington, 2005/10/25
- Re: [Pspp-cvs] Changes to pspp/src/algorithm.c, Ben Pfaff, 2005/10/25
- dictionary.c, John Darrington, 2005/10/25
- Re: dictionary.c, Ben Pfaff, 2005/10/25
- Re: dictionary.c, John Darrington, 2005/10/25
- RE: [Pspp-cvs] Changes to pspp/src/algorithm.c, Marshall DeBerry, 2005/10/26