MCPcopy Create free account
hub / github.com/alandefreitas/matplotplusplus / eye

Function eye

source/matplot/util/common.h:501–507  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

499 double min_radius = 1., double exponent = 0.5);
500
501 template <class T = double> std::vector<std::vector<T>> eye(size_t n) {
502 std::vector<std::vector<T>> r(n, std::vector<T>(n, static_cast<T>(0)));
503 for (size_t i = 0; i < n; ++i) {
504 r[i][i] = 1.;
505 }
506 return r;
507 }
508
509 MATPLOT_EXPORTS
510 vector_2d transpose(const vector_2d &z);

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected