mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
Loading...
Searching...
No Matches
SVD Row and Column Deletion Unit Tests

Tests of SVD row and column deletion against direct singular value decompositions.

See also
SVD Row and Column Deletion

Functions

 unitTest::math_svdDowndate_test::TEST_CASE ("SVD row deletion matches direct full SVDs", "[math::svdDowndate][rows]")
 SVD row deletion matches direct full SVDs.
 unitTest::math_svdDowndate_test::TEST_CASE ("SVD column deletion matches direct full SVDs", "[math::svdDowndate][columns]")
 SVD column deletion matches direct full SVDs.
 unitTest::math_svdDowndate_test::TEST_CASE ("SVD deletion core entry points agree", "[math::svdDowndate][core]")
 SVD deletion core entry points agree.
 unitTest::math_svdDowndate_test::TEST_CASE ("Rank-one secular SVD deletion matches direct row and column SVDs", "[math::svdDowndate][rankOneSecular]")
 Rank-one secular SVD deletion matches direct row and column SVDs.
 unitTest::math_svdDowndate_test::TEST_CASE ("Rank-one secular SVD deletion handles deflation and leverage edge cases", "[math::svdDowndate][rankOneSecular][conditioning]")
 Rank-one secular SVD deletion handles deflation and leverage edge cases.
 unitTest::math_svdDowndate_test::TEST_CASE ("Rank-one secular SVD deletion supports float and enforces its deletion contract", "[math::svdDowndate][rankOneSecular][float][errors]")
 Rank-one secular SVD deletion supports float and enforces its deletion contract.
 unitTest::math_svdDowndate_test::TEST_CASE ("Rank-one secular SVD deletion reports solver failures", "[math::svdDowndate][rankOneSecular][errors][solver]")
 Rank-one secular SVD deletion reports solver failures.
 unitTest::math_svdDowndate_test::TEST_CASE ("SVD deletion preserves the projected-factor contract", "[math::svdDowndate][projected]")
 SVD deletion preserves the projected-factor contract.
 unitTest::math_svdDowndate_test::TEST_CASE ("SVD deletion handles repeated and high-leverage systems", "[math::svdDowndate][conditioning]")
 SVD deletion handles repeated and high-leverage systems.
 unitTest::math_svdDowndate_test::TEST_CASE ("SVD deletion is invariant across finite scales", "[math::svdDowndate][scaling]")
 SVD deletion is invariant across finite scales.
 unitTest::math_svdDowndate_test::TEST_CASE ("SVD deletion handles structural and numerical edge cases", "[math::svdDowndate][rank]")
 SVD deletion handles structural and numerical edge cases.
 unitTest::math_svdDowndate_test::TEST_CASE ("SVD deletion supports float and workspace reuse", "[math::svdDowndate][float][workspace]")
 SVD deletion supports float and workspace reuse.
 unitTest::math_svdDowndate_test::TEST_CASE ("SVD deletion accepts views and reuses prepared capacity", "[math::svdDowndate][workspace][views]")
 SVD deletion accepts views and reuses prepared capacity.
 unitTest::math_svdDowndate_test::TEST_CASE ("SVD deletion accepts under-aligned consumer storage", "[math::svdDowndate][abi][alignment]")
 SVD deletion accepts under-aligned consumer storage.
 unitTest::math_svdDowndate_test::TEST_CASE ("SVD deletion accepts a default empty ABI index descriptor", "[math::svdDowndate][abi][identity]")
 SVD deletion accepts a default empty ABI index descriptor.
 unitTest::math_svdDowndate_test::TEST_CASE ("SVD deletion rejects malformed ABI descriptors", "[math::svdDowndate][abi][errors]")
 SVD deletion rejects malformed ABI descriptors.
 unitTest::math_svdDowndate_test::TEST_CASE ("SVD deletion reports invalid inputs and allocation failures", "[math::svdDowndate][errors]")
 SVD deletion reports invalid inputs and allocation failures.
 unitTest::math_svdDowndate_test::TEST_CASE ("SVD deletion reports workspace query failures", "[math::svdDowndate][errors][query]")
 SVD deletion reports workspace query failures.
 unitTest::math_svdDowndate_test::TEST_CASE ("SVD deletion reports numerical solver outcomes", "[math::svdDowndate][errors][solver]")
 SVD deletion reports numerical solver outcomes.
 unitTest::math_svdDowndate_test::TEST_CASE ("SVD deletion reports rescaling overflow", "[math::svdDowndate][errors][overflow]")
 SVD deletion reports rescaling overflow.

Function Documentation

◆ TEST_CASE() [1/20]

unitTest::math_svdDowndate_test::TEST_CASE ( "Rank-one secular SVD deletion handles deflation and leverage edge cases" ,
"" [math::svdDowndate][rankOneSecular][conditioning] )

Rank-one secular SVD deletion handles deflation and leverage edge cases.

