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

Reusable updates that remove rows or columns from matrices represented by thin singular value decompositions.

Representation and deletion equations

Let a rank- \(q\) matrix be represented by the thin singular value decomposition

\[A = U \Sigma V^T. \]

To remove physical rows with sorted index set \(R\), form \(F=U[R,:]\). The retained matrix obeys

\[A_{\bar R}^T A_{\bar R} = V \Sigma \left(I-F^T F\right) \Sigma V^T. \]

If \(W\) contains the eigenvectors or right singular vectors of the resulting rank- \(q\) core, the updated right singular directions are \(VW\). Column deletion is the transpose dual: use \(F=V[C,:]\) for deleted columns \(C\), and apply the returned rotation to the unchanged left factor as \(UW\).

Complete singular factors reproduce a direct SVD of the physically retained matrix. Truncated factors instead delete rows or columns exactly from the supplied rank- \(q\) approximation; discarded modes cannot be recovered.

Numerical backends

Both current implementations use dense LAPACK operations and have cubic asymptotic cost in \(q\). The API keeps the backend selectable so a future structured secular-equation implementation can preserve the same interface.

Contracts and outputs

Singular values must be finite, nonnegative, and descending. The deleted-side factor must have orthonormal columns; call mx::math::validateSvdDeletionFactor once for a new base factorization, outside repeated deletion loops. Deleted indices must be sorted, unique, and in range, the output rank must be nonzero and no larger than \(q\), and at least one physical row or column must remain.

A successful result contains all \(q\) updated singular values and squared singular values. Only the leading outputRank() columns of rotation() are published. Both mx::math::svdDeletionStatus::success and mx::math::svdDeletionStatus::successWithClamping are usable; test them with mx::math::svdDeletionSucceeded(). The latter records roundoff-scale negative eigenvalues clamped to zero.

Prepare mx::math::svdDeletionResult and mx::math::svdDeletionWorkspace for the largest planned output rank and deletion count before a hot loop. Later compatible operations reuse their allocations. Each concurrent worker must own an independent result and workspace.

Result and workspace objects are move-only handles whose Eigen and LAPACK storage is opaque and destroyed inside mxlib. Spectrum and rotation accessors return unaligned read-only views into result-owned storage; a view remains valid only until its result is prepared, assigned, moved, or destroyed. This ownership boundary permits consumers with different Eigen alignment/SIMD settings from mxlib's build, but it is not a promise of general binary compatibility across arbitrary compilers, C++ standard libraries, or Eigen ABIs.

Example: delete rows

The factors below are assumed to have been produced by an earlier thin SVD.

