Namespaces | Functions | Variables
testMatrix.cpp File Reference

Unit test for Matrix Library. More...

#include <gtsam/base/Matrix.h>
#include <gtsam/base/VectorSpace.h>
#include <gtsam/base/testLie.h>
#include <CppUnitLite/TestHarness.h>
#include <iostream>
#include <sstream>
#include <optional>
#include <functional>
Include dependency graph for testMatrix.cpp:

Go to the source code of this file.

Namespaces

 cholesky
 

Functions

int main ()
 
 TEST (Matrix, AbsoluteError)
 
 TEST (Matrix, addition)
 
 TEST (Matrix, addition_in_place)
 
 TEST (Matrix, backsubtitution)
 
 TEST (Matrix, cholesky_inverse)
 
 TEST (Matrix, col_major)
 
 TEST (Matrix, col_major_access)
 
 TEST (Matrix, collect1)
 
 TEST (Matrix, collect2)
 
 TEST (Matrix, collect3)
 
 TEST (Matrix, column)
 
 TEST (Matrix, constructor_data)
 
 TEST (Matrix, diagMatrices)
 
 TEST (Matrix, DLT)
 
 TEST (Matrix, eigen_QR)
 
 TEST (Matrix, equal)
 
 TEST (Matrix, equal_nan)
 
 TEST (Matrix, householder)
 
 TEST (Matrix, householder_colMajor)
 
 TEST (Matrix, insert_sub)
 
 TEST (Matrix, inverse)
 
 TEST (Matrix, inverse2)
 
 TEST (Matrix, inverse_square_root)
 
 TEST (Matrix, linear_dependent)
 
 TEST (Matrix, linear_dependent2)
 
 TEST (Matrix, linear_dependent3)
 
 TEST (Matrix, LLt)
 
 TEST (Matrix, Matrix24IsVectorSpace)
 
 TEST (Matrix, Matrix_)
 
 TEST (Matrix, matrix_vector_multiplication)
 
 TEST (Matrix, MatrixIsVectorSpace)
 
 TEST (Matrix, MatrixRef)
 
 TEST (Matrix, multiplication)
 
 TEST (Matrix, nrRowsAndnrCols)
 
 TEST (Matrix, qr)
 
 TEST (Matrix, row)
 
 TEST (Matrix, RowMajorIsVectorSpace)
 
 TEST (Matrix, RowVectorIsVectorSpace)
 
 TEST (Matrix, RtR)
 
 TEST (Matrix, scalar_divide)
 
 TEST (Matrix, scalar_matrix_multiplication)
 
 TEST (Matrix, scale_columns)
 
 TEST (Matrix, scale_rows)
 
 TEST (Matrix, scale_rows_mask)
 
 TEST (Matrix, skewSymmetric)
 
 TEST (Matrix, special_comma_initializer)
 
 TEST (Matrix, stack)
 
 TEST (Matrix, stream_read)
 
 TEST (Matrix, sub)
 
 TEST (Matrix, subtraction)
 
 TEST (Matrix, subtraction_in_place)
 
 TEST (Matrix, svd1)
 
 TEST (Matrix, svd2)
 
 TEST (Matrix, svd3)
 
 TEST (Matrix, svd4)
 
 TEST (Matrix, trans)
 
 TEST (Matrix, VectorIsVectorSpace)
 
 TEST (Matrix, weighted_elimination)
 

Variables

Matrix cholesky::expected
 
static double inf = std::numeric_limits<double>::infinity()
 
Matrix cholesky::M
 
static Matrix sampleA = (Matrix(3, 2) << 0.,-2., 0., 0., 3., 0.).finished()
 Sample A matrix for SVD. More...
 
static Matrix sampleAt = trans(sampleA)
 
static const double tol = 1e-9
 

Detailed Description

Unit test for Matrix Library.

Author
Christian Potthast
Carlos Nieto

Definition in file testMatrix.cpp.

Function Documentation

◆ main()

int main ( )

Definition at line 1147 of file testMatrix.cpp.

◆ TEST() [1/58]

TEST ( Matrix  ,
AbsoluteError   
)

Definition at line 1122 of file testMatrix.cpp.

◆ TEST() [2/58]

TEST ( Matrix  ,
addition   
)

Definition at line 482 of file testMatrix.cpp.

◆ TEST() [3/58]

