|
@@ -80,31 +80,31 @@ _graph_lookup (LSUP_store_type type)
|
|
|
};
|
|
|
|
|
|
// Lookup result counts.
|
|
|
- size_t lu_ct[N_LUT] = { 8, 5, 3, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0 };
|
|
|
+ size_t lu_ct[N_LUT] = {
|
|
|
+ 8,
|
|
|
+ 5, 3, 2,
|
|
|
+ 1, 1, 1,
|
|
|
+ 0, 0, 0,
|
|
|
+ 0, 0, 0
|
|
|
+ };
|
|
|
|
|
|
- /* TODO
|
|
|
// Index of lookup matches from trp.
|
|
|
- size_t lu_match[N_LUT][5] = {
|
|
|
+ size_t lu_match[N_LUT][8] = {
|
|
|
{0, 1, 2, 3, 4, 5, 6, 7},
|
|
|
- {0, 3, 4, 5, 7},
|
|
|
- {2, 4, 7},
|
|
|
- {5, 7},
|
|
|
+ {0, 3, 4, 5, 7}, {2, 4, 7}, {5, 7},
|
|
|
{0}, {0}, {7},
|
|
|
{}, {}, {},
|
|
|
+ {}, {}, {},
|
|
|
};
|
|
|
|
|
|
// Index of lookup non-matches from trp.
|
|
|
size_t lu_no_match[N_LUT][8] = {
|
|
|
{},
|
|
|
- {1, 2, 6},
|
|
|
- {0, 1, 3, 5, 6},
|
|
|
- {0, 1, 2, 3, 4, 6},
|
|
|
- {1, 2, 3, 4, 5, 6, 7},
|
|
|
- {0, 1, 2, 3, 4, 5, 6, 7},
|
|
|
- {0, 1, 2, 3, 4, 5, 6, 7},
|
|
|
- {0, 1, 2, 3, 4, 5, 6, 7},
|
|
|
+ {1, 2, 6}, {0, 1, 3, 5, 6}, {0, 1, 2, 3, 4, 6},
|
|
|
+ {1, 2, 3, 4, 5, 6, 7}, {1, 2, 3, 4, 5, 6, 7}, {0, 1, 2, 3, 4, 5, 6},
|
|
|
+ {0, 1, 2, 3, 4, 5, 6, 7}, {0, 1, 2, 3, 4, 5, 6, 7}, {0, 1, 2, 3, 4, 5, 6, 7},
|
|
|
+ {0, 1, 2, 3, 4, 5, 6, 7}, {0, 1, 2, 3, 4, 5, 6, 7}, {0, 1, 2, 3, 4, 5, 6, 7},
|
|
|
};
|
|
|
- */
|
|
|
|
|
|
LSUP_Graph *gr = LSUP_graph_new (type);
|
|
|
|
|
@@ -123,16 +123,18 @@ _graph_lookup (LSUP_store_type type)
|
|
|
printf ("done.\n");
|
|
|
|
|
|
/* TODO
|
|
|
- for (int j = 0; LSUP_graph_iter_next != LSUP_END; j++) {
|
|
|
- ASSERT (
|
|
|
- LSUP_graph_contains (trp[lu_match[j]]),
|
|
|
- "Triple not found!");
|
|
|
- ASSERT (
|
|
|
- !(LSUP_graph_contains (trp[lu_no_match[j]])),
|
|
|
- "Unexpected triple found!");
|
|
|
+ for (int j = 0; j < 8; j++) {
|
|
|
+ for (int k = 0; LSUP_graph_iter_next(it) != LSUP_END; k++) {
|
|
|
+ ASSERT (
|
|
|
+ LSUP_graph_contains (trp[lu_match[j]]),
|
|
|
+ "Triple not found!");
|
|
|
+ ASSERT (
|
|
|
+ !(LSUP_graph_contains (trp[lu_no_match[j]])),
|
|
|
+ "Unexpected triple found!");
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
*/
|
|
|
+
|
|
|
LSUP_graph_iter_free (it);
|
|
|
};
|
|
|
|