| 1 |
#ifndef CARYLL_BK_BKGRAPH_H |
| 2 |
#define CARYLL_BK_BKGRAPH_H |
| 3 |
|
| 4 |
#include <stdint.h> |
| 5 |
#include <stdarg.h> |
| 6 |
#include <stdbool.h> |
| 7 |
#include <stdlib.h> |
| 8 |
#include "caryll/buffer.h" |
| 9 |
|
| 10 |
#include "bkblock.h" |
| 11 |
|
| 12 |
typedef struct { |
| 13 |
uint32_t alias; |
| 14 |
uint32_t order; |
| 15 |
uint32_t height; |
| 16 |
uint32_t hash; |
| 17 |
bk_Block *block; |
| 18 |
} bk_GraphNode; |
| 19 |
|
| 20 |
typedef struct { |
| 21 |
uint32_t length; |
| 22 |
uint32_t free; |
| 23 |
bk_GraphNode *entries; |
| 24 |
} bk_Graph; |
| 25 |
|
| 26 |
bk_Graph *bk_newGraphFromRootBlock(bk_Block *b); |
| 27 |
void bk_delete_Graph(/*MOVE*/ bk_Graph *f); |
| 28 |
void bk_minimizeGraph(/*BORROW*/ bk_Graph *f); |
| 29 |
void bk_untangleGraph(/*BORROW*/ bk_Graph *f); |
| 30 |
caryll_Buffer *bk_build_Graph(/*BORROW*/ bk_Graph *f); |
| 31 |
caryll_Buffer *bk_build_Block(/*MOVE*/ bk_Block *root); |
| 32 |
caryll_Buffer *bk_build_Block_noMinimize(/*MOVE*/ bk_Block *root); |
| 33 |
size_t bk_estimateSizeOfGraph(bk_Graph *f); |
| 34 |
|
| 35 |
#endif |