19#include "../sorting.h"
138 auto result =
eye(k);
139 for(
size_t i = 0; i < k; ++i) { result(i, i) = in(isRows ? i : 0, isRows ? 0 : i); }
size_t rows() const
Definition: Matrix.h:193
size_t columns() const
Definition: Matrix.h:198
Matrix< T > diag(const Matrix< T > &in)
Definition: utils.h:135
Matrix< size_t > argsort(const Matrix< double > &in)
Matrix< size_t > nonzero(const std::function< bool(const double &)> &validation, const Matrix< double > &x)
Matrix< double > eye(size_t rows, size_t columns=0)
double norm(const Matrix< double > &in)
Matrix< double > tridiag(size_t rows, size_t columns, double left, double center, double right)
Matrix< double > ones(size_t rows, size_t columns=1, size_t elements=1)
Matrix< double > zerosV(size_t rows)
Matrix< double > zeros(size_t rows, size_t columns, size_t elements=1)
Matrix< double > linspace(double start, double end, unsigned long num_elements)