87 lines
7.2 KiB
HTML
87 lines
7.2 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
|
|
<title>kmath-nd4j</title>
|
|
<link href="../images/logo-icon.svg" rel="icon" type="image/svg"><script>var pathToRoot = "../";</script> <script>const storage = localStorage.getItem("dokka-dark-mode")
|
|
if (storage == null) {
|
|
const osDarkSchemePreferred = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
|
|
if (osDarkSchemePreferred === true) {
|
|
document.getElementsByTagName("html")[0].classList.add("theme-dark")
|
|
}
|
|
} else {
|
|
const savedDarkMode = JSON.parse(storage)
|
|
if(savedDarkMode === true) {
|
|
document.getElementsByTagName("html")[0].classList.add("theme-dark")
|
|
}
|
|
}
|
|
</script>
|
|
<script type="text/javascript" src="../scripts/sourceset_dependencies.js" async></script>
|
|
<link href="../styles/style.css" rel="Stylesheet">
|
|
<link href="../styles/jetbrains-mono.css" rel="Stylesheet">
|
|
<link href="../styles/main.css" rel="Stylesheet">
|
|
<link href="../styles/prism.css" rel="Stylesheet">
|
|
<link href="../styles/logo-styles.css" rel="Stylesheet">
|
|
<script type="text/javascript" src="../scripts/clipboard.js" async></script>
|
|
<script type="text/javascript" src="../scripts/navigation-loader.js" async></script>
|
|
<script type="text/javascript" src="../scripts/platform-content-handler.js" async></script>
|
|
<script type="text/javascript" src="../scripts/main.js" defer></script>
|
|
<script type="text/javascript" src="../scripts/prism.js" async></script>
|
|
<script type="text/javascript" src="../scripts/symbol-parameters-wrapper_deferred.js" defer></script></head>
|
|
<body>
|
|
<div class="navigation-wrapper" id="navigation-wrapper">
|
|
<div id="leftToggler"><span class="icon-toggler"></span></div>
|
|
<div class="library-name">
|
|
<a href="../index.html">
|
|
<span>kmath</span> </a> </div>
|
|
<div>0.3.1-dev-RC
|
|
</div>
|
|
<div class="pull-right d-flex">
|
|
<div class="filter-section" id="filter-section">
|
|
<button class="platform-tag platform-selector jvm-like" data-active="" data-filter=":kmath-nd4j:dokkaHtmlPartial/main">jvm</button>
|
|
</div>
|
|
<button id="theme-toggle-button"><span id="theme-toggle"></span></button>
|
|
<div id="searchBar"></div>
|
|
</div>
|
|
</div>
|
|
<div id="container">
|
|
<div id="leftColumn">
|
|
<div id="sideMenu"></div>
|
|
</div>
|
|
<div id="main">
|
|
<div class="main-content" id="content" pageids="kmath-nd4j::////PointingToDeclaration//270562306">
|
|
<div class="breadcrumbs"></div>
|
|
<div class="cover ">
|
|
<h1 class="cover"><span><span>kmath-nd4j</span></span></h1>
|
|
<div class="platform-hinted UnderCoverText" data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":kmath-nd4j:dokkaHtmlPartial/main"><p class="paragraph">ND4J based implementations of KMath abstractions.</p><ul><li><p class="paragraph"># : NDStructure wrapper for INDArray</p></li><li><p class="paragraph"># : Rings over Nd4jArrayStructure of Int and Long</p></li><li><p class="paragraph"># : Fields over Nd4jArrayStructure of Float and Double</p></li></ul><h2 class=""> Artifact:</h2><p class="paragraph">The Maven coordinates of this project are <code class="lang-kotlin">space.kscience:kmath-nd4j:0.3.1-dev-RC</code>.</p><p class="paragraph"><strong>Gradle Groovy:</strong></p><div class="sample-container"><pre><code class="block lang-groovy" theme="idea">repositories {<br> maven { url 'https://repo.kotlin.link' }<br> mavenCentral()<br>}<br><br>dependencies {<br> implementation 'space.kscience:kmath-nd4j:0.3.1-dev-RC'<br>}</code></pre><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><p class="paragraph"><strong>Gradle Kotlin DSL:</strong></p><div class="sample-container"><pre><code class="block lang-kotlin" theme="idea">repositories {<br> maven("https://repo.kotlin.link")<br> mavenCentral()<br>}<br><br>dependencies {<br> implementation("space.kscience:kmath-nd4j:0.3.1-dev-RC")<br>}</code></pre><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><h2 class=""> Examples</h2><p class="paragraph">NDStructure wrapper for INDArray:</p><div class="sample-container"><pre><code class="block lang-kotlin" theme="idea">import org.nd4j.linalg.factory.*<br>import scientifik.kmath.nd4j.*<br>import scientifik.kmath.structures.*<br><br>val array = Nd4j.ones(2, 2).asDoubleStructure()<br>println(array[0, 0]) // 1.0<br>array[intArrayOf(0, 0)] = 24.0<br>println(array[0, 0]) // 24.0</code></pre><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><p class="paragraph">Fast element-wise and in-place arithmetics for INDArray:</p><div class="sample-container"><pre><code class="block lang-kotlin" theme="idea">import org.nd4j.linalg.factory.*<br>import scientifik.kmath.nd4j.*<br>import scientifik.kmath.operations.*<br><br>val field = DoubleNd4jArrayField(intArrayOf(2, 2))<br>val array = Nd4j.rand(2, 2).asDoubleStructure()<br><br>val res = field {<br> (25.0 / array + 20) * 4<br>}<br><br>println(res.ndArray)<br>// [[ 250.6449, 428.5840], <br>// [ 269.7913, 202.2077]]</code></pre><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><p class="paragraph">Contributed by <a href="https://github.com/CommanderTvis">Iaroslav Postovalov</a>.</p></div></div>
|
|
</div>
|
|
<h2 class="">Packages</h2>
|
|
<div class="table"><a data-name="-1586276746%2FPackages%2F270562306" anchor-label="space.kscience.kmath.nd4j" id="-1586276746%2FPackages%2F270562306" data-filterable-set=":kmath-nd4j:dokkaHtmlPartial/main"></a>
|
|
<div class="table-row" data-filterable-current=":kmath-nd4j:dokkaHtmlPartial/main" data-filterable-set=":kmath-nd4j:dokkaHtmlPartial/main">
|
|
<div>
|
|
<div class="main-subrow ">
|
|
<div class=""><span class="inline-flex">
|
|
<div><a href="space.kscience.kmath.nd4j/index.html">space.kscience.kmath.nd4j</a></div>
|
|
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-1586276746%2FPackages%2F270562306"></span>
|
|
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
|
|
</span></span></div>
|
|
<div class="pull-right">
|
|
<div class="platform-tags no-gutters">
|
|
<div class="platform-tag jvm-like">jvm</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="footer">
|
|
<span class="go-to-top-icon"><a href="#content" id="go-to-top-link"></a></span><span>© 2023 Copyright</span><span class="pull-right"><span>Generated by </span><a href="https://github.com/Kotlin/dokka"><span>dokka</span><span class="padded-icon"></span></a></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
|