TEST ( Matrix  ,
addition_in_place   
)

Definition at line 491 of file testMatrix.cpp.

◆ TEST() [4/58]

TEST ( Matrix  ,
backsubtitution   
)

Definition at line 676 of file testMatrix.cpp.

◆ TEST() [5/58]

TEST ( Matrix  ,
cholesky_inverse   
)

Definition at line 932 of file testMatrix.cpp.

◆ TEST() [6/58]

TEST ( Matrix  ,
col_major   
)

Definition at line 108 of file testMatrix.cpp.

◆ TEST() [7/58]

TEST ( Matrix  ,
col_major_access   
)

Definition at line 832 of file testMatrix.cpp.

◆ TEST() [8/58]

TEST ( Matrix  ,
collect1   
)

Definition at line 119 of file testMatrix.cpp.

◆ TEST() [9/58]

TEST ( Matrix  ,
collect2   
)

Definition at line 136 of file testMatrix.cpp.

◆ TEST() [10/58]

TEST ( Matrix  ,
collect3   
)

Definition at line 156 of file testMatrix.cpp.

◆ TEST() [11/58]

TEST ( Matrix  ,
column   
)

Definition at line 196 of file testMatrix.cpp.

◆ TEST() [12/58]

TEST ( Matrix  ,
constructor_data   
)

Definition at line 35 of file testMatrix.cpp.

◆ TEST() [13/58]

TEST ( Matrix  ,
diagMatrices   
)

Definition at line 249 of file testMatrix.cpp.

◆ TEST() [14/58]

TEST ( Matrix  ,
DLT   
)

Definition at line 1074 of file testMatrix.cpp.

◆ TEST() [15/58]

TEST ( Matrix  ,
eigen_QR   
)

Definition at line 759 of file testMatrix.cpp.

◆ TEST() [16/58]

TEST ( Matrix  ,
equal   
)

Definition at line 423 of file testMatrix.cpp.

◆ TEST() [17/58]

TEST ( Matrix  ,
equal_nan   
)

Definition at line 453 of file testMatrix.cpp.

◆ TEST() [18/58]

TEST ( Matrix  ,
householder   
)

Definition at line 701 of file testMatrix.cpp.

◆ TEST() [19/58]

TEST ( Matrix  ,
householder_colMajor   
)

Definition at line 730 of file testMatrix.cpp.

◆ TEST() [20/58]

TEST ( Matrix  ,
insert_sub   
)

Definition at line 234 of file testMatrix.cpp.

◆ TEST() [21/58]

TEST ( Matrix  ,
inverse   
)

Definition at line 600 of file testMatrix.cpp.

◆ TEST() [22/58]

TEST ( Matrix  ,
inverse2   
)

Definition at line 646 of file testMatrix.cpp.

◆ TEST() [23/58]

TEST ( Matrix  ,
inverse_square_root   
)

Definition at line 871 of file testMatrix.cpp.

◆ TEST() [24/58]

TEST ( Matrix  ,
linear_dependent   
)

Definition at line 938 of file testMatrix.cpp.

◆ TEST() [25/58]

TEST ( Matrix  ,
linear_dependent2   
)

Definition at line 946 of file testMatrix.cpp.

◆ TEST() [26/58]

TEST ( Matrix  ,
linear_dependent3   
)

Definition at line 954 of file testMatrix.cpp.

◆ TEST() [27/58]

TEST ( Matrix  ,
LLt   
)

Definition at line 923 of file testMatrix.cpp.

◆ TEST() [28/58]

TEST ( Matrix  ,
Matrix24IsVectorSpace   
)

Definition at line 1094 of file testMatrix.cpp.

◆ TEST() [29/58]

TEST ( Matrix  ,
Matrix_   
)

Definition at line 49 of file testMatrix.cpp.

◆ TEST() [30/58]

TEST ( Matrix  ,
matrix_vector_multiplication   
)

Definition at line 560 of file testMatrix.cpp.

◆ TEST() [31/58]

TEST ( Matrix  ,
MatrixIsVectorSpace   
)

Definition at line 1105 of file testMatrix.cpp.

◆ TEST() [32/58]

TEST ( Matrix  ,
MatrixRef   
)

Definition at line 1137 of file testMatrix.cpp.

◆ TEST() [33/58]

TEST ( Matrix  ,
multiplication   
)

