kmath/kmath-jafama/index.html

87 lines
6.9 KiB
HTML
Raw Normal View History

<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
<title>kmath-jafama</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-jafama: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-jafama::////PointingToDeclaration//-167911000">
<div class="breadcrumbs"></div>
<div class="cover ">
<h1 class="cover"><span><span>kmath-jafama</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-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 class="lang-kotlin">space.kscience:kmath-jafama: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-jafama: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-jafama: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=""> Example usage</h2><p class="paragraph">All the <code class="lang-kotlin">DoubleField</code> uses can be replaced with <code class="lang-kotlin">JafamaDoubleField</code> or <code class="lang-kotlin">StrictJafamaDoubleField</code>.</p><div class="sample-container"><pre><code class="block lang-kotlin" theme="idea">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>}</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=""> 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><blockquote class="quotation"><p class="paragraph"><strong>Can't find appropriate benchmark data. Try generating readme files after running benchmarks</strong>.</p></blockquote></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">
<div><a href="space.kscience.kmath.jafama/index.html">space.kscience.kmath.jafama</a></div>
<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 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>