using realT = double;
using namespace mx::math;
bool deleteRows( Eigen::MatrixXd &updatedRight,
Eigen::VectorXd &updatedSingularValues,
const svdDeletionVector<realT> &singularValues,
const std::vector<Eigen::Index> &deletedRows,
Eigen::Index outputRank )
{
const svdDeletionStatus factorStatus = validateSvdDeletionFactor( U );
if( !svdDeletionSucceeded( factorStatus ) )
{
return false;
}
const svdDeletionStatus resultStatus = result.prepare( singularValues.size(), outputRank );
const svdDeletionStatus workspaceStatus =
workspace.prepare( singularValues.size(),
static_cast<Eigen::Index>( deletedRows.size() ),
if( !svdDeletionSucceeded( resultStatus ) || !svdDeletionSucceeded( workspaceStatus ) )
{
return false;
}
const svdDeletionStatus status = svdRemoveRows( result,
singularValues,
U,
deletedRows,
outputRank,
workspace );
if( !svdDeletionSucceeded( status ) )
{
// Inspect status, result.lapackInfo(), and other diagnostics here.
return false;
}
updatedRight = V.matrix() * result.rotation().matrix();
updatedSingularValues = result.singularValues().matrix().head( result.outputRank() );
return true;
}
Result of deleting rows or columns from a represented thin SVD.
MXLIB_SVD_DELETION_HEADER_ADAPTER svdDeletionStatus prepare(Eigen::Index baseRank, Eigen::Index outputRank)
Prepare or reuse output storage for a base and requested active output rank.
MXLIB_SVD_DELETION_HEADER_ADAPTER svdDeletionConstMatrixRef< realT > rotation() const noexcept
Return the preserved-side rotation, with updated directions in columns.
MXLIB_SVD_DELETION_HEADER_ADAPTER svdDeletionConstVectorRef< realT > singularValues() const noexcept
Return an unaligned borrowed view of all baseRank() descending updated singular values.
std::int64_t outputRank() const noexcept
Return the requested published rank.
Reusable, non-shared storage for SVD deletion operations.
MXLIB_SVD_DELETION_HEADER_ADAPTER svdDeletionStatus prepare(Eigen::Index baseRank, Eigen::Index maximumDeleted, svdDeletionBackend backend)
Prepare reusable storage and LAPACK work arrays.
svdDeletionStatus
Completion status for an SVD deletion operation.
MXLIB_SVD_DELETION_HEADER_ADAPTER svdDeletionStatus validateSvdDeletionFactor(svdDeletionConstMatrixRef< float > factor, float tolerance=0)
Validate that a supplied thin singular-vector factor has orthonormal columns.
Eigen::Array< realT, Eigen::Dynamic, 1 > svdDeletionVector
Dynamic column vector used by the SVD deletion API.
MXLIB_SVD_DELETION_HEADER_ADAPTER svdDeletionStatus svdRemoveRows(svdDeletionResult< realT > &result, std::type_identity_t< svdDeletionConstVectorRef< realT > > singularValues, std::type_identity_t< svdDeletionConstMatrixRef< realT > > leftFactor, std::span< const Eigen::Index > deletedIndices, Eigen::Index outputRank, svdDeletionWorkspace< realT > &workspace, svdDeletionBackend backend=svdDeletionBackend::stableCore)
Delete physical rows from the matrix represented by a thin SVD.
Eigen::Array< realT, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > svdDeletionMatrix
Column-major dynamic matrix used by the SVD deletion API.
bool svdDeletionSucceeded(svdDeletionStatus status) noexcept
Return true when a status represents usable numerical output.
@ stableCore
Complement-preserving small SVD; avoids squaring singular-value conditioning.

For column deletion, pass \(V\) to mx::math::svdRemoveColumns() and apply the returned rotation to \(U\).

See also
SVD Row and Column Deletion Unit Tests

Classes

struct  mx::math::svdDeletionConstVectorViewV2< realT >
 ABI-stable borrowed contiguous-vector storage descriptor. More...
struct  mx::math::svdDeletionConstMatrixViewV2< realT >
 ABI-stable borrowed column-major matrix storage descriptor. More...
struct  mx::math::svdDeletionConstIndexViewV2
 ABI-stable borrowed signed-index storage descriptor. More...
struct  mx::math::svdDeletionAbiV2Tag
 Type-level ABI tag for the second-generation opaque SVD deletion handles. More...
class  mx::math::svdDeletionResult< realT, abiT >
 Result of deleting rows or columns from a represented thin SVD. More...
class  mx::math::svdDeletionWorkspace< realT, abiT >
 Reusable, non-shared storage for SVD deletion operations. More...

Typedefs

template<typename realT>
using mx::math::svdDeletionMatrix = Eigen::Array<realT, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor>
 Column-major dynamic matrix used by the SVD deletion API.
template<typename realT>
using mx::math::svdDeletionVector = Eigen::Array<realT, Eigen::Dynamic, 1>
 Dynamic column vector used by the SVD deletion API.
template<typename realT>
using mx::math::svdDeletionConstMatrixRef = Eigen::Ref<const svdDeletionMatrix<realT>>
 Non-owning read-only reference to a compatible column-major SVD deletion matrix.
template<typename realT>
using mx::math::svdDeletionConstVectorRef = Eigen::Ref<const svdDeletionVector<realT>>
 Non-owning read-only reference to a compatible SVD deletion vector.

Enumerations

enum class  mx::math::svdDeletionBackend { svdDeletionBackend::leadingCovariance , svdDeletionBackend::stableCore , svdDeletionBackend::rankOneSecular }
 Numerical backend used to delete rows or columns from thin-SVD factors. More...
enum class  mx::math::svdDeletionStatus {
  svdDeletionStatus::notComputed , svdDeletionStatus::success , svdDeletionStatus::successWithClamping , svdDeletionStatus::invalidInput ,
  svdDeletionStatus::allocationFailure , svdDeletionStatus::workspaceQueryFailure , svdDeletionStatus::solverFailure , svdDeletionStatus::nonFiniteOutput ,
  svdDeletionStatus::invalidSolverOutput , svdDeletionStatus::rescalingOverflow , svdDeletionStatus::nonPositiveSemidefinite , svdDeletionStatus::factorNotOrthonormal ,
  svdDeletionStatus::unsupportedDeletionCount
}
 Completion status for an SVD deletion operation. More...

Functions

const char * mx::math::svdDeletionBackendName (svdDeletionBackend backend)
 Return a stable text representation of an SVD deletion backend.
const char * mx::math::svdDeletionStatusName (svdDeletionStatus status)
 Return a stable text representation of an SVD deletion status.
bool mx::math::svdDeletionSucceeded (svdDeletionStatus status) noexcept
 Return true when a status represents usable numerical output.
MXLIB_SVD_DELETION_HEADER_ADAPTER svdDeletionStatus mx::math::validateSvdDeletionFactor (svdDeletionConstMatrixRef< float > factor, float tolerance=0)
 Validate that a supplied thin singular-vector factor has orthonormal columns.
MXLIB_SVD_DELETION_HEADER_ADAPTER svdDeletionStatus mx::math::validateSvdDeletionFactor (svdDeletionConstMatrixRef< double > factor, double tolerance=0)
 Validate that a supplied double-precision thin singular-vector factor has orthonormal columns.
template<typename realT>
MXLIB_SVD_DELETION_HEADER_ADAPTER svdDeletionStatus mx::math::svdDeletionLeadingCore (svdDeletionResult< realT > &result, std::type_identity_t< svdDeletionConstVectorRef< realT > > singularValues, std::type_identity_t< svdDeletionConstMatrixRef< realT > > deletedRows, Eigen::Index outputRank, svdDeletionWorkspace< realT > &workspace)
 Delete supplied singular-factor rows with the full-spectrum symmetric covariance core.
template<typename realT>
MXLIB_SVD_DELETION_HEADER_ADAPTER svdDeletionStatus mx::math::svdDeletionStableCore (svdDeletionResult< realT > &result, std::type_identity_t< svdDeletionConstVectorRef< realT > > singularValues, std::type_identity_t< svdDeletionConstMatrixRef< realT > > deletedRows, Eigen::Index outputRank, svdDeletionWorkspace< realT > &workspace)
 Delete supplied singular-factor rows with the complement-preserving small-SVD core.
template<typename realT>
MXLIB_SVD_DELETION_HEADER_ADAPTER svdDeletionStatus mx::math::svdDeletionCore (svdDeletionResult< realT > &result, std::type_identity_t< svdDeletionConstVectorRef< realT > > singularValues, std::type_identity_t< svdDeletionConstMatrixRef< realT > > deletedRows, Eigen::Index outputRank, svdDeletionWorkspace< realT > &workspace, svdDeletionBackend backend=svdDeletionBackend::stableCore)
 Delete supplied singular-factor rows with an explicitly selected backend.
template<typename realT>
MXLIB_SVD_DELETION_HEADER_ADAPTER svdDeletionStatus mx::math::svdRemoveRows (svdDeletionResult< realT > &result, std::type_identity_t< svdDeletionConstVectorRef< realT > > singularValues, std::type_identity_t< svdDeletionConstMatrixRef< realT > > leftFactor, std::span< const Eigen::Index > deletedIndices, Eigen::Index outputRank, svdDeletionWorkspace< realT > &workspace, svdDeletionBackend backend=svdDeletionBackend::stableCore)
 Delete physical rows from the matrix represented by a thin SVD.
template<typename realT>
MXLIB_SVD_DELETION_HEADER_ADAPTER svdDeletionStatus mx::math::svdRemoveColumns (svdDeletionResult< realT > &result, std::type_identity_t< svdDeletionConstVectorRef< realT > > singularValues, std::type_identity_t< svdDeletionConstMatrixRef< realT > > rightFactor, std::span< const Eigen::Index > deletedIndices, Eigen::Index outputRank, svdDeletionWorkspace< realT > &workspace, svdDeletionBackend backend=svdDeletionBackend::stableCore)
 Delete physical columns from the matrix represented by a thin SVD.

Typedef Documentation

◆ svdDeletionConstMatrixRef

template<typename realT>
using mx::math::svdDeletionConstMatrixRef = Eigen::Ref<const svdDeletionMatrix<realT>>

Non-owning read-only reference to a compatible column-major SVD deletion matrix.

Definition at line 99 of file svdDowndate.hpp.

◆ svdDeletionConstVectorRef

template<typename realT>
using mx::math::svdDeletionConstVectorRef = Eigen::Ref<const svdDeletionVector<realT>>

Non-owning read-only reference to a compatible SVD deletion vector.

Definition at line 103 of file svdDowndate.hpp.

◆ svdDeletionMatrix

template<typename realT>
using mx::math::svdDeletionMatrix = Eigen::Array<realT, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor>

Column-major dynamic matrix used by the SVD deletion API.

Definition at line 91 of file svdDowndate.hpp.

◆ svdDeletionVector

template<typename realT>
using mx::math::svdDeletionVector = Eigen::Array<realT, Eigen::Dynamic, 1>

Dynamic column vector used by the SVD deletion API.

Definition at line 95 of file svdDowndate.hpp.

Enumeration Type Documentation

◆ svdDeletionBackend

enum class mx::math::svdDeletionBackend
strong

Numerical backend used to delete rows or columns from thin-SVD factors.

Enumerator
leadingCovariance 

Symmetric leading-spectrum core; fastest when small singular values are not required.

stableCore 

Complement-preserving small SVD; avoids squaring singular-value conditioning.

rankOneSecular 

Structured covariance eigensolve for deleting exactly one singular-factor row.

Definition at line 55 of file svdDowndate.hpp.

◆ svdDeletionStatus

enum class mx::math::svdDeletionStatus
strong

Completion status for an SVD deletion operation.

Enumerator
notComputed 

No operation has published a result.

success 

The operation completed without numerical clamping.

successWithClamping 

The operation completed after clamping roundoff-scale negative eigenvalues.

invalidInput 

Dimensions, values, indices, or requested output rank are invalid.

allocationFailure 

Result or workspace allocation failed.

workspaceQueryFailure 

LAPACK returned an invalid or failed workspace query.

solverFailure 

LAPACK failed during the numerical solve.

nonFiniteOutput 

LAPACK returned a non-finite singular system.

invalidSolverOutput 

LAPACK returned a finite spectrum with invalid ordering or sign.

rescalingOverflow 

A finite normalized result cannot be represented after restoring input scale.

nonPositiveSemidefinite 

A theoretically PSD core has a materially negative eigenvalue.

factorNotOrthonormal 

A requested singular-factor validation failed.

unsupportedDeletionCount 

The selected backend cannot process the requested number of deleted rows.

Definition at line 63 of file svdDowndate.hpp.

Function Documentation

◆ svdDeletionBackendName()

◆ svdDeletionCore()

template<typename realT>
MXLIB_SVD_DELETION_HEADER_ADAPTER svdDeletionStatus mx::math::svdDeletionCore ( svdDeletionResult< realT > & result,
std::type_identity_t< svdDeletionConstVectorRef< realT > > singularValues,
std::type_identity_t< svdDeletionConstMatrixRef< realT > > deletedRows,
Eigen::Index outputRank,
svdDeletionWorkspace< realT > & workspace,
svdDeletionBackend backend = svdDeletionBackend::stableCore )

Delete supplied singular-factor rows with an explicitly selected backend.

rankOneSecular accepts either no deleted rows, which returns the identity update, or exactly one deleted row. It solves the same covariance core as leadingCovariance by transforming the diagonal-minus-rank-one problem to a positive rank-one secular equation. LAPACK-style deflation handles negligible update components and clustered poles at a roundoff-scaled tolerance; post-solve validation uses dimension-scaled bounds. See [3] and [12].

Parameters
[out]resultupdated spectrum, rotation, and diagnostics
[in]singularValuesdescending base singular values
[in]deletedRowsdeleted-side factor rows
[in]outputRanknumber of leading updated directions to publish
[in,out]workspacereusable, worker-private scratch storage
[in]backendnumerical backend

Definition at line 620 of file svdDowndate.hpp.

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

Referenced by unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), and unitTest::math_svdDowndate_test::TEST_CASE().