Definition at line 520 of file testMatrix.cpp.

◆ TEST() [34/58]

TEST ( Matrix  ,
nrRowsAndnrCols   
)

Definition at line 574 of file testMatrix.cpp.

◆ TEST() [35/58]

TEST ( Matrix  ,
qr   
)

Definition at line 790 of file testMatrix.cpp.

◆ TEST() [36/58]

TEST ( Matrix  ,
row   
)

Definition at line 215 of file testMatrix.cpp.

◆ TEST() [37/58]

TEST ( Matrix  ,
RowMajorIsVectorSpace   
)

Definition at line 1098 of file testMatrix.cpp.

◆ TEST() [38/58]

TEST ( Matrix  ,
RowVectorIsVectorSpace   
)

Definition at line 1113 of file testMatrix.cpp.

◆ TEST() [39/58]

TEST ( Matrix  ,
RtR   
)

Definition at line 927 of file testMatrix.cpp.

◆ TEST() [40/58]

TEST ( Matrix  ,
scalar_divide   
)

Definition at line 582 of file testMatrix.cpp.

◆ TEST() [41/58]

TEST ( Matrix  ,
scalar_matrix_multiplication   
)

Definition at line 540 of file testMatrix.cpp.

◆ TEST() [42/58]

TEST ( Matrix  ,
scale_columns   
)

Definition at line 293 of file testMatrix.cpp.

◆ TEST() [43/58]

TEST ( Matrix  ,
scale_rows   
)

Definition at line 331 of file testMatrix.cpp.

◆ TEST() [44/58]

TEST ( Matrix  ,
scale_rows_mask   
)

Definition at line 369 of file testMatrix.cpp.

◆ TEST() [45/58]

TEST ( Matrix  ,
skewSymmetric   
)

Definition at line 407 of file testMatrix.cpp.

◆ TEST() [46/58]

TEST ( Matrix  ,
special_comma_initializer   
)

Definition at line 79 of file testMatrix.cpp.

◆ TEST() [47/58]

TEST ( Matrix  ,
stack   
)

Definition at line 173 of file testMatrix.cpp.

◆ TEST() [48/58]

TEST ( Matrix  ,
stream_read   
)

Definition at line 273 of file testMatrix.cpp.

◆ TEST() [49/58]

TEST ( Matrix  ,
sub   
)

Definition at line 812 of file testMatrix.cpp.

◆ TEST() [50/58]

TEST ( Matrix  ,
subtraction   
)

Definition at line 501 of file testMatrix.cpp.

◆ TEST() [51/58]

TEST ( Matrix  ,
subtraction_in_place   
)

Definition at line 510 of file testMatrix.cpp.

◆ TEST() [52/58]

TEST ( Matrix  ,
svd1   
)

Definition at line 962 of file testMatrix.cpp.

◆ TEST() [53/58]

TEST ( Matrix  ,
svd2   
)

Definition at line 981 of file testMatrix.cpp.

◆ TEST() [54/58]

TEST ( Matrix  ,
svd3   
)

Definition at line 1004 of file testMatrix.cpp.

◆ TEST() [55/58]

TEST ( Matrix  ,
svd4   
)

Definition at line 1032 of file testMatrix.cpp.

◆ TEST() [56/58]

TEST ( Matrix  ,
trans   
)

Definition at line 824 of file testMatrix.cpp.

◆ TEST() [57/58]

TEST ( Matrix  ,
VectorIsVectorSpace   
)

Definition at line 1109 of file testMatrix.cpp.

◆ TEST() [58/58]

TEST ( Matrix  ,
weighted_elimination   
)

Definition at line 840 of file testMatrix.cpp.

Variable Documentation

◆ inf

double inf = std::numeric_limits<double>::infinity()
static

Definition at line 31 of file testMatrix.cpp.

◆ sampleA

Matrix sampleA = (Matrix(3, 2) << 0.,-2., 0., 0., 3., 0.).finished()
static

Sample A matrix for SVD.

Definition at line 977 of file testMatrix.cpp.

◆ sampleAt

Matrix sampleAt = trans(sampleA)
static

Definition at line 978 of file testMatrix.cpp.

◆ tol

const double tol = 1e-9
static

Definition at line 32 of file testMatrix.cpp.



gtsam
Author(s):
autogenerated on Wed Mar 19 2025 03:09:13