diff options
author | Calvin Morrison <mutantturkey@gmail.com> | 2014-02-18 12:42:11 -0500 |
---|---|---|
committer | Calvin Morrison <mutantturkey@gmail.com> | 2014-02-18 12:42:11 -0500 |
commit | 719c45d9ea49f33f087db899737ad5af4fc4414f (patch) | |
tree | 8f1eed693ffe3416f139c59e8481b81147d016ae /sparse.h | |
parent | 1c2ce90501d87db6431a7f29a37876d61347aff7 (diff) |
working sparse implementation
Diffstat (limited to 'sparse.h')
-rw-r--r-- | sparse.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sparse.h b/sparse.h new file mode 100644 index 0000000..2ffbabd --- /dev/null +++ b/sparse.h @@ -0,0 +1,17 @@ +#include <stdbool.h> + +struct b_tree { + size_t index; + unsigned long long value; + struct b_tree *right; + struct b_tree *left; +}; + +typedef struct b_tree node; + +node* search(node **tree, size_t index); +void insert(node **tree, size_t index); +void deltree(node *tree); +unsigned long long lookup(node **tree, size_t index); + +void print_sparse(node *tree, bool label, bool nonzero, unsigned int kmer); |