kmath/kmath-jafama/index.html

50 lines
5.2 KiB
HTML
Raw Normal View History

<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
<title>kmath-jafama</title>
</head><body><link href="../images/logo-icon.svg" rel="icon" type="image/svg"><script>var pathToRoot = "../";</script><script type="text/javascript" src="../scripts/sourceset_dependencies.js" async></script><link href="../styles/style.css" rel="Stylesheet"><link href="../styles/logo-styles.css" rel="Stylesheet"><link href="../styles/jetbrains-mono.css" rel="Stylesheet"><link href="../styles/main.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" async></script>
<div id="container">
<div id="leftColumn"><a href="../index.html">
<div id="logo"></div>
</a>
<div id="paneSearch"></div>
<div id="sideMenu"></div>
</div>
<div id="main">
<script type="text/javascript" src="../scripts/main.js"></script><div id="leftToggler"><span class="icon-toggler"></span></div>
<div class="main-content" id="content" pageids="kmath-jafama::////PointingToDeclaration//-167911000">
<div class="navigation-wrapper" id="navigation-wrapper">
<div class="breadcrumbs"><a href="index.html">kmath-jafama</a></div>
<div class="pull-right d-flex">
<div id="searchBar"></div>
</div>
</div>
<div class="cover ">
<h1 class="cover"><span>kmath-jafama</span></h1>
<div class="platform-hinted UnderCoverText" data-platform-hinted="data-platform-hinted"><div class="content sourceset-depenent-content" data-active="" data-togglable=":kmath-jafama:dokkaHtmlPartial/main"><p class="paragraph">Integration with <a href="https://github.com/jeffhain/jafama">Jafama</a>.</p><ul><li><p class="paragraph">src/main/kotlin/space/kscience/kmath/jafama/ : Double ExtendedField implementations based on Jafama</p></li></ul><h2 class=""> Artifact:</h2><p class="paragraph">The Maven coordinates of this project are <code>space.kscience:kmath-jafama:0.3.0-dev-16</code>.</p><p class="paragraph">Gradle:</p><div class="sample-container"><code class="" theme="idea"><pre>repositories {<br> maven { url 'https://repo.kotlin.link' }<br> mavenCentral()<br>}<br><br>dependencies {<br> implementation 'space.kscience:kmath-jafama:0.3.0-dev-16'<br>}</pre></code></div><p class="paragraph">Gradle Kotlin DSL:</p><div class="sample-container"><code class="" theme="idea"><pre>repositories {<br> maven("https://repo.kotlin.link")<br> mavenCentral()<br>}<br><br>dependencies {<br> implementation("space.kscience:kmath-jafama:0.3.0-dev-16")<br>}</pre></code></div><h2 class=""> Example usage</h2><p class="paragraph">All the <code>DoubleField</code> uses can be replaced with <code>JafamaDoubleField</code> or <code>StrictJafamaDoubleField</code>.</p><div class="sample-container"><code class="" theme="idea"><pre>import space.kscience.kmath.jafama.*<br>import space.kscience.kmath.operations.*<br><br>fun main() {<br> val a = 2.0<br> val b = StrictJafamaDoubleField { exp(a) }<br> println(JafamaDoubleField { b + a })<br> println(StrictJafamaDoubleField { ln(b) })<br>}</pre></code></div><h2 class=""> Performance</h2><p class="paragraph">According to KMath benchmarks on GraalVM, Jafama functions are slower than JDK math; however, there are indications that on Hotspot Jafama is a bit faster.</p><div class="sample-container"><code class="" theme="idea"><pre><p class="paragraph">Can't find appropriate benchmark data. Try generating readme files after running benchmarks.</p></pre></code></div></div></div>
</div>
<h2 class="">Packages</h2>
<div class="table"><a data-name="-1830755760%2FPackages%2F-167911000" anchor-label="space.kscience.kmath.jafama" id="-1830755760%2FPackages%2F-167911000" data-filterable-set=":kmath-jafama:dokkaHtmlPartial/main"></a>
<div class="table-row" data-filterable-current=":kmath-jafama:dokkaHtmlPartial/main" data-filterable-set=":kmath-jafama:dokkaHtmlPartial/main">
<div>
<div class="main-subrow ">
<div class=""><span class="inline-flex"><a href="space.kscience.kmath.jafama/index.html">space.kscience.kmath.jafama</a><span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-1830755760%2FPackages%2F-167911000"></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>
</div>
<div></div>
</div>
</div>
</div>
</div>
<div class="footer"><span class="go-to-top-icon"><a href="#content"></a></span><span>© 2021 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>