COSC-4P80-Assignment-2/lib/eigen-3.4.0/doc/snippets/Cwise_round.cpp

4 lines
93 B
C++

ArrayXd v = ArrayXd::LinSpaced(7,-2,2);
cout << v << endl << endl;
cout << round(v) << endl;