|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Exhaustive tests for al-matrix.H (sparse matrix with generic domains) More...
#include <gtest/gtest.h>#include <cmath>#include <string>#include <vector>#include <al-domain.H>#include <al-vector.H>#include <al-matrix.H>Go to the source code of this file.
Functions | |
| TEST (MatrixConstruction, EmptyMatrixHasZeroEntries) | |
| TEST (MatrixConstruction, InitializerListConstructor) | |
| TEST (MatrixConstruction, InitializerListWithZerosNotStored) | |
| TEST (MatrixConstruction, InitializerListRowMismatchThrows) | |
| TEST (MatrixConstruction, InitializerListColMismatchThrows) | |
| TEST (MatrixEntries, SetAndGetEntry) | |
| TEST (MatrixEntries, SetEntryToZeroRemovesIt) | |
| TEST (MatrixEntries, SetEntryWithinEpsilonIsZero) | |
| TEST (MatrixEntries, OverwriteEntry) | |
| TEST (MatrixEpsilon, GetAndSetEpsilon) | |
| TEST (MatrixEpsilon, NegativeEpsilonThrows) | |
| TEST (MatrixTranspose, TransposeSwapsRowsAndCols) | |
| TEST (MatrixTranspose, DoubleTransposeIsIdentity) | |
| TEST (MatrixExtraction, GetRowAsList) | |
| TEST (MatrixExtraction, GetColAsList) | |
| TEST (MatrixExtraction, GetRowVector) | |
| TEST (MatrixExtraction, GetColVector) | |
| TEST (MatrixExtraction, InvalidRowThrows) | |
| TEST (MatrixExtraction, InvalidColThrows) | |
| TEST (MatrixVectorMult, MatrixTimesVector) | |
| TEST (MatrixVectorMult, VectorTimesMatrix) | |
| TEST (MatrixVectorMult, SparseMultiplication) | |
| TEST (MatrixVectorMult, DotProductMethod) | |
| TEST (MatrixVectorMult, DomainMismatchThrows) | |
| TEST (MatrixAddition, AddTwoMatrices) | |
| TEST (MatrixAddition, AddInPlace) | |
| TEST (MatrixAddition, AddSparseMatrices) | |
| TEST (MatrixScalar, MultiplyByScalar) | |
| TEST (MatrixScalar, ScalarTimesMatrix) | |
| TEST (MatrixIdentity, CreateIdentity) | |
| TEST (MatrixIdentity, IdentityTimesVectorIsVector) | |
| TEST (MatrixEquality, EqualMatrices) | |
| TEST (MatrixEquality, UnequalMatrices) | |
| TEST (MatrixEquality, EqualWithinEpsilon) | |
| TEST (MatrixFactory, CreateByRows) | |
| TEST (MatrixFactory, CreateByColumns) | |
| TEST (MatrixConversion, ToRowList) | |
| TEST (MatrixConversion, ToColList) | |
| TEST (MatrixSetVector, SetVectorAsRow) | |
| TEST (MatrixSetVector, SetVectorAsCol) | |
| TEST (MatrixOuterProduct, BasicOuterProduct) | |
| TEST (MatrixGenericDomain, StringDomainMatrix) | |
| TEST (MatrixGenericDomain, StringDomainTranspose) | |
| TEST (MatrixString, ToStrDoesNotCrash) | |
| TEST (MatrixDomain, GetRowAndColDomain) | |
| TEST (MatrixDomain, RowAndColDomainList) | |
| TEST (MatrixSubtraction, SubtractTwoMatrices) | |
| TEST (MatrixSubtraction, SubtractInPlace) | |
| TEST (MatrixSubtraction, SubtractSparseMatrices) | |
| TEST (MatrixSubtraction, SubtractFromItself) | |
| TEST (MatrixSubtraction, DomainMismatchThrows) | |
| TEST (MatrixCopyMove, CopyConstructor) | |
| TEST (MatrixCopyMove, CopyAssignment) | |
| TEST (MatrixCopyMove, SelfAssignment) | |
| TEST (MatrixCopyMove, MoveConstructor) | |
| TEST (MatrixCopyMove, MoveAssignment) | |
| TEST (MatrixCopyMove, CopyPreservesEpsilon) | |
| TEST (MatrixSharedPtr, ConstructWithSharedPtrDomains) | |
| TEST (MatrixSharedPtr, DomainOutlivesLocalScope) | |
| TEST (MatrixSharedPtr, CopiedMatrixSharesDomain) | |
| TEST (MatrixSharedPtr, VectorWithSharedPtrDomain) | |
| TEST (MatrixSharedPtr, MatrixVectorMultWithSharedDomains) | |
| TEST (MatrixMultDomainIdentity, SameDomainWorks) | |
| TEST (MatrixMultDomainIdentity, DifferentDomainsThrows) | |
| TEST (MatrixMultDomainIdentity, ChainedMultiplicationWithSharedDomain) | |
Exhaustive tests for al-matrix.H (sparse matrix with generic domains)
Tests cover:
Definition in file al_matrix_test.cc.
| TEST | ( | MatrixAddition | , |
| AddInPlace | |||
| ) |
Definition at line 523 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixAddition | , |
| AddSparseMatrices | |||
| ) |
Definition at line 545 of file al_matrix_test.cc.
References Aleph::maps(), and Aleph::sum().
| TEST | ( | MatrixAddition | , |
| AddTwoMatrices | |||
| ) |
Definition at line 501 of file al_matrix_test.cc.
References Aleph::maps(), and Aleph::sum().
| TEST | ( | MatrixConstruction | , |
| EmptyMatrixHasZeroEntries | |||
| ) |
Definition at line 100 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixConstruction | , |
| InitializerListColMismatchThrows | |||
| ) |
Definition at line 161 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixConstruction | , |
| InitializerListConstructor | |||
| ) |
Definition at line 113 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixConstruction | , |
| InitializerListRowMismatchThrows | |||
| ) |
Definition at line 148 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixConstruction | , |
| InitializerListWithZerosNotStored | |||
| ) |
Definition at line 131 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixConversion | , |
| ToColList | |||
| ) |
Definition at line 780 of file al_matrix_test.cc.
References FunctionalMethods< Container, T >::for_each(), Aleph::maps(), and Aleph::HTList::size().
| TEST | ( | MatrixConversion | , |
| ToRowList | |||
| ) |
Definition at line 759 of file al_matrix_test.cc.
References FunctionalMethods< Container, T >::for_each(), Aleph::maps(), and Aleph::HTList::size().
| TEST | ( | MatrixCopyMove | , |
| CopyAssignment | |||
| ) |
Definition at line 1109 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixCopyMove | , |
| CopyConstructor | |||
| ) |
Definition at line 1089 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixCopyMove | , |
| CopyPreservesEpsilon | |||
| ) |
Definition at line 1181 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixCopyMove | , |
| MoveAssignment | |||
| ) |
Definition at line 1163 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixCopyMove | , |
| MoveConstructor | |||
| ) |
Definition at line 1146 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixCopyMove | , |
| SelfAssignment | |||
| ) |
Definition at line 1129 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixDomain | , |
| GetRowAndColDomain | |||
| ) |
Definition at line 952 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixDomain | , |
| RowAndColDomainList | |||
| ) |
Definition at line 963 of file al_matrix_test.cc.
References FunctionalMethods< Container, T >::for_each(), Aleph::maps(), and Aleph::HTList::size().
| TEST | ( | MatrixEntries | , |
| OverwriteEntry | |||
| ) |
Definition at line 216 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixEntries | , |
| SetAndGetEntry | |||
| ) |
Definition at line 179 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixEntries | , |
| SetEntryToZeroRemovesIt | |||
| ) |
Definition at line 193 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixEntries | , |
| SetEntryWithinEpsilonIsZero | |||
| ) |
Definition at line 206 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixEpsilon | , |
| GetAndSetEpsilon | |||
| ) |
Definition at line 231 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixEpsilon | , |
| NegativeEpsilonThrows | |||
| ) |
Definition at line 243 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixEquality | , |
| EqualMatrices | |||
| ) |
Definition at line 641 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixEquality | , |
| EqualWithinEpsilon | |||
| ) |
Definition at line 677 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixEquality | , |
| UnequalMatrices | |||
| ) |
Definition at line 659 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixExtraction | , |
| GetColAsList | |||
| ) |
Definition at line 316 of file al_matrix_test.cc.
References FunctionalMethods< Container, T >::for_each(), and Aleph::maps().
| TEST | ( | MatrixExtraction | , |
| GetColVector | |||
| ) |
Definition at line 352 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixExtraction | , |
| GetRowAsList | |||
| ) |
Definition at line 296 of file al_matrix_test.cc.
References FunctionalMethods< Container, T >::for_each(), Aleph::maps(), and Aleph::HTList::size().
| TEST | ( | MatrixExtraction | , |
| GetRowVector | |||
| ) |
Definition at line 335 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixExtraction | , |
| InvalidColThrows | |||
| ) |
Definition at line 378 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixExtraction | , |
| InvalidRowThrows | |||
| ) |
Definition at line 368 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixFactory | , |
| CreateByColumns | |||
| ) |
Definition at line 723 of file al_matrix_test.cc.
References Aleph::DynList< T >::append(), and Aleph::maps().
| TEST | ( | MatrixFactory | , |
| CreateByRows | |||
| ) |
Definition at line 694 of file al_matrix_test.cc.
References Aleph::DynList< T >::append(), and Aleph::maps().
| TEST | ( | MatrixGenericDomain | , |
| StringDomainMatrix | |||
| ) |
Definition at line 883 of file al_matrix_test.cc.
References Aleph::DynList< T >::insert(), and Aleph::maps().
| TEST | ( | MatrixGenericDomain | , |
| StringDomainTranspose | |||
| ) |
Definition at line 907 of file al_matrix_test.cc.
References Aleph::DynList< T >::insert(), and Aleph::maps().
| TEST | ( | MatrixIdentity | , |
| CreateIdentity | |||
| ) |
Definition at line 607 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixIdentity | , |
| IdentityTimesVectorIsVector | |||
| ) |
Definition at line 619 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixMultDomainIdentity | , |
| ChainedMultiplicationWithSharedDomain | |||
| ) |
Definition at line 1310 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixMultDomainIdentity | , |
| DifferentDomainsThrows | |||
| ) |
Definition at line 1297 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixMultDomainIdentity | , |
| SameDomainWorks | |||
| ) |
Definition at line 1280 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixOuterProduct | , |
| BasicOuterProduct | |||
| ) |
Definition at line 851 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixScalar | , |
| MultiplyByScalar | |||
| ) |
Definition at line 569 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixScalar | , |
| ScalarTimesMatrix | |||
| ) |
Definition at line 586 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixSetVector | , |
| SetVectorAsCol | |||
| ) |
Definition at line 826 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixSetVector | , |
| SetVectorAsRow | |||
| ) |
Definition at line 805 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixSharedPtr | , |
| ConstructWithSharedPtrDomains | |||
| ) |
Definition at line 1198 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixSharedPtr | , |
| CopiedMatrixSharesDomain | |||
| ) |
Definition at line 1228 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixSharedPtr | , |
| DomainOutlivesLocalScope | |||
| ) |
Definition at line 1216 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixSharedPtr | , |
| MatrixVectorMultWithSharedDomains | |||
| ) |
Definition at line 1256 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixSharedPtr | , |
| VectorWithSharedPtrDomain | |||
| ) |
Definition at line 1241 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixString | , |
| ToStrDoesNotCrash | |||
| ) |
Definition at line 935 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixSubtraction | , |
| DomainMismatchThrows | |||
| ) |
Definition at line 1073 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixSubtraction | , |
| SubtractFromItself | |||
| ) |
Definition at line 1056 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixSubtraction | , |
| SubtractInPlace | |||
| ) |
Definition at line 1014 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixSubtraction | , |
| SubtractSparseMatrices | |||
| ) |
Definition at line 1036 of file al_matrix_test.cc.
References Aleph::diff(), and Aleph::maps().
| TEST | ( | MatrixSubtraction | , |
| SubtractTwoMatrices | |||
| ) |
Definition at line 992 of file al_matrix_test.cc.
References Aleph::diff(), and Aleph::maps().
| TEST | ( | MatrixTranspose | , |
| DoubleTransposeIsIdentity | |||
| ) |
Definition at line 277 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixTranspose | , |
| TransposeSwapsRowsAndCols | |||
| ) |
Definition at line 256 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixVectorMult | , |
| DomainMismatchThrows | |||
| ) |
Definition at line 486 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixVectorMult | , |
| DotProductMethod | |||
| ) |
Definition at line 466 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixVectorMult | , |
| MatrixTimesVector | |||
| ) |
Definition at line 392 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixVectorMult | , |
| SparseMultiplication | |||
| ) |
Definition at line 444 of file al_matrix_test.cc.
References Aleph::maps().
| TEST | ( | MatrixVectorMult | , |
| VectorTimesMatrix | |||
| ) |
Definition at line 418 of file al_matrix_test.cc.
References Aleph::maps().