16namespace layer2_discreta {
26 cout <<
"bt_key::copy constructor for object: "
34 cout <<
"bt_key::operator = (copy assignment)" << endl;
68 cout <<
"bt_key::copyobject_to()\n";
69 print_as_vector(cout);
130 return strcmp(p1, p2);
160 if (p_l1[1] < p_l2[1]) {
163 if (p_l1[1] > p_l2[1]) {
187 int i, j, l1, output_size;
191 for (i = 0; i < V.
s_l(); i++) {
196 if (output_size == 4) {
199 else if (output_size == 2) {
203 cout <<
"bt_key_print() output_size not 2 or 4" << endl;
208 for (j = 0; j < output_size; j++) {
209 if (the_key[j] == 0) {
214 for (j = 0; j < output_size; j++) {
227 if (output_size == 4) {
230 else if (output_size == 2) {
234 cout <<
"bt_key_print() output_size not 2 or 4" << endl;
243 cout <<
"bt_key_print() unknown bt_key_kind" << endl;
257 char *pc_1 = (
char *) &int1;
258 char *pc_2 = (
char *) &int2;
260 for (i = 0; i < 4; i++) {
282 char *pc_1 = (
char *) &int1;
283 char *pc_2 = (
char *) &int2;
285 for (i = 0; i < 2; i++) {
304 char *the_key1 = key1;
305 char *the_key2 = key2;
306 int i, j, output_size, res;
311 for (i = 0; i < depth; i++) {
316 if (output_size == 4) {
321 else if (output_size == 2) {
327 cout <<
"bt_key_compare() output_size not 2 or 4" << endl;
332 res = strncmp(the_key1, the_key2, output_size);
335 the_key1 += output_size;
336 the_key2 += output_size;
340 if (output_size == 4) {
345 else if (output_size == 2) {
351 cout <<
"bt_key_compare() output_size not 2 or 4" << endl;
357 cout <<
"bt_key_compare() unknown bt_key_kind" << endl;
367 cout <<
"bt_key_fill_in_int4 "
368 "object not an INTEGER" << endl;
374 char *pc = (
char *) &a;
377 for (i = 0; i < 4; i++) {
387 cout <<
"bt_key_fill_in_int2 "
388 "object not an INTEGER" << endl;
394 char *pc = (
char *) &a;
397 for (i = 0; i < 2; i++) {
407 cout <<
"bt_key_fill_in_string "
408 "object not an HOLLERITH" << endl;
412 strncpy(*p_key, h.
s(), output_size);
413 *p_key += output_size;
419 int i, j, output_size;
422 for (i = 0; i < V.
s_l(); i++) {
425 cout <<
"bt_key_fill_in the_key - key > BTREEMAXKEYLEN" << endl;
427 cout <<
"the_key - key=" << the_key - key << endl;
437 if (output_size == 4) {
440 else if (output_size == 2) {
444 cout <<
"bt_key_fill_in() output_size not 2 or 4" << endl;
459 if (fst + j < key_vec.
s_l())
460 key_object1 = &key_vec[fst + j];
462 key_object1 = &null_ob;
463 if (output_size == 4) {
466 else if (output_size == 2) {
470 cout <<
"bt_key_fill_in output_size not 2 or 4" << endl;
476 cout <<
"bt_key_fill_in unknown bt_key_kind" << endl;
484 char *pc = (
char *)&i;
486 pc[0] = **key; (*key)++;
487 pc[1] = **key; (*key)++;
488 pc[2] = **key; (*key)++;
489 pc[3] = **key; (*key)++;
494 char *pc = (
char *)&i;
496 pc[0] = **key; (*key)++;
497 pc[1] = **key; (*key)++;
DISCRETA vector class for vectors of DISCRETA objects.
discreta_base & s_i(int i)
void copyobject_to(discreta_base &x)
DISCRETA class for databases.
bt_key & operator=(const discreta_base &x)
void init_string(int output_size, int field1, int field2)
void init_int2_vec(int field1, int field2, int vec_fst, int vec_len)
void copyobject_to(discreta_base &x)
void init_int2(int field1, int field2)
enum bt_key_kind & type()
void init(enum bt_key_kind type, int output_size, int field1, int field2)
void init_int4_vec(int field1, int field2, int vec_fst, int vec_len)
std::ostream & print(std::ostream &)
void init_int4(int field1, int field2)
DISCRETA base class. All DISCRETA classes are derived from this class.
hollerith & as_hollerith()
void copyobject(discreta_base &x)
void bt_key_print_int4(char **key, ostream &ost)
int bt_key_compare_int4(char **p_key1, char **p_key2)
int bt_key_int2_cmp(char *p1, char *p2)
int bt_lexicographic_cmp(char *p1, char *p2)
void bt_key_get_int2(char **key, int_2 &i)
int bt_key_int_cmp(char *p1, char *p2)
void bt_key_print_int2(char **key, ostream &ost)
void bt_key_fill_in(char *key, Vector &V, Vector &the_object)
int bt_key_compare_int2(char **p_key1, char **p_key2)
void bt_key_fill_in_int2(char **p_key, discreta_base &key_op)
void bt_key_fill_in_int4(char **p_key, discreta_base &key_op)
void bt_key_fill_in_string(char **p_key, int output_size, discreta_base &key_op)
void bt_key_get_int4(char **key, int_4 &i)
void bt_key_print(char *key, Vector &V, ostream &ost)
int bt_key_compare(char *key1, char *key2, Vector &V, int depth)
the orbiter library for the classification of combinatorial objects