mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
Loading...
Searching...
No Matches
mx::math::svdDeletionResult< realT, abiT > Class Template Reference

template<typename realT, typename abiT>
class mx::math::svdDeletionResult< realT, abiT >

Result of deleting rows or columns from a represented thin SVD.

If \(A=U\Sigma V^T\), the returned rotation applies to the factor on the side that was not deleted. For row deletion the updated right factor is V * rotation(); for column deletion the updated left factor is U * rotation(). Singular values are descending.

Output arrays remain allocated across calls. Their numerical contents are valid only when status() reports a successful operation.

Template Parameters
realTfloating-point type; supported explicit instantiations are float and double.
abiTtype-level ABI tag; callers use the default.

Definition at line 321 of file svdDowndate.hpp.

#include <math/svdDowndate.hpp>

Public Member Functions

 svdDeletionResult ()
 Construct an empty result.
 ~svdDeletionResult ()
 Release result storage using mxlib's Eigen allocation configuration.
 svdDeletionResult (const svdDeletionResult &other)=delete
 Results cannot be copied across the mxlib ABI boundary.
svdDeletionResultoperator= (const svdDeletionResult &other)=delete
 Results cannot be copy-assigned across the mxlib ABI boundary.
 svdDeletionResult (svdDeletionResult &&other) noexcept
 Move owned result storage from another result.
svdDeletionResultoperator= (svdDeletionResult &&other) noexcept
 Replace this result by moving owned storage from another result.
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.
svdDeletionStatus status () const noexcept
 Return the most recent operation status.
svdDeletionBackend backend () const noexcept
 Return the backend that produced the current result.
MXLIB_SVD_DELETION_HEADER_ADAPTER svdDeletionConstVectorRef< realT > singularValues () const noexcept
 Return an unaligned borrowed view of all baseRank() descending updated singular values.
MXLIB_SVD_DELETION_HEADER_ADAPTER svdDeletionConstVectorRef< realT > squaredSingularValues () const noexcept
 Return an unaligned borrowed view of all corresponding descending squared singular values.
MXLIB_SVD_DELETION_HEADER_ADAPTER svdDeletionConstMatrixRef< realT > rotation () const noexcept
 Return the preserved-side rotation, with updated directions in columns.
std::int64_t baseRank () const noexcept
 Return the base factorization rank for which storage is prepared.
std::int64_t outputRank () const noexcept
 Return the requested published rank.
std::int64_t maximumOutputRank () const noexcept
 Return the allocated rotation-column capacity for the current base rank.
std::int64_t clampedEigenvalues () const noexcept
 Return the number of roundoff-scale negative eigenvalues clamped to zero.
realT minimumPSDValue () const noexcept
 Return the smallest pre-clamp eigenvalue from the normalized backend PSD validation core.
MXLAPACK_INT lapackInfo () const noexcept
 Return the underlying LAPACK status from the most recent failed query or solve.

Constructor & Destructor Documentation

◆ svdDeletionResult() [1/3]

template<typename realT, typename abiT>
mx::math::svdDeletionResult< realT, abiT >::svdDeletionResult ( )

Construct an empty result.

Definition at line 1669 of file svdDowndate.cpp.

◆ ~svdDeletionResult()

template<typename realT, typename abiT>
mx::math::svdDeletionResult< realT, abiT >::~svdDeletionResult ( )
default

Release result storage using mxlib's Eigen allocation configuration.

◆ svdDeletionResult() [2/3]

template<typename realT, typename abiT>
mx::math::svdDeletionResult< realT, abiT >::svdDeletionResult ( const svdDeletionResult< realT, abiT > & other)
delete

Results cannot be copied across the mxlib ABI boundary.

Parameters
[in]otherresult that copying is forbidden from

◆ svdDeletionResult() [3/3]

template<typename realT, typename abiT>
mx::math::svdDeletionResult< realT, abiT >::svdDeletionResult ( svdDeletionResult< realT, abiT > && other)
defaultnoexcept

