In void HierarchicalSNE<scalar_type, sparse_scalar_matrix_type>::initializeFirstScale() there is the danger of an integer overlow in the for loop .
int idx = i * nn + n; will overflow for moderately large data (> ~25M points, perplexity 30).
Even unsigned will be rather limited. It should be considered to also move to 64bit indices wherever indexing into data structures with multiple values per datapoint.
In
void HierarchicalSNE<scalar_type, sparse_scalar_matrix_type>::initializeFirstScale()
there is the danger of an integer overlow in the for loop .int idx = i * nn + n;
will overflow for moderately large data (> ~25M points, perplexity 30).Even unsigned will be rather limited. It should be considered to also move to 64bit indices wherever indexing into data structures with multiple values per datapoint.