MCPcopy Create free account
hub / github.com/pybind/pybind11 / reset_ref

Function reset_ref

tests/test_eigen_matrix.cpp:25–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23// (1-based) row/column number.
24template <typename M>
25void reset_ref(M &x) {
26 for (int i = 0; i < x.rows(); i++) {
27 for (int j = 0; j < x.cols(); j++) {
28 x(i, j) = 11 + 10 * i + j;
29 }
30 }
31}
32
33// Returns a static, column-major matrix
34Eigen::MatrixXd &get_cm() {

Callers 2

reset_refsFunction · 0.85

Calls 2

rowsMethod · 0.45
colsMethod · 0.45

Tested by

no test coverage detected