Move owned result storage from another result.

Parameters
[in,out]otherresult to move from

Member Function Documentation

◆ backend()

◆ baseRank()

template<typename realT, typename abiT>
std::int64_t mx::math::svdDeletionResult< realT, abiT >::baseRank ( ) const
noexcept

Return the base factorization rank for which storage is prepared.

Definition at line 1806 of file svdDowndate.cpp.

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

◆ clampedEigenvalues()

template<typename realT, typename abiT>
std::int64_t mx::math::svdDeletionResult< realT, abiT >::clampedEigenvalues ( ) const
noexcept

Return the number of roundoff-scale negative eigenvalues clamped to zero.

Definition at line 1824 of file svdDowndate.cpp.

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

◆ lapackInfo()

template<typename realT, typename abiT>
MXLAPACK_INT mx::math::svdDeletionResult< realT, abiT >::lapackInfo ( ) const
noexcept

Return the underlying LAPACK status from the most recent failed query or solve.

Definition at line 1836 of file svdDowndate.cpp.

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().

◆ maximumOutputRank()

template<typename realT, typename abiT>
std::int64_t mx::math::svdDeletionResult< realT, abiT >::maximumOutputRank ( ) const
noexcept

Return the allocated rotation-column capacity for the current base rank.

Definition at line 1818 of file svdDowndate.cpp.

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

◆ minimumPSDValue()

template<typename realT, typename abiT>
realT mx::math::svdDeletionResult< realT, abiT >::minimumPSDValue ( ) const
noexcept

Return the smallest pre-clamp eigenvalue from the normalized backend PSD validation core.

A non-positive-semidefinite failure preserves the offending value. An empty stable-core deletion uses one as the vacuous minimum of its zero-dimensional complement core.

Definition at line 1830 of file svdDowndate.cpp.

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().

◆ operator=() [1/2]

template<typename realT, typename abiT>
svdDeletionResult & mx::math::svdDeletionResult< realT, abiT >::operator= ( const svdDeletionResult< realT, abiT > & other)
delete

Results cannot be copy-assigned across the mxlib ABI boundary.

Parameters
[in]otherresult that copy assignment is forbidden from

◆ operator=() [2/2]

template<typename realT, typename abiT>
svdDeletionResult< realT, abiT > & mx::math::svdDeletionResult< realT, abiT >::operator= ( svdDeletionResult< realT, abiT > && other)
defaultnoexcept

Replace this result by moving owned storage from another result.

Parameters
[in,out]otherresult to move from

◆ outputRank()

◆ prepare()

template<typename realT, typename abiT>
MXLIB_SVD_DELETION_HEADER_ADAPTER svdDeletionStatus mx::math::svdDeletionResult< realT, abiT >::prepare ( Eigen::Index baseRank,
Eigen::Index outputRank )
inline

Prepare or reuse output storage for a base and requested active output rank.

Storage grows when required but does not shrink while baseRank is unchanged. Calling this before a hot loop with the largest planned output rank reserves the rotation capacity for later smaller requests.

Parameters
[in]baseRanknumber of supplied singular triplets
[in]outputRanknumber of updated triplets to publish

Definition at line 351 of file svdDowndate.hpp.

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().

◆ rotation()

template<typename realT, typename abiT>
MXLIB_SVD_DELETION_HEADER_ADAPTER svdDeletionConstMatrixRef< realT > mx::math::svdDeletionResult< realT, abiT >::rotation ( ) const
inlinenoexcept

◆ singularValues()

◆ squaredSingularValues()

template<typename realT, typename abiT>
MXLIB_SVD_DELETION_HEADER_ADAPTER svdDeletionConstVectorRef< realT > mx::math::svdDeletionResult< realT, abiT >::squaredSingularValues ( ) const
inlinenoexcept

◆ status()

template<typename realT, typename abiT>
svdDeletionStatus mx::math::svdDeletionResult< realT, abiT >::status ( ) const
noexcept

The documentation for this class was generated from the following files: