Permalink
Browse files

array hash tables implemented (but untested)

  • Loading branch information...
0 parents commit c44f1d75dfec89bd78e4c98c8b90ca2628583234 @dcjones committed Aug 12, 2011
Showing with 687 additions and 0 deletions.
  1. +19 −0 COPYING
  2. +5 −0 Makefile.am
  3. +23 −0 README.md
  4. +25 −0 configure.ac
  5. +8 −0 src/Makefile.am
  6. +368 −0 src/ahtable.c
  7. +79 −0 src/ahtable.h
  8. +40 −0 src/misc.c
  9. +22 −0 src/misc.h
  10. +73 −0 src/superfasthash.c
  11. +25 −0 src/superfasthash.h
19 COPYING
@@ -0,0 +1,19 @@
+Copyright (C) 2011 by Daniel C. Jones <dcjones@cs.washington.edu>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+
@@ -0,0 +1,5 @@
+
+SUBDIRS = src
+
+EXTRA_DIST = README.md COPYING
+
@@ -0,0 +1,23 @@
+
+Hat-Trie
+========
+
+This a ANSI C99 implementation of the HAT-trie data structure of Askitis and
+Sinha, an extremely efficient (space and time) modern variant of tries.
+
+The version implemented here maps null-terminated strings to words (i.e.,
+unsigned longs), which can be used to store counts, pointers, etc, or not used
+at all if you simply want to maintain a set of unique strings.
+
+For details see,
+
+ 1. Askitis, N., & Sinha, R. (2007). HAT-trie: a cache-conscious trie-based data
+ structure for strings. Proceedings of the thirtieth Australasian conference on
+ Computer science-Volume 62 (pp. 97–105). Australian Computer Society, Inc.
+
+ 2. Askitis, N., & Zobel, J. (2005). Cache-conscious collision resolution in
+ string hash tables. String Processing and Information Retrieval (pp.
+ 91–102). Springer.
+
+
+
@@ -0,0 +1,25 @@
+
+AC_INIT([hat-trie], [0.1.0], [dcjones@cs.washington.edu])
+AM_INIT_AUTOMAKE([foreign])
+AC_CONFIG_HEADERS([config.h])
+
+CFLAGS="-Wall -Wextra -std=c99 -pedantic"
+
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_MAKE_SET
+AC_PROG_LIBTOOL
+
+AC_C_BIGENDIAN([AC_MSG_ERROR([Big-endian systems are not currently supported.])])
+AC_CHECK_HEADERS([stdint.h stdlib.h])
+AC_HEADER_STDBOOL
+AC_TYPE_SIZE_T
+AC_TYPE_UINT16_T
+AC_TYPE_UINT32_T
+AC_TYPE_UINT8_T
+
+AC_CONFIG_FILES([Makefile src/Makefile])
+AC_OUTPUT
+
@@ -0,0 +1,8 @@
+
+lib_LTLIBRARIES = libhat-trie.la
+
+libhat_trie_la_SOURCES = ahtable.h ahtable.c \
+ misc.h misc.c \
+ superfasthash.h superfasthash.c
+
+
Oops, something went wrong.

0 comments on commit c44f1d7

Please sign in to comment.