163 lines
52 KiB
HTML
163 lines
52 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
|
|
<title>kmath-ast</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 common-like" data-active="" data-filter=":kmath-ast:dokkaHtmlPartial/commonMain">common</button>
|
|
<button class="platform-tag platform-selector js-like" data-active="" data-filter=":kmath-ast:dokkaHtmlPartial/jsMain">js</button>
|
|
<button class="platform-tag platform-selector jvm-like" data-active="" data-filter=":kmath-ast:dokkaHtmlPartial/jvmMain">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-ast::////PointingToDeclaration//-1763828843">
|
|
<div class="breadcrumbs"></div>
|
|
<div class="cover ">
|
|
<h1 class="cover"><span><span>kmath-ast</span></span></h1>
|
|
<div class="platform-hinted UnderCoverText with-platform-tabs" data-platform-hinted="data-platform-hinted">
|
|
<div class="platform-bookmarks-row" data-toggle-list="data-toggle-list"><button class="platform-bookmark" data-filterable-current=":kmath-ast:dokkaHtmlPartial/commonMain" data-filterable-set=":kmath-ast:dokkaHtmlPartial/commonMain" data-active="" data-toggle=":kmath-ast:dokkaHtmlPartial/commonMain">common</button><button class="platform-bookmark" data-filterable-current=":kmath-ast:dokkaHtmlPartial/jsMain" data-filterable-set=":kmath-ast:dokkaHtmlPartial/jsMain" data-toggle=":kmath-ast:dokkaHtmlPartial/jsMain">js</button><button class="platform-bookmark" data-filterable-current=":kmath-ast:dokkaHtmlPartial/jvmMain" data-filterable-set=":kmath-ast:dokkaHtmlPartial/jvmMain" data-toggle=":kmath-ast:dokkaHtmlPartial/jvmMain">jvm</button></div>
|
|
<div class="content sourceset-dependent-content" data-active="" data-togglable=":kmath-ast:dokkaHtmlPartial/commonMain"><p class="paragraph">Extensions to MST API: transformations, dynamic compilation and visualization.</p><ul><li><p class="paragraph">src/commonMain/kotlin/space/kscience/kmath/ast/parser.kt : Expression language and its parser</p></li><li><p class="paragraph">src/jvmMain/kotlin/space/kscience/kmath/asm/asm.kt : Dynamic MST to JVM bytecode compiler</p></li><li><p class="paragraph">src/jsMain/kotlin/space/kscience/kmath/estree/estree.kt : Dynamic MST to JS compiler</p></li><li><p class="paragraph">src/commonMain/kotlin/space/kscience/kmath/ast/rendering/MathRenderer.kt : Extendable MST rendering</p></li></ul><h2 class=""> Artifact:</h2><p class="paragraph">The Maven coordinates of this project are <code class="lang-kotlin">space.kscience:kmath-ast: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-ast: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-ast: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=""> Parsing expressions</h2><p class="paragraph">In this module there is a parser from human-readable strings like <code class="lang-kotlin">"x^3-x+3"</code> (in the more specific reference/ArithmeticsEvaluator.g4) to MST instances.</p><p class="paragraph">Supported literals:</p><ol><li><p class="paragraph">Constants and variables (consist of latin letters, digits and underscores, can't start with digit): <code class="lang-kotlin">x</code>, <code class="lang-kotlin">_Abc2</code>.</p></li><li><p class="paragraph">Numbers: <code class="lang-kotlin">123</code>, <code class="lang-kotlin">1.02</code>, <code class="lang-kotlin">1e10</code>, <code class="lang-kotlin">1e-10</code>, <code class="lang-kotlin">1.0e+3</code>—all parsed either as <code class="lang-kotlin">kotlin.Long</code> or <code class="lang-kotlin">kotlin.Double</code>.</p></li></ol><p class="paragraph">Supported binary operators (from the highest precedence to the lowest one):</p><ol><li><p class="paragraph"><code class="lang-kotlin">^</code></p></li><li><p class="paragraph"><code class="lang-kotlin">*</code>, <code class="lang-kotlin">/</code></p></li><li><p class="paragraph"><code class="lang-kotlin">+</code>, <code class="lang-kotlin">-</code></p></li></ol><p class="paragraph">Supported unary operator:</p><ol><li><p class="paragraph"><code class="lang-kotlin">-</code>, e. g. <code class="lang-kotlin">-x</code></p></li></ol><p class="paragraph">Arbitrary unary and binary functions are also supported: names consist of latin letters, digits and underscores, can't start with digit. Examples:</p><ol><li><p class="paragraph"><code class="lang-kotlin">sin(x)</code></p></li><li><p class="paragraph"><code class="lang-kotlin">add(x, y)</code></p></li></ol><h2 class=""> Dynamic expression code generation</h2><h3 class=""> On JVM</h3><p class="paragraph"><code class="lang-kotlin">kmath-ast</code> JVM module supports runtime code generation to eliminate overhead of tree traversal. Code generator builds a special implementation of <code class="lang-kotlin">Expression<T></code> with implemented <code class="lang-kotlin">invoke</code> function.</p><p class="paragraph">For example, the following code:</p><div class="sample-container"><pre><code class="block lang-kotlin" theme="idea">import space.kscience.kmath.asm.compileToExpression<br>import space.kscience.kmath.operations.DoubleField<br><br>"x^3-x+3".parseMath().compileToExpression(DoubleField)</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">… leads to generation of bytecode, which can be decompiled to the following Java class:</p><div class="sample-container"><pre><code class="block lang-java" theme="idea">import java.util.*;<br>import kotlin.jvm.functions.*;<br>import space.kscience.kmath.asm.internal.*;<br>import space.kscience.kmath.complex.*;<br>import space.kscience.kmath.expressions.*;<br><br>public final class CompiledExpression_45045_0 implements Expression<Complex> {<br> private final Object[] constants;<br><br> public Complex invoke(Map<Symbol, ? extends Complex> arguments) {<br> Complex var2 = (Complex)MapIntrinsics.getOrFail(arguments, "x");<br> return (Complex)((Function2)this.constants[0]).invoke(var2, (Complex)this.constants[1]);<br> }<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">For <code class="lang-kotlin">LongRing</code>, <code class="lang-kotlin">IntRing</code>, and <code class="lang-kotlin">DoubleField</code> specialization is supported for better performance:</p><div class="sample-container"><pre><code class="block lang-java" theme="idea">import java.util.*;<br>import space.kscience.kmath.asm.internal.*;<br>import space.kscience.kmath.expressions.*;<br><br>public final class CompiledExpression_-386104628_0 implements DoubleExpression {<br> private final SymbolIndexer indexer;<br><br> public SymbolIndexer getIndexer() {<br> return this.indexer;<br> }<br><br> public double invoke(double[] arguments) {<br> double var2 = arguments[0];<br> return Math.pow(var2, 3.0D) - var2 + 3.0D;<br> }<br><br> public final Double invoke(Map<Symbol, ? extends Double> arguments) {<br> double var2 = ((Double)MapIntrinsics.getOrFail(arguments, "x")).doubleValue();<br> return Math.pow(var2, 3.0D) - var2 + 3.0D;<br> }<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">Setting JVM system property <code class="lang-kotlin">space.kscience.kmath.ast.dump.generated.classes</code> to <code class="lang-kotlin">1</code> makes the translator dump class files to program's working directory, so they can be reviewed manually.</p><h4 class=""> Limitations</h4><ul><li><p class="paragraph">The same classes may be generated and loaded twice, so it is recommended to cache compiled expressions to avoid class loading overhead.</p></li><li><p class="paragraph">This API is not supported by non-dynamic JVM implementations like TeaVM or GraalVM Native Image because they may not support class loaders.</p></li></ul><h3 class=""> On JS</h3><p class="paragraph">A similar feature is also available on JS.</p><div class="sample-container"><pre><code class="block lang-kotlin" theme="idea">import space.kscience.kmath.expressions.Symbol.Companion.x<br>import space.kscience.kmath.expressions.*<br>import space.kscience.kmath.operations.*<br>import space.kscience.kmath.estree.*<br><br>MstField { x + 2 }.compileToExpression(DoubleField)</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">The code above returns expression implemented with such a JS function:</p><div class="sample-container"><pre><code class="block lang-js" theme="idea">var executable = function (constants, arguments) {<br> return constants[1](constants[0](arguments, "x"), 2);<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">JS also supports experimental expression optimization with <a href="https://webassembly.org/">WebAssembly</a> IR generation. Currently, only expressions inside <code class="lang-kotlin">DoubleField</code> and <code class="lang-kotlin">IntRing</code> are supported.</p><div class="sample-container"><pre><code class="block lang-kotlin" theme="idea">import space.kscience.kmath.expressions.Symbol.Companion.x<br>import space.kscience.kmath.expressions.*<br>import space.kscience.kmath.operations.*<br>import space.kscience.kmath.wasm.*<br><br>MstField { x + 2 }.compileToExpression(DoubleField)</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">An example of emitted Wasm IR in the form of WAT:</p><div class="sample-container"><pre><code class="block lang-lisp" theme="idea">(func \$executable (param \$0 f64) (result f64)<br> (f64.add<br> (local.get \$0)<br> (f64.const 2)<br> )<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><h4 class=""> Limitations</h4><ul><li><p class="paragraph">ESTree expression compilation uses <code class="lang-kotlin">eval</code> which can be unavailable in several environments.</p></li><li><p class="paragraph">WebAssembly isn't supported by old versions of browsers (see https://webassembly.org/roadmap/).</p></li></ul><h2 class=""> Rendering expressions</h2><p class="paragraph">kmath-ast also includes an extensible engine to display expressions in LaTeX or MathML syntax.</p><p class="paragraph">Example usage:</p><div class="sample-container"><pre><code class="block lang-kotlin" theme="idea">import space.kscience.kmath.ast.*<br>import space.kscience.kmath.ast.rendering.*<br>import space.kscience.kmath.misc.*<br><br>@OptIn(UnstableKMathAPI::class)<br>public fun main() {<br> val mst = "exp(sqrt(x))-asin(2*x)/(2e10+x^3)/(12)+x^(2/3)".parseMath()<br> val syntax = FeaturedMathRendererWithPostProcess.Default.render(mst)<br> val latex = LatexSyntaxRenderer.renderWithStringBuilder(syntax)<br> println("LaTeX:")<br> println(latex)<br> println()<br> val mathML = MathMLSyntaxRenderer.renderWithStringBuilder(syntax)<br> println("MathML:")<br> println(mathML)<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">Result LaTeX:</p><p class="paragraph">$$\operatorname{exp}\\,\left(\sqrt{x}\right)-\frac{\frac{\operatorname{arcsin}\\,\left(2\\,x\right)}{2\times10^{10}+x^{3}}}{12}+x^{2/3}$$</p><p class="paragraph">Result MathML (can be used with MathJax or other renderers):</p><details><div class="sample-container"><pre><code class="block lang-html" theme="idea"><math xmlns="https://www.w3.org/1998/Math/MathML"><br> <mrow><br> <mo>exp</mo><br> <mspace width="0.167em"></mspace><br> <mfenced open="(" close=")" separators=""><br> <msqrt><br> <mi>x</mi><br> </msqrt><br> </mfenced><br> <mo>-</mo><br> <mfrac><br> <mrow><br> <mfrac><br> <mrow><br> <mo>arcsin</mo><br> <mspace width="0.167em"></mspace><br> <mfenced open="(" close=")" separators=""><br> <mn>2</mn><br> <mspace width="0.167em"></mspace><br> <mi>x</mi><br> </mfenced><br> </mrow><br> <mrow><br> <mn>2</mn><br> <mo>&times;</mo><br> <msup><br> <mrow><br> <mn>10</mn><br> </mrow><br> <mrow><br> <mn>10</mn><br> </mrow><br> </msup><br> <mo>+</mo><br> <msup><br> <mrow><br> <mi>x</mi><br> </mrow><br> <mrow><br> <mn>3</mn><br> </mrow><br> </msup><br> </mrow><br> </mfrac><br> </mrow><br> <mrow><br> <mn>12</mn><br> </mrow><br> </mfrac><br> <mo>+</mo><br> <msup><br> <mrow><br> <mi>x</mi><br> </mrow><br> <mrow><br> <mn>2</mn><br> <mo>/</mo><br> <mn>3</mn><br> </mrow><br> </msup><br> </mrow><br></math></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></details><p class="paragraph">It is also possible to create custom algorithms of render, and even add support of other markup languages (see API reference).</p></div><div class="content sourceset-dependent-content" data-togglable=":kmath-ast:dokkaHtmlPartial/jsMain"><p class="paragraph">Extensions to MST API: transformations, dynamic compilation and visualization.</p><ul><li><p class="paragraph">src/commonMain/kotlin/space/kscience/kmath/ast/parser.kt : Expression language and its parser</p></li><li><p class="paragraph">src/jvmMain/kotlin/space/kscience/kmath/asm/asm.kt : Dynamic MST to JVM bytecode compiler</p></li><li><p class="paragraph">src/jsMain/kotlin/space/kscience/kmath/estree/estree.kt : Dynamic MST to JS compiler</p></li><li><p class="paragraph">src/commonMain/kotlin/space/kscience/kmath/ast/rendering/MathRenderer.kt : Extendable MST rendering</p></li></ul><h2 class=""> Artifact:</h2><p class="paragraph">The Maven coordinates of this project are <code class="lang-kotlin">space.kscience:kmath-ast: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-ast: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-ast: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=""> Parsing expressions</h2><p class="paragraph">In this module there is a parser from human-readable strings like <code class="lang-kotlin">"x^3-x+3"</code> (in the more specific reference/ArithmeticsEvaluator.g4) to MST instances.</p><p class="paragraph">Supported literals:</p><ol><li><p class="paragraph">Constants and variables (consist of latin letters, digits and underscores, can't start with digit): <code class="lang-kotlin">x</code>, <code class="lang-kotlin">_Abc2</code>.</p></li><li><p class="paragraph">Numbers: <code class="lang-kotlin">123</code>, <code class="lang-kotlin">1.02</code>, <code class="lang-kotlin">1e10</code>, <code class="lang-kotlin">1e-10</code>, <code class="lang-kotlin">1.0e+3</code>—all parsed either as <code class="lang-kotlin">kotlin.Long</code> or <code class="lang-kotlin">kotlin.Double</code>.</p></li></ol><p class="paragraph">Supported binary operators (from the highest precedence to the lowest one):</p><ol><li><p class="paragraph"><code class="lang-kotlin">^</code></p></li><li><p class="paragraph"><code class="lang-kotlin">*</code>, <code class="lang-kotlin">/</code></p></li><li><p class="paragraph"><code class="lang-kotlin">+</code>, <code class="lang-kotlin">-</code></p></li></ol><p class="paragraph">Supported unary operator:</p><ol><li><p class="paragraph"><code class="lang-kotlin">-</code>, e. g. <code class="lang-kotlin">-x</code></p></li></ol><p class="paragraph">Arbitrary unary and binary functions are also supported: names consist of latin letters, digits and underscores, can't start with digit. Examples:</p><ol><li><p class="paragraph"><code class="lang-kotlin">sin(x)</code></p></li><li><p class="paragraph"><code class="lang-kotlin">add(x, y)</code></p></li></ol><h2 class=""> Dynamic expression code generation</h2><h3 class=""> On JVM</h3><p class="paragraph"><code class="lang-kotlin">kmath-ast</code> JVM module supports runtime code generation to eliminate overhead of tree traversal. Code generator builds a special implementation of <code class="lang-kotlin">Expression<T></code> with implemented <code class="lang-kotlin">invoke</code> function.</p><p class="paragraph">For example, the following code:</p><div class="sample-container"><pre><code class="block lang-kotlin" theme="idea">import space.kscience.kmath.asm.compileToExpression<br>import space.kscience.kmath.operations.DoubleField<br><br>"x^3-x+3".parseMath().compileToExpression(DoubleField)</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">… leads to generation of bytecode, which can be decompiled to the following Java class:</p><div class="sample-container"><pre><code class="block lang-java" theme="idea">import java.util.*;<br>import kotlin.jvm.functions.*;<br>import space.kscience.kmath.asm.internal.*;<br>import space.kscience.kmath.complex.*;<br>import space.kscience.kmath.expressions.*;<br><br>public final class CompiledExpression_45045_0 implements Expression<Complex> {<br> private final Object[] constants;<br><br> public Complex invoke(Map<Symbol, ? extends Complex> arguments) {<br> Complex var2 = (Complex)MapIntrinsics.getOrFail(arguments, "x");<br> return (Complex)((Function2)this.constants[0]).invoke(var2, (Complex)this.constants[1]);<br> }<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">For <code class="lang-kotlin">LongRing</code>, <code class="lang-kotlin">IntRing</code>, and <code class="lang-kotlin">DoubleField</code> specialization is supported for better performance:</p><div class="sample-container"><pre><code class="block lang-java" theme="idea">import java.util.*;<br>import space.kscience.kmath.asm.internal.*;<br>import space.kscience.kmath.expressions.*;<br><br>public final class CompiledExpression_-386104628_0 implements DoubleExpression {<br> private final SymbolIndexer indexer;<br><br> public SymbolIndexer getIndexer() {<br> return this.indexer;<br> }<br><br> public double invoke(double[] arguments) {<br> double var2 = arguments[0];<br> return Math.pow(var2, 3.0D) - var2 + 3.0D;<br> }<br><br> public final Double invoke(Map<Symbol, ? extends Double> arguments) {<br> double var2 = ((Double)MapIntrinsics.getOrFail(arguments, "x")).doubleValue();<br> return Math.pow(var2, 3.0D) - var2 + 3.0D;<br> }<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">Setting JVM system property <code class="lang-kotlin">space.kscience.kmath.ast.dump.generated.classes</code> to <code class="lang-kotlin">1</code> makes the translator dump class files to program's working directory, so they can be reviewed manually.</p><h4 class=""> Limitations</h4><ul><li><p class="paragraph">The same classes may be generated and loaded twice, so it is recommended to cache compiled expressions to avoid class loading overhead.</p></li><li><p class="paragraph">This API is not supported by non-dynamic JVM implementations like TeaVM or GraalVM Native Image because they may not support class loaders.</p></li></ul><h3 class=""> On JS</h3><p class="paragraph">A similar feature is also available on JS.</p><div class="sample-container"><pre><code class="block lang-kotlin" theme="idea">import space.kscience.kmath.expressions.Symbol.Companion.x<br>import space.kscience.kmath.expressions.*<br>import space.kscience.kmath.operations.*<br>import space.kscience.kmath.estree.*<br><br>MstField { x + 2 }.compileToExpression(DoubleField)</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">The code above returns expression implemented with such a JS function:</p><div class="sample-container"><pre><code class="block lang-js" theme="idea">var executable = function (constants, arguments) {<br> return constants[1](constants[0](arguments, "x"), 2);<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">JS also supports experimental expression optimization with <a href="https://webassembly.org/">WebAssembly</a> IR generation. Currently, only expressions inside <code class="lang-kotlin">DoubleField</code> and <code class="lang-kotlin">IntRing</code> are supported.</p><div class="sample-container"><pre><code class="block lang-kotlin" theme="idea">import space.kscience.kmath.expressions.Symbol.Companion.x<br>import space.kscience.kmath.expressions.*<br>import space.kscience.kmath.operations.*<br>import space.kscience.kmath.wasm.*<br><br>MstField { x + 2 }.compileToExpression(DoubleField)</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">An example of emitted Wasm IR in the form of WAT:</p><div class="sample-container"><pre><code class="block lang-lisp" theme="idea">(func \$executable (param \$0 f64) (result f64)<br> (f64.add<br> (local.get \$0)<br> (f64.const 2)<br> )<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><h4 class=""> Limitations</h4><ul><li><p class="paragraph">ESTree expression compilation uses <code class="lang-kotlin">eval</code> which can be unavailable in several environments.</p></li><li><p class="paragraph">WebAssembly isn't supported by old versions of browsers (see https://webassembly.org/roadmap/).</p></li></ul><h2 class=""> Rendering expressions</h2><p class="paragraph">kmath-ast also includes an extensible engine to display expressions in LaTeX or MathML syntax.</p><p class="paragraph">Example usage:</p><div class="sample-container"><pre><code class="block lang-kotlin" theme="idea">import space.kscience.kmath.ast.*<br>import space.kscience.kmath.ast.rendering.*<br>import space.kscience.kmath.misc.*<br><br>@OptIn(UnstableKMathAPI::class)<br>public fun main() {<br> val mst = "exp(sqrt(x))-asin(2*x)/(2e10+x^3)/(12)+x^(2/3)".parseMath()<br> val syntax = FeaturedMathRendererWithPostProcess.Default.render(mst)<br> val latex = LatexSyntaxRenderer.renderWithStringBuilder(syntax)<br> println("LaTeX:")<br> println(latex)<br> println()<br> val mathML = MathMLSyntaxRenderer.renderWithStringBuilder(syntax)<br> println("MathML:")<br> println(mathML)<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">Result LaTeX:</p><p class="paragraph">$$\operatorname{exp}\\,\left(\sqrt{x}\right)-\frac{\frac{\operatorname{arcsin}\\,\left(2\\,x\right)}{2\times10^{10}+x^{3}}}{12}+x^{2/3}$$</p><p class="paragraph">Result MathML (can be used with MathJax or other renderers):</p><details><div class="sample-container"><pre><code class="block lang-html" theme="idea"><math xmlns="https://www.w3.org/1998/Math/MathML"><br> <mrow><br> <mo>exp</mo><br> <mspace width="0.167em"></mspace><br> <mfenced open="(" close=")" separators=""><br> <msqrt><br> <mi>x</mi><br> </msqrt><br> </mfenced><br> <mo>-</mo><br> <mfrac><br> <mrow><br> <mfrac><br> <mrow><br> <mo>arcsin</mo><br> <mspace width="0.167em"></mspace><br> <mfenced open="(" close=")" separators=""><br> <mn>2</mn><br> <mspace width="0.167em"></mspace><br> <mi>x</mi><br> </mfenced><br> </mrow><br> <mrow><br> <mn>2</mn><br> <mo>&times;</mo><br> <msup><br> <mrow><br> <mn>10</mn><br> </mrow><br> <mrow><br> <mn>10</mn><br> </mrow><br> </msup><br> <mo>+</mo><br> <msup><br> <mrow><br> <mi>x</mi><br> </mrow><br> <mrow><br> <mn>3</mn><br> </mrow><br> </msup><br> </mrow><br> </mfrac><br> </mrow><br> <mrow><br> <mn>12</mn><br> </mrow><br> </mfrac><br> <mo>+</mo><br> <msup><br> <mrow><br> <mi>x</mi><br> </mrow><br> <mrow><br> <mn>2</mn><br> <mo>/</mo><br> <mn>3</mn><br> </mrow><br> </msup><br> </mrow><br></math></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></details><p class="paragraph">It is also possible to create custom algorithms of render, and even add support of other markup languages (see API reference).</p></div><div class="content sourceset-dependent-content" data-togglable=":kmath-ast:dokkaHtmlPartial/jvmMain"><p class="paragraph">Extensions to MST API: transformations, dynamic compilation and visualization.</p><ul><li><p class="paragraph">src/commonMain/kotlin/space/kscience/kmath/ast/parser.kt : Expression language and its parser</p></li><li><p class="paragraph">src/jvmMain/kotlin/space/kscience/kmath/asm/asm.kt : Dynamic MST to JVM bytecode compiler</p></li><li><p class="paragraph">src/jsMain/kotlin/space/kscience/kmath/estree/estree.kt : Dynamic MST to JS compiler</p></li><li><p class="paragraph">src/commonMain/kotlin/space/kscience/kmath/ast/rendering/MathRenderer.kt : Extendable MST rendering</p></li></ul><h2 class=""> Artifact:</h2><p class="paragraph">The Maven coordinates of this project are <code class="lang-kotlin">space.kscience:kmath-ast: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-ast: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-ast: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=""> Parsing expressions</h2><p class="paragraph">In this module there is a parser from human-readable strings like <code class="lang-kotlin">"x^3-x+3"</code> (in the more specific reference/ArithmeticsEvaluator.g4) to MST instances.</p><p class="paragraph">Supported literals:</p><ol><li><p class="paragraph">Constants and variables (consist of latin letters, digits and underscores, can't start with digit): <code class="lang-kotlin">x</code>, <code class="lang-kotlin">_Abc2</code>.</p></li><li><p class="paragraph">Numbers: <code class="lang-kotlin">123</code>, <code class="lang-kotlin">1.02</code>, <code class="lang-kotlin">1e10</code>, <code class="lang-kotlin">1e-10</code>, <code class="lang-kotlin">1.0e+3</code>—all parsed either as <code class="lang-kotlin">kotlin.Long</code> or <code class="lang-kotlin">kotlin.Double</code>.</p></li></ol><p class="paragraph">Supported binary operators (from the highest precedence to the lowest one):</p><ol><li><p class="paragraph"><code class="lang-kotlin">^</code></p></li><li><p class="paragraph"><code class="lang-kotlin">*</code>, <code class="lang-kotlin">/</code></p></li><li><p class="paragraph"><code class="lang-kotlin">+</code>, <code class="lang-kotlin">-</code></p></li></ol><p class="paragraph">Supported unary operator:</p><ol><li><p class="paragraph"><code class="lang-kotlin">-</code>, e. g. <code class="lang-kotlin">-x</code></p></li></ol><p class="paragraph">Arbitrary unary and binary functions are also supported: names consist of latin letters, digits and underscores, can't start with digit. Examples:</p><ol><li><p class="paragraph"><code class="lang-kotlin">sin(x)</code></p></li><li><p class="paragraph"><code class="lang-kotlin">add(x, y)</code></p></li></ol><h2 class=""> Dynamic expression code generation</h2><h3 class=""> On JVM</h3><p class="paragraph"><code class="lang-kotlin">kmath-ast</code> JVM module supports runtime code generation to eliminate overhead of tree traversal. Code generator builds a special implementation of <code class="lang-kotlin">Expression<T></code> with implemented <code class="lang-kotlin">invoke</code> function.</p><p class="paragraph">For example, the following code:</p><div class="sample-container"><pre><code class="block lang-kotlin" theme="idea">import space.kscience.kmath.asm.compileToExpression<br>import space.kscience.kmath.operations.DoubleField<br><br>"x^3-x+3".parseMath().compileToExpression(DoubleField)</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">… leads to generation of bytecode, which can be decompiled to the following Java class:</p><div class="sample-container"><pre><code class="block lang-java" theme="idea">import java.util.*;<br>import kotlin.jvm.functions.*;<br>import space.kscience.kmath.asm.internal.*;<br>import space.kscience.kmath.complex.*;<br>import space.kscience.kmath.expressions.*;<br><br>public final class CompiledExpression_45045_0 implements Expression<Complex> {<br> private final Object[] constants;<br><br> public Complex invoke(Map<Symbol, ? extends Complex> arguments) {<br> Complex var2 = (Complex)MapIntrinsics.getOrFail(arguments, "x");<br> return (Complex)((Function2)this.constants[0]).invoke(var2, (Complex)this.constants[1]);<br> }<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">For <code class="lang-kotlin">LongRing</code>, <code class="lang-kotlin">IntRing</code>, and <code class="lang-kotlin">DoubleField</code> specialization is supported for better performance:</p><div class="sample-container"><pre><code class="block lang-java" theme="idea">import java.util.*;<br>import space.kscience.kmath.asm.internal.*;<br>import space.kscience.kmath.expressions.*;<br><br>public final class CompiledExpression_-386104628_0 implements DoubleExpression {<br> private final SymbolIndexer indexer;<br><br> public SymbolIndexer getIndexer() {<br> return this.indexer;<br> }<br><br> public double invoke(double[] arguments) {<br> double var2 = arguments[0];<br> return Math.pow(var2, 3.0D) - var2 + 3.0D;<br> }<br><br> public final Double invoke(Map<Symbol, ? extends Double> arguments) {<br> double var2 = ((Double)MapIntrinsics.getOrFail(arguments, "x")).doubleValue();<br> return Math.pow(var2, 3.0D) - var2 + 3.0D;<br> }<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">Setting JVM system property <code class="lang-kotlin">space.kscience.kmath.ast.dump.generated.classes</code> to <code class="lang-kotlin">1</code> makes the translator dump class files to program's working directory, so they can be reviewed manually.</p><h4 class=""> Limitations</h4><ul><li><p class="paragraph">The same classes may be generated and loaded twice, so it is recommended to cache compiled expressions to avoid class loading overhead.</p></li><li><p class="paragraph">This API is not supported by non-dynamic JVM implementations like TeaVM or GraalVM Native Image because they may not support class loaders.</p></li></ul><h3 class=""> On JS</h3><p class="paragraph">A similar feature is also available on JS.</p><div class="sample-container"><pre><code class="block lang-kotlin" theme="idea">import space.kscience.kmath.expressions.Symbol.Companion.x<br>import space.kscience.kmath.expressions.*<br>import space.kscience.kmath.operations.*<br>import space.kscience.kmath.estree.*<br><br>MstField { x + 2 }.compileToExpression(DoubleField)</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">The code above returns expression implemented with such a JS function:</p><div class="sample-container"><pre><code class="block lang-js" theme="idea">var executable = function (constants, arguments) {<br> return constants[1](constants[0](arguments, "x"), 2);<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">JS also supports experimental expression optimization with <a href="https://webassembly.org/">WebAssembly</a> IR generation. Currently, only expressions inside <code class="lang-kotlin">DoubleField</code> and <code class="lang-kotlin">IntRing</code> are supported.</p><div class="sample-container"><pre><code class="block lang-kotlin" theme="idea">import space.kscience.kmath.expressions.Symbol.Companion.x<br>import space.kscience.kmath.expressions.*<br>import space.kscience.kmath.operations.*<br>import space.kscience.kmath.wasm.*<br><br>MstField { x + 2 }.compileToExpression(DoubleField)</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">An example of emitted Wasm IR in the form of WAT:</p><div class="sample-container"><pre><code class="block lang-lisp" theme="idea">(func \$executable (param \$0 f64) (result f64)<br> (f64.add<br> (local.get \$0)<br> (f64.const 2)<br> )<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><h4 class=""> Limitations</h4><ul><li><p class="paragraph">ESTree expression compilation uses <code class="lang-kotlin">eval</code> which can be unavailable in several environments.</p></li><li><p class="paragraph">WebAssembly isn't supported by old versions of browsers (see https://webassembly.org/roadmap/).</p></li></ul><h2 class=""> Rendering expressions</h2><p class="paragraph">kmath-ast also includes an extensible engine to display expressions in LaTeX or MathML syntax.</p><p class="paragraph">Example usage:</p><div class="sample-container"><pre><code class="block lang-kotlin" theme="idea">import space.kscience.kmath.ast.*<br>import space.kscience.kmath.ast.rendering.*<br>import space.kscience.kmath.misc.*<br><br>@OptIn(UnstableKMathAPI::class)<br>public fun main() {<br> val mst = "exp(sqrt(x))-asin(2*x)/(2e10+x^3)/(12)+x^(2/3)".parseMath()<br> val syntax = FeaturedMathRendererWithPostProcess.Default.render(mst)<br> val latex = LatexSyntaxRenderer.renderWithStringBuilder(syntax)<br> println("LaTeX:")<br> println(latex)<br> println()<br> val mathML = MathMLSyntaxRenderer.renderWithStringBuilder(syntax)<br> println("MathML:")<br> println(mathML)<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">Result LaTeX:</p><p class="paragraph">$$\operatorname{exp}\\,\left(\sqrt{x}\right)-\frac{\frac{\operatorname{arcsin}\\,\left(2\\,x\right)}{2\times10^{10}+x^{3}}}{12}+x^{2/3}$$</p><p class="paragraph">Result MathML (can be used with MathJax or other renderers):</p><details><div class="sample-container"><pre><code class="block lang-html" theme="idea"><math xmlns="https://www.w3.org/1998/Math/MathML"><br> <mrow><br> <mo>exp</mo><br> <mspace width="0.167em"></mspace><br> <mfenced open="(" close=")" separators=""><br> <msqrt><br> <mi>x</mi><br> </msqrt><br> </mfenced><br> <mo>-</mo><br> <mfrac><br> <mrow><br> <mfrac><br> <mrow><br> <mo>arcsin</mo><br> <mspace width="0.167em"></mspace><br> <mfenced open="(" close=")" separators=""><br> <mn>2</mn><br> <mspace width="0.167em"></mspace><br> <mi>x</mi><br> </mfenced><br> </mrow><br> <mrow><br> <mn>2</mn><br> <mo>&times;</mo><br> <msup><br> <mrow><br> <mn>10</mn><br> </mrow><br> <mrow><br> <mn>10</mn><br> </mrow><br> </msup><br> <mo>+</mo><br> <msup><br> <mrow><br> <mi>x</mi><br> </mrow><br> <mrow><br> <mn>3</mn><br> </mrow><br> </msup><br> </mrow><br> </mfrac><br> </mrow><br> <mrow><br> <mn>12</mn><br> </mrow><br> </mfrac><br> <mo>+</mo><br> <msup><br> <mrow><br> <mi>x</mi><br> </mrow><br> <mrow><br> <mn>2</mn><br> <mo>/</mo><br> <mn>3</mn><br> </mrow><br> </msup><br> </mrow><br></math></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></details><p class="paragraph">It is also possible to create custom algorithms of render, and even add support of other markup languages (see API reference).</p></div> </div>
|
|
</div>
|
|
<h2 class="">Packages</h2>
|
|
<div class="table"><a data-name="1930886389%2FPackages%2F1542328537" anchor-label="space.kscience.kmath.asm" id="1930886389%2FPackages%2F1542328537" data-filterable-set=":kmath-ast:dokkaHtmlPartial/jvmMain"></a>
|
|
<div class="table-row" data-filterable-current=":kmath-ast:dokkaHtmlPartial/jvmMain" data-filterable-set=":kmath-ast:dokkaHtmlPartial/jvmMain">
|
|
<div>
|
|
<div class="main-subrow ">
|
|
<div class=""><span class="inline-flex">
|
|
<div><a href="space.kscience.kmath.asm/index.html">space.kscience.kmath.asm</a></div>
|
|
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1930886389%2FPackages%2F1542328537"></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>
|
|
<a data-name="72249916%2FPackages%2F353974653" anchor-label="space.kscience.kmath.ast" id="72249916%2FPackages%2F353974653" data-filterable-set=":kmath-ast:dokkaHtmlPartial/commonMain"></a>
|
|
<div class="table-row" data-filterable-current=":kmath-ast:dokkaHtmlPartial/commonMain" data-filterable-set=":kmath-ast:dokkaHtmlPartial/commonMain">
|
|
<div>
|
|
<div class="main-subrow ">
|
|
<div class=""><span class="inline-flex">
|
|
<div><a href="space.kscience.kmath.ast/index.html">space.kscience.kmath.ast</a></div>
|
|
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="72249916%2FPackages%2F353974653"></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 common-like">common</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div></div>
|
|
</div>
|
|
</div>
|
|
<a data-name="-622937510%2FPackages%2F353974653" anchor-label="space.kscience.kmath.ast.rendering" id="-622937510%2FPackages%2F353974653" data-filterable-set=":kmath-ast:dokkaHtmlPartial/commonMain"></a>
|
|
<div class="table-row" data-filterable-current=":kmath-ast:dokkaHtmlPartial/commonMain" data-filterable-set=":kmath-ast:dokkaHtmlPartial/commonMain">
|
|
<div>
|
|
<div class="main-subrow ">
|
|
<div class=""><span class="inline-flex">
|
|
<div><a href="space.kscience.kmath.ast.rendering/index.html">space.kscience.kmath.ast.rendering</a></div>
|
|
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-622937510%2FPackages%2F353974653"></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 common-like">common</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div></div>
|
|
</div>
|
|
</div>
|
|
<a data-name="-2000073002%2FPackages%2F-359754593" anchor-label="space.kscience.kmath.estree" id="-2000073002%2FPackages%2F-359754593" data-filterable-set=":kmath-ast:dokkaHtmlPartial/jsMain"></a>
|
|
<div class="table-row" data-filterable-current=":kmath-ast:dokkaHtmlPartial/jsMain" data-filterable-set=":kmath-ast:dokkaHtmlPartial/jsMain">
|
|
<div>
|
|
<div class="main-subrow ">
|
|
<div class=""><span class="inline-flex">
|
|
<div><a href="space.kscience.kmath.estree/index.html">space.kscience.kmath.estree</a></div>
|
|
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-2000073002%2FPackages%2F-359754593"></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 js-like">js</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div></div>
|
|
</div>
|
|
</div>
|
|
<a data-name="452572206%2FPackages%2F-359754593" anchor-label="space.kscience.kmath.wasm" id="452572206%2FPackages%2F-359754593" data-filterable-set=":kmath-ast:dokkaHtmlPartial/jsMain"></a>
|
|
<div class="table-row" data-filterable-current=":kmath-ast:dokkaHtmlPartial/jsMain" data-filterable-set=":kmath-ast:dokkaHtmlPartial/jsMain">
|
|
<div>
|
|
<div class="main-subrow ">
|
|
<div class=""><span class="inline-flex">
|
|
<div><a href="space.kscience.kmath.wasm/index.html">space.kscience.kmath.wasm</a></div>
|
|
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="452572206%2FPackages%2F-359754593"></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 js-like">js</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>
|
|
|