◆ svdDeletionLeadingCore()

template<typename realT>
MXLIB_SVD_DELETION_HEADER_ADAPTER svdDeletionStatus mx::math::svdDeletionLeadingCore ( svdDeletionResult< realT > & result,
std::type_identity_t< svdDeletionConstVectorRef< realT > > singularValues,
std::type_identity_t< svdDeletionConstMatrixRef< realT > > deletedRows,
Eigen::Index outputRank,
svdDeletionWorkspace< realT > & workspace )

Delete supplied singular-factor rows with the full-spectrum symmetric covariance core.

Given deleted-side rows F, this solves

\[H = \Sigma (I-F^T F) \Sigma = W \Lambda W^T. \]

The result rotation is W and its singular values are sqrt(diag(Lambda)). The complete spectrum is evaluated for PSD validation even when only outputRank leading directions are published. This backend forms normal equations and therefore does not promise high relative accuracy for the smallest singular values. The rankOneSecular backend evaluates this same core in quadratic time when exactly one row is deleted.

Parameters
[out]resultupdated spectrum, rotation, and diagnostics
[in]singularValuesdescending base singular values
[in]deletedRowsdeleted-side factor rows
[in]outputRanknumber of leading updated directions to publish
[in,out]workspacereusable, worker-private scratch storage

