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

Reusable row and column deletion updates for thin singular value decompositions. More...

Reusable row and column deletion updates for thin singular value decompositions.

Definition in file svdDowndate.hpp.

#include <Eigen/Dense>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <span>
#include <type_traits>
#include "templateLapack.hpp"

Go to the source code of this file.

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

Namespaces

namespace  mx
 The mxlib c++ namespace.

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.