-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8aa3845
Showing
29 changed files
with
2,271 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
^build | ||
^MANIFEST$ | ||
^dist | ||
\.so$ | ||
\.o$ | ||
\.lo$ | ||
|
||
^stuff/ | ||
\.rej$ | ||
\.pyc$ | ||
^.tox | ||
\.orig$ | ||
\.prof$ | ||
\.coverage$ | ||
\.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Copyright (c) Mikhail Korobov, 2012 | ||
|
||
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 THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
include README.rst | ||
include CHANGES.rst | ||
include LICENSE | ||
include tox.ini | ||
include update_c.sh | ||
|
||
recursive-include hat-trie/src *.h *.c | ||
include hat-trie/src/config.h.in | ||
include hat-trie/configure | ||
include hat-trie/configure.ac | ||
|
||
include src/hat_trie.pyx | ||
include src/chat_datrie.pxd | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Copyright (C) 2011 by Daniel C. Jones <[email protected]> | ||
|
||
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
SUBDIRS = src test | ||
|
||
EXTRA_DIST = README.md COPYING | ||
|
||
pkgconfigdir = $(libdir)/pkgconfig | ||
pkgconfig_DATA = hat-trie-0.1.pc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
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 arrays of bytes 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. | ||
|
||
|
||
Installation | ||
------------ | ||
|
||
git clone [email protected]:dcjones/hat-trie.git | ||
cd hat-trie | ||
autoreconf -i | ||
./configure | ||
make install | ||
|
||
To use the library, include `hat-trie.h` and link using `lhat-trie`. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
todo: | ||
* Deletion in ahtable. | ||
* Deletion in hattrie. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
|
||
AC_INIT([hat-trie], [0.1.0], [[email protected]]) | ||
AM_INIT_AUTOMAKE([foreign]) | ||
AC_CONFIG_HEADERS([config.h]) | ||
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) | ||
|
||
base_CFLAGS="-std=c99 -Wall -Wextra -pedantic" | ||
opt_CFLAGS="${base_CFLAGS} -O3" | ||
dbg_CFLAGS="${base_CFLAGS} -g -O0" | ||
|
||
AC_ARG_ENABLE([debugging], | ||
[AS_HELP_STRING([--enable-debugging], | ||
[enable debugging info (default is no)])], | ||
[], [enable_debugging=no]) | ||
|
||
AS_IF([test "x$enable_debugging" = xyes], | ||
[CFLAGS="$dbg_CFLAGS"], | ||
[CFLAGS="$opt_CFLAGS"]) | ||
|
||
|
||
AC_PROG_CC | ||
AC_PROG_CPP | ||
AC_PROG_INSTALL | ||
AC_PROG_LN_S | ||
AC_PROG_MAKE_SET | ||
AC_DISABLE_SHARED | ||
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([hat-trie-0.1.pc Makefile src/Makefile test/Makefile]) | ||
AC_OUTPUT | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
prefix=@prefix@ | ||
exec_prefix=@exec_prefix@ | ||
libdir=@libdir@ | ||
includedir=@includedir@ | ||
|
||
Name: @PACKAGE_NAME@ | ||
Description: An efficient trie implementation. | ||
Version: @PACKAGE_VERSION@ | ||
Cflags: -I{includedir} | ||
Libs: -L${libdir} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
lib_LTLIBRARIES = libhat-trie.la | ||
|
||
libhat_trie_la_SOURCES = common.h \ | ||
ahtable.h ahtable.c \ | ||
hat-trie.h hat-trie.c \ | ||
misc.h misc.c \ | ||
superfasthash.h superfasthash.c | ||
|
||
pkginclude_HEADERS = hat-trie.h ahtable.h common.h | ||
|
Oops, something went wrong.