MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / fill_diag__dispatch

Method fill_diag__dispatch

inst/include/Rcpp/vector/Matrix.h:177–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175
176 template <typename U>
177 void fill_diag__dispatch( traits::false_type, const U& u) {
178 Shield<SEXP> elem( converter_type::get( u ) );
179
180 R_xlen_t bounds = std::min(Matrix::nrow(), Matrix::ncol());
181 for (R_xlen_t i = 0; i < bounds; ++i) {
182 (*this)(i, i) = elem;
183 }
184 }
185
186 template <typename U>
187 void fill_diag__dispatch( traits::true_type, const U& u) {

Callers

nothing calls this directly

Calls 2

getFunction · 0.85
minFunction · 0.50

Tested by

no test coverage detected