Make an optional upper bound on the number of clusters found.
dsteinberg opened this issue · 1 comments
dsteinberg commented
This will be especially useful for some of the less parametrised distributions which tend to result in many clusters.
This can essentially be handled in the split-searching functions, by just returning false (no new clusters) once the upper bound (a new argument, i.e. "trunc" for truncate) is reached. Files:
- src/cluster.cpp (lines 268 and 375)
- src/scluster.cpp (lines 297)
- src/mcluster.cpp (lines 326)
This change (an additional optional argument) will need to be propagated through the c++ wrapper (libcluster.h and above .cpp files) and the matlab and python interfaces. A good basis for this interface is the trunc parameter used for the MCM (https://github.com/dsteinberg/libcluster/blob/master/include/libcluster.h#L645).
dsteinberg commented
Done!