Verifies exact and clustered repeated singular values, zero singular values, zero-leverage deletion, and high-leverage deletion through svdRemoveRows with the rankOneSecular backend.

Definition at line 704 of file svdDowndate_test.cpp.

References mx::math::svdDeletionResult< realT, abiT >::rotation(), mx::math::svdDeletionResult< realT, abiT >::singularValues(), mx::math::svdDeletionResult< realT, abiT >::squaredSingularValues(), mx::math::svdDeletionSucceeded(), mx::math::svdRemoveRows(), and mx::math::validateSvdDeletionFactor().

◆ TEST_CASE() [2/20]

unitTest::math_svdDowndate_test::TEST_CASE ( "Rank-one secular SVD deletion matches direct row and column SVDs" ,
"" [math::svdDowndate][rankOneSecular] )

Rank-one secular SVD deletion matches direct row and column SVDs.

Verifies that svdRemoveRows and svdRemoveColumns with the rankOneSecular backend reproduce direct full SVDs while publishing either the complete eigensystem or a requested leading prefix.

Definition at line 623 of file svdDowndate_test.cpp.

References mx::math::svdDeletionResult< realT, abiT >::backend(), mx::math::svdDeletionResult< realT, abiT >::outputRank(), mx::math::svdDeletionResult< realT, abiT >::rotation(), mx::math::svdDeletionResult< realT, abiT >::singularValues(), mx::math::svdRemoveColumns(), and mx::math::svdRemoveRows().

◆ TEST_CASE() [3/20]

unitTest::math_svdDowndate_test::TEST_CASE ( "Rank-one secular SVD deletion reports solver failures" ,
"" [math::svdDowndate][rankOneSecular][errors][solver] )

Rank-one secular SVD deletion reports solver failures.

Verifies LAED9 failure, non-finite output, invalid ordering and interlacing, vector norm and residual validation, and roundoff clamping through svdDeletionCore with the rankOneSecular backend.

Definition at line 1033 of file svdDowndate_test.cpp.

References mx::math::svdDeletionResult< realT, abiT >::clampedEigenvalues(), mx::math::svdDeletionResult< realT, abiT >::lapackInfo(), mx::math::svdDeletionResult< realT, abiT >::squaredSingularValues(), and mx::math::svdDeletionCore().

◆ TEST_CASE() [4/20]

unitTest::math_svdDowndate_test::TEST_CASE ( "Rank-one secular SVD deletion supports float and enforces its deletion contract" ,
"" [math::svdDowndate][rankOneSecular][float][errors] )

◆ TEST_CASE() [5/20]

unitTest::math_svdDowndate_test::TEST_CASE ( "SVD column deletion matches direct full SVDs" ,
"" [math::svdDowndate][columns] )

SVD column deletion matches direct full SVDs.

Verifies that svdRemoveColumns reproduces direct full SVDs and the row-deletion transpose dual.

Definition at line 519 of file svdDowndate_test.cpp.

References mx::math::svdDeletionBackendName(), mx::math::svdDeletionSucceeded(), and mx::math::svdRemoveColumns().

◆ TEST_CASE() [6/20]

unitTest::math_svdDowndate_test::TEST_CASE ( "SVD deletion accepts a default empty ABI index descriptor" ,
"" [math::svdDowndate][abi][identity] )

SVD deletion accepts a default empty ABI index descriptor.

Verifies that the raw svdRemoveRowsAbiV2 entry point treats a default-constructed empty index descriptor as an identity deletion.

Definition at line 1634 of file svdDowndate_test.cpp.

References mx::math::svdDeletionResult< realT, abiT >::rotation(), and mx::math::svdDeletionResult< realT, abiT >::singularValues().

◆ TEST_CASE() [7/20]

unitTest::math_svdDowndate_test::TEST_CASE ( "SVD deletion accepts under-aligned consumer storage" ,
"" [math::svdDowndate][abi][alignment] )

SVD deletion accepts under-aligned consumer storage.

Verifies that validateSvdDeletionFactor and svdRemoveRows use unaligned raw views at the shared-library boundary when the consumer's Eigen packet-alignment setting is smaller than mxlib's setting.

Definition at line 1580 of file svdDowndate_test.cpp.

References mx::math::svdDeletionResult< realT, abiT >::rotation(), mx::math::svdDeletionResult< realT, abiT >::singularValues(), mx::math::svdRemoveRows(), and mx::math::validateSvdDeletionFactor().

◆ TEST_CASE() [8/20]

unitTest::math_svdDowndate_test::TEST_CASE ( "SVD deletion accepts views and reuses prepared capacity" ,
"" [math::svdDowndate][workspace][views] )

◆ TEST_CASE() [9/20]

unitTest::math_svdDowndate_test::TEST_CASE ( "SVD deletion core entry points agree" ,
"" [math::svdDowndate][core] )

◆ TEST_CASE() [10/20]

