<divclass="platform-hinted "data-platform-hinted="data-platform-hinted"><divclass="content sourceset-depenent-content"data-active=""data-togglable=":kmath-tensors:dokkaHtmlPartial/commonMain"><divclass="symbol monospace"><spanclass="token keyword">abstract </span><spanclass="token keyword"></span><spanclass="token keyword">fun </span><ahref="../../../kmath-core/space.kscience.kmath.nd/-structure-n-d/index.html">StructureND</a><spanclass="token operator"><</span><spanclass="token keyword"></span><ahref="index.html">T</a><spanclass="token operator">></span><spanclass="token punctuation">.</span><ahref="qr.html"><spanclass="token function">qr</span></a><spanclass="token punctuation">(</span><spanclass="token punctuation">)</span><spanclass="token operator">: </span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-pair/index.html">Pair</a><spanclass="token operator"><</span><spanclass="token keyword"></span><ahref="../index.html#-1680022905%2FClasslikes%2F-1345790395">Tensor</a><spanclass="token operator"><</span><spanclass="token keyword"></span><ahref="index.html">T</a><spanclass="token operator">></span><spanclass="token punctuation">, </span><spanclass="token keyword"></span><ahref="../index.html#-1680022905%2FClasslikes%2F-1345790395">Tensor</a><spanclass="token operator"><</span><spanclass="token keyword"></span><ahref="index.html">T</a><spanclass="token operator">></span><spanclass="token operator">></span><spanclass="top-right-position"><spanclass="copy-icon"></span><divclass="copy-popup-wrapper popup-to-left"><spanclass="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><pclass="paragraph">QR decomposition.</p><pclass="paragraph">Computes the QR decomposition of a matrix or a batch of matrices, and returns a pair <codeclass="lang-kotlin">Q to R</code> of tensors. Given a tensor <codeclass="lang-kotlin">input</code>, return tensors <codeclass="lang-kotlin">Q to R</code> satisfying <codeclass="lang-kotlin">input == Q dot R</code>, with <codeclass="lang-kotlin">Q</code> being an orthogonal matrix or batch of orthogonal matrices and <codeclass="lang-kotlin">R</code> being an upper triangular matrix or batch of upper triangular matrices. For more information: https://pytorch.org/docs/stable/linalg.html#torch.linalg.qr</p><h4class="">Receiver</h4><pclass="paragraph">the <codeclass="lang-kotlin">input</code>.</p><h4class="">Return</h4><pclass="paragraph">pair of <codeclass="lang-kotlin">Q</code> and <codeclass="lang-kotlin">R</code> tensors.</p></div></div>