bayesmix-dev / bayesmix

Flexible Bayesian nonparametric mixture models in C++
https://bayesmix.rtfd.io
BSD 3-Clause "New" or "Revised" License
22 stars 18 forks source link

Improved CSV reading function #113

Closed brunoguindani closed 2 years ago

brunoguindani commented 2 years ago

The new read_eigen_matrix() removes the often-limiting maximum buffer size to read from a matrix. It first scans the given CSV to infer the correct number of rows and columns, then allocates the matrix of the exact dimensions needed, and finally fills it entry-by-entry. (While I was at it, I also moved check_file_is_writeable() to the utils file.)

@giacomodecarlo, as soon as this is merged into master, you can merge the master into your own branch to use this function :)