<divclass="content sourceset-depenent-content"data-active=""data-togglable=":kmath-core:dokkaHtmlPartial/commonMain"><divclass="symbol monospace"><divclass="block"><divclass="block"><spanclass="token annotation">@</span><ahref="../../space.kscience.kmath.misc/-performance-pitfall/index.html"><spanclass="token annotation">PerformancePitfall</span></a></div></div><spanclass="token keyword">open </span><spanclass="token keyword">override </span><spanclass="token keyword">fun </span><ahref="../-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="map-indexed.html"><spanclass="token function">mapIndexed</span></a><spanclass="token punctuation">(</span>transform<spanclass="token operator">: </span><spanclass="token keyword"></span><ahref="index.html">A</a><spanclass="token punctuation">.</span><spanclass="token punctuation">(</span><spanclass="token keyword"></span>index<spanclass="token operator">: </span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int-array/index.html">IntArray</a><spanclass="token punctuation">, </span><spanclass="token keyword"></span><ahref="index.html">T</a><spanclass="token punctuation">)</span><spanclass="token operator"> -></span><spanclass="token keyword"></span><ahref="index.html">T</a><spanclass="token punctuation">)</span><spanclass="token operator">: </span><ahref="../-buffer-n-d/index.html">BufferND</a><spanclass="token operator"><</span><spanclass="token keyword"></span><ahref="index.html">T</a><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">Maps elements from one structure to another one by applying <ahref="map-indexed.html">transform</a> to them alongside with their indices.</p></div></div>