<divclass="platform-hinted "data-platform-hinted="data-platform-hinted"><divclass="content sourceset-dependent-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="qr.html"><spanclass="token function">qr</span></a><spanclass="token punctuation">(</span><spanclass="parameters "><spanclass="parameter ">structureND<spanclass="token operator">: </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></span></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="../../../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><spanclass="token keyword"></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 operator">></span><spanclass="clearfix"><spanclass="floating-right">(<ahref="https://github.com/SciProgCentre/kmath/tree/master/kmath-tensors/src/commonMain/kotlin/space/kscience/kmath/tensors/api/LinearOpsTensorAlgebra.kt#L64">source</a>)</span></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><spanclass="kdoc-tag"><h4class="">Receiver</h4><pclass="paragraph">the <codeclass="lang-kotlin">input</code>.</p></span><spanclass="kdoc-tag"><h4class="">Return</h4><pclass="paragraph">pair of <codeclass="lang-kotlin">Q</code> and <codeclass="lang-kotlin">R</code> tensors.</p></span></div></div>