<divclass="platform-hinted "data-platform-hinted="data-platform-hinted"><divclass="content sourceset-dependent-content"data-active=""data-togglable=":kmath-core:dokkaHtmlPartial/commonMain"><divclass="symbol monospace"><spanclass="token keyword">inline </span><spanclass="token keyword">fun </span><spanclass="token operator"><</span><spanclass="token keyword"></span><ahref="boxing.html">T</a><spanclass="token operator">></span><ahref="boxing.html"><spanclass="token function">boxing</span></a><spanclass="token punctuation">(</span><spanclass="parameters "><spanclass="parameter ">size<spanclass="token operator">: </span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><spanclass="token punctuation">, </span></span><spanclass="parameter ">initializer<spanclass="token operator">: </span><spanclass="token punctuation">(</span><spanclass="token keyword"></span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><spanclass="token punctuation">)</span><spanclass="token operator"> -></span><spanclass="token keyword"></span><ahref="boxing.html">T</a></span></span><spanclass="token punctuation">)</span><spanclass="token operator">: </span><ahref="../index.html">Buffer</a><spanclass="token operator"><</span><spanclass="token keyword"></span><ahref="boxing.html">T</a><spanclass="token operator">></span><spanclass="clearfix"><spanclass="floating-right">(<ahref="https://github.com/SciProgCentre/kmath/tree/master/kmath-core/src/commonMain/kotlin/space/kscience/kmath/structures/Buffer.kt#L92">source</a>)</span></span></div><pclass="paragraph">Creates a <ahref="../../-list-buffer/index.html">ListBuffer</a> of given type <ahref="boxing.html">T</a> with given <ahref="boxing.html">size</a>. Each element is calculated by calling the specified <ahref="boxing.html">initializer</a> function.</p></div></div>