efficient distance calculations in armadillo
问题 I'm new to armadillo. I have the below code, which I assume is inefficient. Any suggestions to make it more memory efficient and/or speedy? Following the armadillo docs and Rcpp gallery, I was unable to get .colptr 's, uvec 's, or batch insertion to work. But I assume any of them would be improvements. With an input of X (~100 x 30000), even my stupidly large work VM crashes. Linux release 7.3.1611 (Core) 117GB RAM / 0GB SWAP (24 x 2.494 GHz) processor(s) R version 3.3.2 (2016-10-31) Platform