Definition at line 560 of file svdDowndate.hpp.

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

Referenced by unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), and unitTest::math_svdDowndate_test::TEST_CASE().

◆ svdDeletionStableCore()

template<typename realT>
MXLIB_SVD_DELETION_HEADER_ADAPTER svdDeletionStatus mx::math::svdDeletionStableCore ( svdDeletionResult< realT > & result,
std::type_identity_t< svdDeletionConstVectorRef< realT > > singularValues,
std::type_identity_t< svdDeletionConstMatrixRef< realT > > deletedRows,
Eigen::Index outputRank,
svdDeletionWorkspace< realT > & workspace )

Delete supplied singular-factor rows with the complement-preserving small-SVD core.

Let F contain deleted-side singular-factor rows and choose B so that B^T B = I - F F^T. The at-most (q+c) x q core

\[K = \begin{bmatrix}(I-F^TF)\Sigma \\ BF\Sigma\end{bmatrix} \]

obeys K^T K = Sigma (I-F^T F) Sigma. Its right singular vectors are the preserved-side rotation. This is the default generic backend because it avoids explicitly squaring the represented singular values. See [2] and [18].

This backend and leadingCovariance use dense LAPACK solvers and therefore have cubic asymptotic cost in the base rank. The rankOneSecular backend instead uses a structured quadratic-time solve for one-row deletion.

