[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch #5709] Augmented Balanced Tree data structure
From: |
John Darrington |
Subject: |
[patch #5709] Augmented Balanced Tree data structure |
Date: |
Thu, 25 Jan 2007 07:11:16 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060830 Firefox/1.5.0.7 (Debian-1.5.dfsg+1.5.0.7-2) |
Update of patch #5709 (project pspp):
Status: Ready For Test/Review => Works For Me
Assigned to: jmd => blp
_______________________________________________________
Follow-up Comment #1:
Hey! This could be useful in some of my current research!
I haven't tried it, but looking through the patch ...
abt_init: might the aux parameter be better declared const?
+struct abt_node *
+abt_first (const struct abt *abt)
+{
+ struct abt_node *p = abt->root;
+ if (p != NULL)
+ while (p->down[0] != NULL)
+ p = p->down[0];
+ return (struct abt_node *) p;
+}
Is this cast neccesary ?
abt-test.c: This mangled line appears:
This program is distributed in the hope that it wiabt be useful
^^^^
static unsigned
factorial (unsigned n)
{
unsigned value = 1;
I don't like qualifiers without a type. I thought gcc would have given a
warning about this.
+/* Reverses the order of the CNT integers starting at VALUES. */
+static void
+reverse (int *values, size_t cnt)
+{
+ for (; cnt > 1; cnt -= 2, values++)
+ swap (values, &values[cnt - 1]);
+}
If I'm reading this correctly, then the comment doesn't agree with the code.
It doesn't reverse the order of CNT integers, but reverses the order of each
pair of integers.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?5709>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/