]>
git.kaiwu.me - klib.git/log
Attractive Chaos [Mon, 6 May 2024 03:47:19 +0000 (23:47 -0400)]
sync with the khashl repo
Attractive Chaos [Sun, 17 Dec 2023 19:25:05 +0000 (04:25 +0900)]
support an ensemble of hash tables
Attractive Chaos [Wed, 13 Dec 2023 01:19:47 +0000 (20:19 -0500)]
Merge remote-tracking branch 'origin/master'
Attractive Chaos [Wed, 13 Dec 2023 01:18:41 +0000 (20:18 -0500)]
use FNV1a for strings
Attractive Chaos [Thu, 21 Sep 2023 14:50:31 +0000 (10:50 -0400)]
Merge pull request #173 from jmarshall/memchr
Apply seqtk PR to improve kseq.h parsing performance
John Marshall [Wed, 20 Sep 2023 20:22:16 +0000 (08:22 +1200)]
Add missing #include for read(2)
John Marshall [Wed, 20 Sep 2023 20:11:08 +0000 (08:11 +1200)]
Align backspace character [cosmetic]
John Marshall [Wed, 20 Sep 2023 20:08:05 +0000 (08:08 +1200)]
Apply memchr optimisation in the general delimiter case too
Fabian Klötzl [Wed, 21 Nov 2018 11:20:12 +0000 (12:20 +0100)]
improve parsing performance
Doubles throughput; can now parse FASTA at 2GB/s.
Attractive Chaos [Fri, 16 Jul 2021 20:45:53 +0000 (16:45 -0400)]
added kh_exist()
Attractive Chaos [Tue, 6 Apr 2021 23:38:03 +0000 (19:38 -0400)]
Added LICENSE; resolves #149
Attractive Chaos [Fri, 26 Mar 2021 02:58:27 +0000 (22:58 -0400)]
added kavll_size()
Attractive Chaos [Fri, 26 Mar 2021 02:48:49 +0000 (22:48 -0400)]
changed the prefix of kavl-lite.h to KAVLL
Attractive Chaos [Fri, 26 Mar 2021 02:31:23 +0000 (22:31 -0400)]
changed the example in the kavl-lite.h header
Attractive Chaos [Fri, 26 Mar 2021 02:28:25 +0000 (22:28 -0400)]
changed to khashl-like APIs
Attractive Chaos [Fri, 26 Mar 2021 02:11:32 +0000 (22:11 -0400)]
added kavl-lite.h, without counting
Attractive Chaos [Fri, 26 Mar 2021 02:08:19 +0000 (22:08 -0400)]
added radix sort
Attractive Chaos [Tue, 14 Jan 2020 01:05:38 +0000 (20:05 -0500)]
fixed a bug in khashl; resolves #135
Attractive Chaos [Fri, 27 Dec 2019 23:55:54 +0000 (18:55 -0500)]
for compatibility with older g++
Attractive Chaos [Thu, 26 Dec 2019 04:44:21 +0000 (23:44 -0500)]
added an example
Attractive Chaos [Thu, 26 Dec 2019 03:41:55 +0000 (22:41 -0500)]
added specialized hash table types (map, set, etc)
Attractive Chaos [Wed, 25 Dec 2019 23:52:20 +0000 (18:52 -0500)]
added the C++ version
Attractive Chaos [Wed, 25 Dec 2019 20:42:57 +0000 (15:42 -0500)]
formatting changes to khashl.h
Attractive Chaos [Wed, 25 Dec 2019 20:40:41 +0000 (15:40 -0500)]
added khashl.h
Attractive Chaos [Thu, 19 Dec 2019 18:52:42 +0000 (13:52 -0500)]
more tests
Attractive Chaos [Thu, 19 Dec 2019 18:35:12 +0000 (13:35 -0500)]
RMQ apparently working on a small dataset
Attractive Chaos [Tue, 17 Dec 2019 04:27:05 +0000 (23:27 -0500)]
prepare not add dynamic RMQ (unfinished)
Attractive Chaos [Mon, 1 Apr 2019 00:09:19 +0000 (20:09 -0400)]
added counting back
Attractive Chaos [Mon, 25 Mar 2019 04:23:39 +0000 (00:23 -0400)]
kavl.h in C++
Attractive Chaos [Mon, 25 Mar 2019 01:34:31 +0000 (21:34 -0400)]
khash.h in C++
Attractive Chaos [Wed, 27 Feb 2019 17:07:51 +0000 (12:07 -0500)]
Merge branch 'master' of github.com:attractivechaos/klib
Attractive Chaos [Wed, 27 Feb 2019 17:07:20 +0000 (12:07 -0500)]
fixed a bug in ketopt
Happens when an option is the prefix of another option.
Attractive Chaos [Fri, 8 Feb 2019 14:34:47 +0000 (09:34 -0500)]
Merge pull request #123 from dnbaker/master
char *p to const char *p for const-correctness.
dnbaker [Fri, 8 Feb 2019 14:32:27 +0000 (09:32 -0500)]
char *p to const char *p for const-correctness.
Attractive Chaos [Wed, 31 Oct 2018 00:03:33 +0000 (20:03 -0400)]
fixed a few typos in khash.h; resolves #110
Heng Li [Wed, 26 Sep 2018 01:52:55 +0000 (21:52 -0400)]
added kavl.h and ketopt.h to README
Heng Li [Fri, 31 Aug 2018 09:05:18 +0000 (23:05 -1000)]
Added a version of xoroshiro128+
Heng Li [Fri, 31 Aug 2018 08:58:52 +0000 (22:58 -1000)]
removed MT19937-64.
Heng Li [Thu, 30 Aug 2018 10:10:48 +0000 (00:10 -1000)]
revert to a single-header library
Heng Li [Thu, 30 Aug 2018 06:54:16 +0000 (20:54 -1000)]
bug due to the last change
Heng Li [Thu, 30 Aug 2018 06:50:53 +0000 (20:50 -1000)]
remember longidx
Heng Li [Thu, 30 Aug 2018 05:46:32 +0000 (19:46 -1000)]
documentation
Heng Li [Thu, 30 Aug 2018 05:27:58 +0000 (19:27 -1000)]
split ketopt.h into two files
Heng Li [Wed, 29 Aug 2018 18:34:52 +0000 (08:34 -1000)]
improve test
Heng Li [Wed, 29 Aug 2018 10:15:17 +0000 (00:15 -1000)]
for c89 compatibility
Heng Li [Wed, 29 Aug 2018 10:08:28 +0000 (00:08 -1000)]
portable getopt_long()
Heng Li [Mon, 18 Jun 2018 02:01:44 +0000 (22:01 -0400)]
fixed insert counting err; couting with del
Heng Li [Thu, 17 May 2018 21:43:47 +0000 (17:43 -0400)]
kavl_find() gave wrong counts when equal
Heng Li [Thu, 17 May 2018 19:07:23 +0000 (15:07 -0400)]
fixed a bug in kavl_find()
Heng Li [Fri, 11 May 2018 17:03:25 +0000 (13:03 -0400)]
Eigenvalues for dense symmetric matrices
Heng Li [Thu, 3 May 2018 14:47:39 +0000 (10:47 -0400)]
generalize kavl_itr_eq() to kavl_itr_find()
Also documented the iterator functions
Heng Li [Fri, 20 Apr 2018 12:09:28 +0000 (08:09 -0400)]
use more robust comparison in examples
Heng Li [Fri, 20 Apr 2018 03:38:02 +0000 (23:38 -0400)]
fixed a compiler warning
Heng Li [Sun, 15 Apr 2018 02:58:15 +0000 (22:58 -0400)]
also check balance factor
Heng Li [Sun, 15 Apr 2018 01:51:26 +0000 (21:51 -0400)]
added a simpler tree deallocator
Heng Li [Sat, 14 Apr 2018 23:46:12 +0000 (19:46 -0400)]
faster way to delete the first node
Heng Li [Sat, 14 Apr 2018 23:31:22 +0000 (19:31 -0400)]
added light documentation on kavl
Heng Li [Sat, 14 Apr 2018 22:37:15 +0000 (18:37 -0400)]
Merge remote-tracking branch 'origin/master'
Heng Li [Sat, 14 Apr 2018 22:35:48 +0000 (18:35 -0400)]
added kavl.h
Intrusive generic AVL tree in ANSI C
Heng Li [Fri, 19 Jan 2018 22:36:02 +0000 (17:36 -0500)]
find the largest chunk of free memory
Heng Li [Thu, 11 Jan 2018 15:15:07 +0000 (10:15 -0500)]
Merge pull request #94 from daviesrob/kstrtok
Fix kstrtok finished flag check, undefined behaviour and sign extension issues
Rob Davies [Wed, 10 Jan 2018 17:05:57 +0000 (17:05 +0000)]
Fix undefined behaviour and sign extension issues in kstrtok
Prevent read beyond the end of sep if it's an empty string.
Change to internally use unsigned char to avoid unwanted sign
extension on platforms where 'char' is signed.
Fix undefined behaviour where pointers were made to the element
before the start of `str`:
https://www.securecoding.cert.org/confluence/display/c/ARR30-C.+Do+not+form+or+use+out-of-bounds+pointers+or+array+subscripts
Valeriu Ohan [Thu, 4 Jan 2018 13:00:02 +0000 (13:00 +0000)]
Fixes the finished flag.
Heng Li [Wed, 6 Dec 2017 20:28:11 +0000 (15:28 -0500)]
added Brent's root finding; not tested
Heng Li [Sun, 24 Sep 2017 17:57:49 +0000 (13:57 -0400)]
added kalloc
Heng Li [Fri, 2 Jun 2017 19:30:49 +0000 (15:30 -0400)]
README formatting
Heng Li [Sat, 4 Mar 2017 14:03:57 +0000 (09:03 -0500)]
use long for forpool
Heng Li [Sat, 11 Feb 2017 20:31:43 +0000 (15:31 -0500)]
Merge pull request #79 from pmelsted/master
Adds checks for failed reads and gzip files with corrupt crc.
Pall Melsted [Thu, 19 Jan 2017 22:56:04 +0000 (22:56 +0000)]
Adds checks for failed reads and gzip files with corrupt crc.
Heng Li [Fri, 16 Dec 2016 22:44:51 +0000 (17:44 -0500)]
forpool working
Heng Li [Fri, 16 Dec 2016 20:20:24 +0000 (15:20 -0500)]
kt_for with a mini thread pool; buggy
deadlock on mac sometimes
Heng Li [Mon, 22 Aug 2016 12:34:34 +0000 (08:34 -0400)]
added dequeue
Heng Li [Tue, 16 Aug 2016 21:08:06 +0000 (17:08 -0400)]
kexpr: evaluate by return type
Heng Li [Sun, 31 Jul 2016 14:53:24 +0000 (10:53 -0400)]
added a simple header for kthread
Heng Li [Sun, 31 Jul 2016 14:51:35 +0000 (10:51 -0400)]
sync kthread with the one in minimap/bwa
Heng Li [Wed, 30 Dec 2015 16:22:07 +0000 (11:22 -0500)]
Merge branch 'master' of github.com:attractivechaos/klib
Heng Li [Wed, 30 Dec 2015 16:21:44 +0000 (11:21 -0500)]
draw a random number from Gaussian N(0,1)
Heng Li [Fri, 23 Oct 2015 12:50:39 +0000 (08:50 -0400)]
Merge pull request #62 from innoink/master
fix spelling mistake
innoink [Fri, 23 Oct 2015 06:00:11 +0000 (14:00 +0800)]
fix spelling mistake
Heng Li [Tue, 29 Sep 2015 12:28:48 +0000 (08:28 -0400)]
added
Heng Li [Thu, 17 Sep 2015 23:43:01 +0000 (19:43 -0400)]
simplified the kbtree iter a bit
Heng Li [Thu, 17 Sep 2015 23:24:05 +0000 (19:24 -0400)]
Merge branch 'master' of github.com:attractivechaos/klib
Heng Li [Thu, 17 Sep 2015 23:23:33 +0000 (19:23 -0400)]
added iterator interface to kbtree
and deprecated the old macro interface
Heng Li [Thu, 23 Jul 2015 15:18:35 +0000 (11:18 -0400)]
Merge pull request #53 from jmarshall/kgetline
Add kstring kgetline() and ks_release() functions
Heng Li [Thu, 23 Jul 2015 15:17:31 +0000 (11:17 -0400)]
Merge pull request #47 from jmarshall/unused-warnings
Prevent unused function warnings in khash.h, klist.h
Heng Li [Thu, 23 Jul 2015 15:17:01 +0000 (11:17 -0400)]
Merge pull request #32 from jmarshall/getaddrinfo
Don't call freeaddrinfo() when getaddrinfo() fails
John Marshall [Wed, 16 Apr 2014 13:07:03 +0000 (14:07 +0100)]
Don't call freeaddrinfo() when getaddrinfo() fails
POSIX is somewhat unclear here, but doing so segfaults on some
platforms. Hat tip Kamil Slowikowski @slowkow.
Instead print a more detailed error message using gai_strerror().
John Marshall [Tue, 24 Mar 2015 09:37:12 +0000 (09:37 +0000)]
Prevent unused function warnings in khash.h, klist.h
Recent versions of Clang warn about unused static inline functions
in .c files (though they suppress this warning for such definitions
in header files). Definitions via KHASH_INIT etc are effectively in
the .c file, and it's impractical to make these inline other than
static inline; so add attributes to suppress these warnings.
John Marshall [Tue, 9 Jun 2015 02:29:54 +0000 (03:29 +0100)]
Add kgetline() to kstring.c/.h
Similar to BSD's getline() but omits the \n terminator and manages the
memory as a kstring. Call with "(kgets_func *) fgets" to read from stdio,
or implement an fgets()-style function to read from other streams, e.g.,
a wrapper around gzgets() that reorders its parameters as per fgets().
John Marshall [Wed, 12 Mar 2014 14:33:12 +0000 (14:33 +0000)]
Add ks_release() to kstring.h
Using this function is a more explicit way of transferring ownership
than just "foo = str.s"; the latter leaves room for readers to wonder
whether a subsequent "free(str.s)" has been forgotten.
Heng Li [Fri, 26 Jun 2015 19:27:38 +0000 (15:27 -0400)]
Merge pull request #52 from ihh/master
Fixed output bug where leaf branch length is not printed
Ian Holmes [Fri, 26 Jun 2015 18:21:26 +0000 (14:21 -0400)]
Fixed output bug where branch length is not printed on branches to leaf nodes
Heng Li [Fri, 22 May 2015 18:35:19 +0000 (14:35 -0400)]
fixed a bug and a portability issue
Heng Li [Fri, 22 May 2015 18:02:38 +0000 (14:02 -0400)]
don't stop on undefined functions
Heng Li [Fri, 22 May 2015 14:54:16 +0000 (10:54 -0400)]
set user-defined functions
Heng Li [Fri, 22 May 2015 13:53:25 +0000 (09:53 -0400)]
code cleanup
Heng Li [Fri, 22 May 2015 13:42:03 +0000 (09:42 -0400)]
don't return a parse error if see undef func
Heng Li [Fri, 22 May 2015 13:36:05 +0000 (09:36 -0400)]
a little bit code cleanup
Heng Li [Fri, 22 May 2015 13:12:15 +0000 (09:12 -0400)]
moved argument checking to ke_parse()
Heng Li [Fri, 22 May 2015 13:02:38 +0000 (09:02 -0400)]
simplified ke_eval() with operator functions