Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
least_squares.hpp File Reference

Precision-generic full-column-rank least squares with recoverable diagnostics. More...

#include <uni20/linalg/backends/cpu/least_squares.hpp>
#include <uni20/linalg/backends/lapack/least_squares.hpp>
#include <uni20/tensor/precision.hpp>
Include dependency graph for ops/least_squares.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  uni20::linalg::LeastSquaresResult< S >
 Preserving least-squares result; solution and residuals are published only on success. More...
 

Namespaces

namespace  uni20
 
namespace  uni20::linalg
 

Functions

template<class... Args>
requires requires(Args&&... args) { least_squares_with_info(std::forward<Args>(args)...); }
auto uni20::linalg::least_squares (Args &&... args)
 Return a preserving least-squares solution; numerical failure uses the ordinary terminal error policy.
 
template<RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires RealOrComplex<tensor_element_t<A>> && std::same_as<tensor_element_t<A>, tensor_element_t<B>>
auto uni20::linalg::least_squares_with_info (A const &a, B const &b, LeastSquaresOptions< make_real_t< tensor_element_t< A > > > const &options={})
 Infer precision and select the ordinary host-result backends.
 
template<RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires RealOrComplex<tensor_element_t<A>> && std::same_as<tensor_element_t<A>, tensor_element_t<B>>
auto uni20::linalg::least_squares_with_info (A const &a, B const &b, Precision p, LeastSquaresOptions< make_real_t< tensor_element_t< A > > > const &options={})
 Use the ordinary backend selector for the owning host result.
 
template<KernelBackendSelector Backend, RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires RealOrComplex<tensor_element_t<A>> && std::same_as<tensor_element_t<A>, tensor_element_t<B>>
auto uni20::linalg::least_squares_with_info (Backend &&backend, A const &a, B const &b, LeastSquaresOptions< make_real_t< tensor_element_t< A > > > const &options={})
 Infer working precision from input defaults, requiring matching finite defaults when both exist.
 
template<KernelBackendSelector Backend, RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires RealOrComplex<tensor_element_t<A>> && std::same_as<tensor_element_t<A>, tensor_element_t<B>>
auto uni20::linalg::least_squares_with_info (Backend &&backend, A const &a, B const &b, Precision p, LeastSquaresOptions< make_real_t< tensor_element_t< A > > > const &options={})
 Minimize each column's Euclidean residual for m-by-n A with m >= n.
 

Detailed Description

Precision-generic full-column-rank least squares with recoverable diagnostics.