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

Function adjust_matrix

tests/test_eigen_matrix.cpp:63–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61// reference is referencing rows/columns correctly).
62template <typename MatrixArgType>
63Eigen::MatrixXd adjust_matrix(MatrixArgType m) {
64 Eigen::MatrixXd ret(m);
65 for (int c = 0; c < m.cols(); c++) {
66 for (int r = 0; r < m.rows(); r++) {
67 ret(r, c) += 10 * r + 100 * c; // NOLINT(clang-analyzer-core.uninitialized.Assign)
68 }
69 }
70 return ret;
71}
72
73struct CustomOperatorNew {
74 CustomOperatorNew() = default;

Callers

nothing calls this directly

Calls 2

colsMethod · 0.45
rowsMethod · 0.45

Tested by

no test coverage detected