Displaying 5 results from an estimated 5 matches for "sedgewick".
2006 May 29
1
OT: Monograph on Statistical Programming
...re fantastic books and each of
those three helped me a great deal).
Rather in the direction of the "Numerical Recipes" Series addressing how
to implement various functions.
There are bits and pieces all over the place (The Art of Computer
Programming, Numerical Recipes, Algorithms in ...(Sedgewick), etc.)...
But is there one book like "The Art of Statistical Programming"?
Maybe writing such a book could be impossible because the choice of
implementation language could be crucial and also the choice of
algorithms could be problematic.
Nevertheless I hope that someone dared to tackle...
2011 Oct 05
1
unique possible bug
.../*
Choose M to be the smallest power of 2
not less than 2*n and set K = log2(M).
Need K >= 1 and hence M >= 2, and 2^M <= 2^31 -1, hence n <= 2^29.
Dec 2004: modified from 4*n to 2*n, since in the worst case we have
a 50% full table, and that is still rather efficient -- see
R. Sedgewick (1998) Algorithms in C++ 3rd edition p.606.
*/
static void MKsetup(int n, HashData *d)
{
int n4 = 2 * n;
if(n < 0 || n > 536870912) /* protect against overflow to -ve */
error(_("length %d is too large for hashing"), n);
d->M = 2;
d->K = 1;
while (d->...
2012 Aug 10
3
Vector size limit for table() in R-2.15.1
...Choose M to be the smallest power of 2
not less than 2*n and set K = log2(M).
Need K >= 1 and hence M >= 2, and 2^M <= 2^31 -1, hence n <= 2^30.
Dec 2004: modified from 4*n to 2*n, since in the worst case we have
a 50% full table, and that is still rather efficient -- see
R. Sedgewick (1998) Algorithms in C++ 3rd edition p.606.
*/
static void MKsetup(int n, HashData *d)
{
int n2 = 2 * n;
if(n < 0 || n > 1073741824) /* protect against overflow to -ve */
error(_("length %d is too large for hashing"), n);
d->M = 2;
d->K = 1;
while (...
1997 Sep 03
1
R-alpha: speed of sort(.) and order(.)
sort() and order() are not quite the same, as "one knows":
o order allows breaking ties by more than one argument;
o sort allows a 'partial' and 'na.last' argument
Still, the following timing (on a `simple' UltraSparc I)
suggest that actually two different algorithms are used
> N <- 10000
> typeof(x0 <- 1:N) # --- x0 : already sorted ---
[1]
2015 Aug 03
3
[LLVMdev] seeking advice
...r optimizations, going through a book or two on computer
architecture should give me a start to dig deeper into its source (thinking
currently of Computer Systems: A Programmer's Perspective). There will
surely never be any shortage of good books to read (in particular hoping to
also squeeze in Sedgewick's algorithms in C and a book on OS architecture
somewhere), but I hope all this at least should give me a good start from
which to start planning further, and hopefully eventually get involved
somehow. However, given my current state of knowledge and being limited to
my spare time, I'm gues...