Parameters
[out]resultupdated spectrum, rotation, and diagnostics
[in]singularValuesdescending base singular values
[in]deletedRowsdeleted-side factor rows
[in]outputRanknumber of leading updated directions to publish
[in,out]workspacereusable, worker-private scratch storage

Definition at line 594 of file svdDowndate.hpp.

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

Referenced by unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), and unitTest::math_svdDowndate_test::TEST_CASE().

◆ svdDeletionStatusName()

const char * mx::math::svdDeletionStatusName ( svdDeletionStatus status)

◆ svdDeletionSucceeded()

◆ svdRemoveColumns()

template<typename realT>
MXLIB_SVD_DELETION_HEADER_ADAPTER svdDeletionStatus mx::math::svdRemoveColumns ( svdDeletionResult< realT > & result,
std::type_identity_t< svdDeletionConstVectorRef< realT > > singularValues,
std::type_identity_t< svdDeletionConstMatrixRef< realT > > rightFactor,
std::span< const Eigen::Index > deletedIndices,
Eigen::Index outputRank,
svdDeletionWorkspace< realT > & workspace,
svdDeletionBackend backend = svdDeletionBackend::stableCore )

Delete physical columns from the matrix represented by a thin SVD.

For A=U Sigma V^T, this gathers V[deletedIndices,:]. The returned rotation applies to U. Supplying complete factors makes the deletion identical to a direct SVD of the physically retained matrix. Supplying truncated factors deletes columns exactly from that represented low-rank matrix.

