nk 1.0.0
C++ Numerical Computing Runtime
Loading...
Searching...
No Matches
pseudo_subspace.hpp
Go to the documentation of this file.
1
3// toolboxes/linalg/include/nk/linalg/pseudo_subspace.hpp
4//
5// SVD-based pseudoinverse and subspace queries.
6// Migrated together with the SVD kernel from toolboxes/builtin/src/
7// language/arrays/matrix.cpp (group 4 of the toolboxes/linalg extraction).
8
9#pragma once
10
11#include <memory_resource>
12#include <nk/value/value.hpp>
13
14namespace nk::linalg {
15
18
19
24Value pinv(const Value &A, double tol = -1.0, std::pmr::memory_resource *mr = nullptr);
25
29Value orth(const Value &A, double tol = -1.0, std::pmr::memory_resource *mr = nullptr);
30
34Value null_basis(const Value &A, double tol = -1.0, std::pmr::memory_resource *mr = nullptr);
35
40Value subspace(const Value &A, const Value &B, std::pmr::memory_resource *mr = nullptr);
41
42
44} // namespace nk::linalg
Core MATLAB-compatible multidimensional array and scalar value type.
Definition value.hpp:61
Value orth(const Value &A, double tol=-1.0, std::pmr::memory_resource *mr=nullptr)
Orthonormal basis for range(A) (Q = orth(A, tol)).
Value subspace(const Value &A, const Value &B, std::pmr::memory_resource *mr=nullptr)
Subspace angle (theta = subspace(A, B)).
Value null_basis(const Value &A, double tol=-1.0, std::pmr::memory_resource *mr=nullptr)
Orthonormal basis for null(A) (N = null(A, tol)).
Value pinv(const Value &A, double tol=-1.0, std::pmr::memory_resource *mr=nullptr)
Moore-Penrose pseudoinverse (P = pinv(A, tol)).