Find
Connect

Recent Posts
Tags
 anchor graph hashing
 animated gif
 applescript
 asciinema
 assembly
 bar charts
 bash
 bezier curves
 c++
 conway's game of life
 data visualization
 diffbot
 echo
 factorization machines
 finder
 generative art
 gifcast
 google chrome
 google images
 hacker news
 image color quantization
 javascript
 kmeans clustering
 linux
 machine learning
 math
 neural networks
 neural style transfer
 os x
 pastiche
 photography
 printenv
 probability
 programming
 python
 references
 regressions
 ssh
 statistics
 sysadmin
 theano
 unix
 vim
 webwork
 youtube
Archives
License Details
 Blog posts are licensed under a Creative Commons AttributionShareAlike 3.0 Unported License, unless otherwise noted.
 Some blog posts, such as those that serve to express my opinion on some matter, may be covered by a more restrictive license (e.g., a license that grants permission to copy and distribute the content verbatim). When this is the case, details will be appended to the post.
 If you have any questions, please .
 Blog posts are licensed under a Creative Commons AttributionShareAlike 3.0 Unported License, unless otherwise noted.
Tag Archives: c++
🚪 revdoor
revdoor is a singlefile C++ library for visiting revolving door combinations. The combinations without replacement generator implements Algorithm R from TAOCP 7.2.1.3 [1]. The combinations with replacement generator implements the same algorithm, modified to support replacement. The algorithms visit combinations … Continue reading
Tagged c++, combinations, combinatorics, revolving door, taocp
Leave a comment
SMAWK in C++
I recently implemented kmeans1d—discussed in a prior post—for efficiently performing globally optimal 1D kmeans clustering. The implementation utilizes the SMAWK algorithm (Aggarwal et al., 1987), which calculates argmin(i) for each row i of an arbitrary n × m totally monotone … Continue reading
Tagged c++, computer science, smawk
Leave a comment
kmeans1d: Globally Optimal Efficient 1D kmeans Clustering
I implemented kmeans1d, a Python library for performing kmeans clustering on 1D data, based on the algorithm in (Xiaolin 1991), as presented in section 2.2 of (Grønlund et al., 2017). Globally optimal kmeans clustering is NPhard for multidimensional data. LLoyd’s … Continue reading