+
+
+/* Return -1 if the id of a is less than b; +1 if greater than and
+ 0 if equal */
+static int
+compare_group_binary(const struct group_statistics *a,
+ const struct group_statistics *b,
+ struct group_properties *p)
+{
+
+ short flag_a;
+ short flag_b;
+
+ assert(p->indep_width == 0 ) ;
+
+ if ( p->criterion == CMP_LE )
+ {
+ flag_a = ( a->id.f < p->v.critical_value ) ;
+ flag_b = ( b->id.f < p->v.critical_value ) ;
+ }
+ else
+ {
+ flag_a = ( a->id.f == p->v.critical_value ) ;
+ flag_b = ( b->id.f == p->v.critical_value ) ;
+ }
+
+
+ if ( flag_a == flag_b)
+ return 0 ;
+
+ return ( flag_a < flag_b);
+}
+
+static unsigned
+hash_group_binary(const struct group_statistics *g, struct group_properties *p)
+{
+ short flag = -1;
+
+ assert(p->indep_width == 0 ) ;
+
+ /* FIXME: should compare union values */
+ if ( p->criterion == CMP_LE )
+ {
+ flag = ( g->id.f < p->v.critical_value ) ;
+ }
+ else if ( p->criterion == CMP_EQ)
+ {
+ if ( g->id.f == p->v.g_value[0].f )
+ flag = 0 ;
+ else if ( g->id.f == p->v.g_value[1].f )
+ flag = 1;
+ else
+ flag = 2;
+ }
+ else
+ assert(0);
+
+ return flag;
+}