26 #ifndef ROW_2_INCLUDED
27 #define ROW_2_INCLUDED
34 #include "../base/ver.h"
38 #include "../base/str.h"
41 #ifndef CHECK_INCLUDED
42 #include "../base/check.h"
54 static const long ROW_2_PRIME = 1073806763;
60 static const long ROW_2_MAGIC = 0x525F320AL;
73 static const int NUM_COLS = 2;
80 row_2_c(
int col1,
int col2) : C1(col1), C2(col2) {
130 long hash_val = C1 ^ (C2 << 11) ^ (C2 << 7);
132 hash_val = -(hash_val+1);
134 "row_2_c::hash: hash_val is negative");
135 return static_cast<int>(hash_val % ROW_2_PRIME);
140 bool operator==(
const row_2_c& other)
const {
145 return C1 == other.C1 && C2 == other.C2;
162 void to_string(
char *buf,
int buf_len)
const;
211 #define ROW_2_NULL (static_cast<row_2_t>(0))
#define CHECK_CODE(CODE)
Definition: check.h:167
#define CHECK_VALID(EX)
Definition: check.h:85
const char * str_t
Definition: str.h:41
#define STR_NULL
Definition: str.h:52
#define CHECK(EX, MSG)
Definition: check.h:69