pRC
multi-purpose Tensor Train library for C++
Loading...
Searching...
No Matches
lq.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_ALGORITHMS_LQ_H
4#define pRC_ALGORITHMS_LQ_H
5
9
10namespace pRC
11{
12 template<Size B = 32, class X, class R = RemoveReference<X>,
13 If<IsTensorish<R>> = 0, If<IsFloat<typename R::Value>> = 0,
14 If<IsSatisfied<(typename R::Dimension() == 2)>> = 0>
15 static inline constexpr auto lq(X &&input)
16 {
17 auto const [q, r] = qr<B>(adjoint(forward<X>(input)));
18 return tuple(eval(adjoint(r)), eval(adjoint(q)));
19 }
20}
21#endif // pRC_ALGORITHMS_LQ_H
Definition cholesky.hpp:18
static constexpr X eval(X &&a)
Definition eval.hpp:11
static constexpr auto lq(X &&input)
Definition lq.hpp:15
static constexpr auto adjoint(JacobiRotation< T > const &a)
Definition jacobi_rotation.hpp:325
static constexpr Conditional< IsSatisfied< C >, RemoveConstReference< X >, X > copy(X &&a)
Definition copy.hpp:13