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

Method diag

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

Source from the content-addressed store, hash-verified

122 }
123
124 template <typename U> static Matrix diag( int size, const U& diag_value ) {
125 Matrix res(size,size) ;
126 res.fill_diag( diag_value ) ;
127 return res ;
128 }
129
130 inline Proxy operator[]( R_xlen_t i ) {
131 return static_cast< Vector<RTYPE>* >( this )->operator[]( i ) ;

Callers

nothing calls this directly

Calls 1

fill_diagMethod · 0.80

Tested by

no test coverage detected