| TSTOOL home page | TSTOOL documentation page | TSTOOL link page |
boxcount is a fast algorithm that partitions a data set of points into equally spaced and sized boxes. The algorithm is based on Robert Sedgewick's Ternary Search Trees  which offer a fast and efficient way to create and search a multidimensional histogram. Empty boxes require no storage space, therefore the maximum number of boxes (and memory) used can not exceed the number of points in the data set, regardless of the data set's dimension and the number of partitions per axis.
During processing, data values are scaled to be within the range 0,1 . All columns of the input matrix are scaled by the same factor, so no skewing is introduced into the point set.
p = rand(50000, 4); p = p - min(min(p)); p = p ./ max(max(p)); [a,b,c] = boxcount(p, 16)