<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><ahref="-short-buffer.html"><spanclass="token function">ShortBuffer</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 ">init<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="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-short/index.html">Short</a></span></span><spanclass="token punctuation">)</span><spanclass="token operator">: </span><ahref="-short-buffer/index.html">ShortBuffer</a><spanclass="clearfix"><spanclass="floating-right">(<ahref="https://github.com/SciProgCentre/kmath/tree/master/kmath-core/src/commonMain/kotlin/space/kscience/kmath/structures/ShortBuffer.kt#L36">source</a>)</span></span></div><pclass="paragraph">Creates a new <ahref="-short-buffer/index.html">ShortBuffer</a> with the specified <ahref="-short-buffer.html">size</a>, where each element is calculated by calling the specified <ahref="-short-buffer.html">init</a> function.</p><pclass="paragraph">The function <ahref="-short-buffer.html">init</a> is called for each array element sequentially starting from the first one. It should return the value for a buffer element given its index.</p><hr><divclass="symbol monospace"><spanclass="token keyword"></span><spanclass="token keyword">fun </span><ahref="-short-buffer.html"><spanclass="token function">ShortBuffer</span></a><spanclass="token punctuation">(</span><spanclass="parameters "><spanclass="parameter "><spanclass="token keyword">vararg </span>shorts<spanclass="token operator">: </span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-short/index.html">Short</a></span></span><spanclass="token punctuation">)</span><spanclass="token operator">: </span><ahref="-short-buffer/index.html">ShortBuffer</a><spanclass="clearfix"><spanclass="floating-right">(<ahref="https://github.com/SciProgCentre/kmath/tree/master/kmath-core/src/commonMain/kotlin/space/kscience/kmath/structures/ShortBuffer.kt#L41">source</a>)</span></span></div><pclass="paragraph">Returns a new <ahref="-short-buffer/index.html">ShortBuffer</a> of given elements.</p></div></div>