Parameters
[out]resultupdated spectrum, rotation, and diagnostics
[in]singularValuesdescending base singular values
[in]rightFactorthin right factor V
[in]deletedIndicessorted, unique column indices to delete
[in]outputRanknumber of leading updated directions
[in,out]workspacereusable, worker-private scratch
[in]backendnumerical backend

Definition at line 676 of file svdDowndate.hpp.

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

Referenced by unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), and unitTest::math_svdDowndate_test::TEST_CASE().

◆ svdRemoveRows()

template<typename realT>
MXLIB_SVD_DELETION_HEADER_ADAPTER svdDeletionStatus mx::math::svdRemoveRows ( svdDeletionResult< realT > & result,
std::type_identity_t< svdDeletionConstVectorRef< realT > > singularValues,
std::type_identity_t< svdDeletionConstMatrixRef< realT > > leftFactor,
std::span< const Eigen::Index > deletedIndices,
Eigen::Index outputRank,
svdDeletionWorkspace< realT > & workspace,
svdDeletionBackend backend = svdDeletionBackend::stableCore )

Delete physical rows from the matrix represented by a thin SVD.

For A=U Sigma V^T, this gathers U[deletedIndices,:]. The returned rotation applies to V. Supplying complete factors makes the deletion identical to a direct SVD of the physically retained matrix. Supplying truncated factors deletes rows exactly from that represented low-rank matrix.

Parameters
[out]resultupdated spectrum, rotation, and diagnostics
[in]singularValuesdescending base singular values
[in]leftFactorthin left factor U
[in]deletedIndicessorted, unique row indices to delete
[in]outputRanknumber of leading updated directions
[in,out]workspacereusable, worker-private scratch
[in]backendnumerical backend

Definition at line 646 of file svdDowndate.hpp.

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

Referenced by unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), and unitTest::math_svdDowndate_test::TEST_CASE().

◆ validateSvdDeletionFactor() [1/2]

MXLIB_SVD_DELETION_HEADER_ADAPTER svdDeletionStatus mx::math::validateSvdDeletionFactor ( svdDeletionConstMatrixRef< double > factor,
double tolerance = 0 )

Validate that a supplied double-precision thin singular-vector factor has orthonormal columns.

Parameters
[in]factorthin singular-vector factor to validate
[in]tolerancemaximum absolute Gram-matrix error, or zero for automatic

Definition at line 536 of file svdDowndate.hpp.

◆ validateSvdDeletionFactor() [2/2]

MXLIB_SVD_DELETION_HEADER_ADAPTER svdDeletionStatus mx::math::validateSvdDeletionFactor ( svdDeletionConstMatrixRef< float > factor,
float tolerance = 0 )

Validate that a supplied thin singular-vector factor has orthonormal columns.

This is an optional one-time base-factor check. Hot deletion calls assume the factor contract and do not repeat this O(n q^2) operation. A zero tolerance selects a dimension-scaled default.

Parameters
[in]factorthin singular-vector factor to validate
[in]tolerancemaximum absolute Gram-matrix error, or zero for automatic

Definition at line 525 of file svdDowndate.hpp.

References validateSvdDeletionFactor().

Referenced by unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), and validateSvdDeletionFactor().