unitTest::math_svdDowndate_test::TEST_CASE ( "SVD deletion handles repeated and high-leverage systems" ,
"" [math::svdDowndate][conditioning] )

SVD deletion handles repeated and high-leverage systems.

Verifies repeated spectra, high-leverage deletion, and the one-row exact deletion invariant through svdRemoveRows without comparing ambiguous individual singular vectors.

Definition at line 1184 of file svdDowndate_test.cpp.

References mx::math::svdDeletionResult< realT, abiT >::singularValues(), mx::math::svdDeletionResult< realT, abiT >::squaredSingularValues(), mx::math::svdDeletionBackendName(), mx::math::svdDeletionSucceeded(), mx::math::svdRemoveRows(), and mx::math::validateSvdDeletionFactor().

◆ TEST_CASE() [11/20]

unitTest::math_svdDowndate_test::TEST_CASE ( "SVD deletion handles structural and numerical edge cases" ,
"" [math::svdDowndate][rank] )

◆ TEST_CASE() [12/20]

unitTest::math_svdDowndate_test::TEST_CASE ( "SVD deletion is invariant across finite scales" ,
"" [math::svdDowndate][scaling] )

SVD deletion is invariant across finite scales.

Verifies exponent-safe scale invariance of svdRemoveRows for very large and very small finite spectra.

Definition at line 1288 of file svdDowndate_test.cpp.

References mx::math::svdDeletionResult< realT, abiT >::singularValues(), mx::math::svdDeletionResult< realT, abiT >::squaredSingularValues(), mx::math::svdDeletionSucceeded(), and mx::math::svdRemoveRows().

◆ TEST_CASE() [13/20]

unitTest::math_svdDowndate_test::TEST_CASE ( "SVD deletion preserves the projected-factor contract" ,
"" [math::svdDowndate][projected] )

SVD deletion preserves the projected-factor contract.

Verifies that truncated-factor deletion matches a direct SVD of the represented low-rank matrix, not the original full-rank matrix, through svdRemoveRows and svdRemoveColumns.

Definition at line 1132 of file svdDowndate_test.cpp.

References mx::math::svdDeletionSucceeded(), mx::math::svdRemoveColumns(), and mx::math::svdRemoveRows().

◆ TEST_CASE() [14/20]

unitTest::math_svdDowndate_test::TEST_CASE ( "SVD deletion rejects malformed ABI descriptors" ,
"" [math::svdDowndate][abi][errors] )

SVD deletion rejects malformed ABI descriptors.

Verifies the ABI-v2 raw entry points reject vector, matrix, and index descriptors whose claimed storage cannot be addressed safely.

Definition at line 1665 of file svdDowndate_test.cpp.

References mx::math::svdDeletionResult< realT, abiT >::prepare(), and mx::math::svdDeletionSucceeded().

◆ TEST_CASE() [15/20]

unitTest::math_svdDowndate_test::TEST_CASE ( "SVD deletion reports invalid inputs and allocation failures" ,
"" [math::svdDowndate][errors] )

◆ TEST_CASE() [16/20]

unitTest::math_svdDowndate_test::TEST_CASE ( "SVD deletion reports numerical solver outcomes" ,
"" [math::svdDowndate][errors][solver] )

◆ TEST_CASE() [17/20]

unitTest::math_svdDowndate_test::TEST_CASE ( "SVD deletion reports rescaling overflow" ,
"" [math::svdDowndate][errors][overflow] )

SVD deletion reports rescaling overflow.

Verifies explicit squared-result overflow reporting in unchanged, leading-core, and stable-core deletion paths.

Definition at line 2186 of file svdDowndate_test.cpp.

References mx::math::svdDeletionResult< realT, abiT >::singularValues(), mx::math::svdDeletionResult< realT, abiT >::squaredSingularValues(), mx::math::svdDeletionBackendName(), and mx::math::svdRemoveRows().

◆ TEST_CASE() [18/20]

unitTest::math_svdDowndate_test::TEST_CASE ( "SVD deletion reports workspace query failures" ,
"" [math::svdDowndate][errors][query] )

◆ TEST_CASE() [19/20]

unitTest::math_svdDowndate_test::TEST_CASE ( "SVD deletion supports float and workspace reuse" ,
"" [math::svdDowndate][float][workspace] )

◆ TEST_CASE() [20/20]

unitTest::math_svdDowndate_test::TEST_CASE ( "SVD row deletion matches direct full SVDs" ,
"" [math::svdDowndate][rows] )

SVD row deletion matches direct full SVDs.

Verifies that svdRemoveRows reproduces direct full SVDs for complete tall, wide, and square factors.

Definition at line 479 of file svdDowndate_test.cpp.

References mx::math::svdDeletionResult< realT, abiT >::backend(), mx::math::svdDeletionBackendName(), mx::math::svdDeletionSucceeded(), and mx::math::svdRemoveRows().