Prerequisites
Introduction to Cxx_matrix
int
main(void) {
Matrix<2U, 2U> matrix_a {
2., 1.,
4., 2. };
auto id = identity<2>();
bool has_inverse = is_invertible(id);
std::cout << "identity is inversible: " << (has_inverse ? "yes\n" : "no\n");
Matrix<2U, 2U> matrix_b = matrix_a + (5 ^ id);
Matrix<2, 1> res = solve(matrix_b, { 6., 10. });
std::cout << "RESULT IS:\n" << res;
return 0;
(void) has_inverse;
}Launching the analyzer


Last updated