Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Wheel data structures recursively #6

Open
jenspots opened this issue Apr 17, 2023 · 0 comments
Open

Using Wheel data structures recursively #6

jenspots opened this issue Apr 17, 2023 · 0 comments

Comments

@jenspots
Copy link
Owner

The trie data structure contains binary trees, but requires them to be rewritten instead of importing from bst. This leaves a lot of room for improvement in terms of code duplication and performance. The main reason is the fact that we cannot yet let a bst implementation use bst* as a the generic type.

What we want is essentially to be able to do

typedef union trie_node {
  trie_node* next;
  LIBWHEEL_TYPE leaf;
  enum kind {
    INTERNAL,
    LEAF,
  };
};

#define LIBWHEEL_TYPE trie_node
#define LIBWHEEL_ALIAS trie_node

#include <wheel.h>

This way, we might be able to use the bst implementation in our trie.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant