Sentinel Sentinel - 7 months ago 48
C++ Question

Armadillo C++ Matrix Library - simplest way to initialize all values in a matrix to 999?

I'm very new to Armadillo but after searching around I can't find any answer to this. I need a matrix with all values initialized to a number like 999. Do I have to iterate through the whole thing and set them manually? Feel like there should be a better way.


According to documentation classes Mat, Col, Row, Cube have method fill.


mat A(5,5);