11 TestCase (
"tarch::la::GramSchmidtTest") {
24 for (
int i=0; i < 4; i++) {
25 for (
int j=0; j < 4; j++) {
26 double entry = 1.0 /
static_cast<double>(i + j + 1);
39 for (
int i=0; i < 4; i++) {
40 for (
int j=0; j < 4; j++) {
50 for (
int i=0; i < 4; i++) {
51 for (
int j=0; j < 4; j++) {
53 for (
int k=0; k < Q.cols(); k++ ) {
54 value += Q(i,k) * R(k,j);
#define validate(booleanExpr)
#define testMethod(name)
Run a test method and check for errors.
virtual void run() override
This routine is triggered by the TestCaseCollection.
GramSchmidtTest()
Cosntructor.
void testModifiedGramSchmidt()
Tests constructors.
DynamicMatrix transpose(const DynamicMatrix &matrix)
Matrix< Rows, Cols, Scalar > multiply(const Matrix< Rows, X, Scalar > &lhs, const Matrix< X, Cols, Scalar > &rhs)
Performs a matrix x matrix multiplication.
void modifiedGramSchmidt(Matrix< Rows, Cols, Scalar > A, Matrix< Rows, Cols, Scalar > &Q, Matrix< Cols, Cols, Scalar > &R)
Produces an economy-size QR decomposition of a matrix A, A is changed.
bool equals(const Matrix< Rows, Cols, Scalar > &lhs, const Matrix< Rows, Cols, Scalar > &rhs, const Scalar &tolerance=NUMERICAL_ZERO_DIFFERENCE)
Compares to matrices on equality by means of a numerical accuracy.