first work on edgelists

This commit is contained in:
tTh
2023-03-26 12:44:34 +02:00
parent 39b123c641
commit 83085d1435
4 changed files with 143 additions and 6 deletions

10
edges.h
View File

@@ -9,6 +9,7 @@ typedef struct {
} AnEdge;
typedef struct {
unsigned long magic;
char name[SZ_BUBULLE_TEXT+1];
int size; /* max number of edges */
int fidx; /* next free slot */
@@ -17,3 +18,12 @@ typedef struct {
} EdgeList;
/* --------------------------------------------------------------------- */
EdgeList * alloc_edgelist(char *name, int sz, int flags);
int free_edgelist(EdgeList *list, int k);
int push_an_edge(EdgeList *list, int p0, int p1);
int print_edgelist_desc(EdgeList *list, int k);
int print_the_edges(EdgeList *list, int k);
/* --------------------------------------------------------------------- */