Loading...
Searching...
No Matches
matrix.hpp
Go to the documentation of this file.
#ifndef __MATRIX__
#define __MATRIX__
#include <armadillo>
arma::mat create_tridiagonal(
const arma::vec& a,
const arma::vec& d,
const arma::vec& e);
arma::mat create_tridiagonal(int n, double a, double d, double e);
arma::mat create_symmetric_tridiagonal(int n, double a, double d);
double max_offdiag_symmetric(arma::mat& A, int& k, int& l);
#endif
create_symmetric_tridiagonal
arma::mat create_symmetric_tridiagonal(int n, double a, double d)
Create a symmetric tridiagonal matrix.
Definition: matrix.cpp:44
create_tridiagonal
arma::mat create_tridiagonal(const arma::vec &a, const arma::vec &d, const arma::vec &e)
Create a tridiagonal matrix.
Definition: matrix.cpp:12
max_offdiag_symmetric
double max_offdiag_symmetric(arma::mat &A, int &k, int &l)
Find the off-diagonal element with the largest absolute value.
Definition: matrix.cpp:49