Skip to content

Commit

Permalink
deploy: 32a605d
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonfly-ai committed Nov 8, 2023
1 parent b39328f commit cc2514b
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 34 deletions.
24 changes: 12 additions & 12 deletions basics/getting_started.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,19 +125,19 @@ <h2 id="creating-a-vector" class="section"><a class="anchor-link left" href="#cr

</span><span class="keyword">val</span><span> </span><span class="identifier">v_rand</span><span> = </span><span class="type-name">Vec</span><span>.</span><span class="identifier">random</span><span>[</span><span class="number-literal">5</span><span>]()
</span><span class="comment">// v_rand: Vec[5] = Array(
// -0.7486238910640207,
// -0.5983521572362768,
// -0.7491290760285536,
// -0.9939281554339586,
// -0.8634166368608758
// -0.7492673116093448,
// -0.8583776350687171,
// -0.12318137393689721,
// -0.18535867088406988,
// -0.031915533454888845
// )
</span><span class="keyword">val</span><span> </span><span class="identifier">v_rand_max_min</span><span> = </span><span class="type-name">Vec</span><span>.</span><span class="identifier">random</span><span>[</span><span class="number-literal">5</span><span>](</span><span class="number-literal">2.0</span><span>, </span><span class="number-literal">0.5</span><span>)
</span><span class="comment">// v_rand_max_min: Vec[5] = Array(
// 1.2490830072834167,
// 1.6541254273861339,
// 0.7622812872334197,
// 1.6707001401447044,
// 1.552328874239625
// 1.5778716348470616,
// 1.112660836947307,
// 1.8264744549877232,
// 1.689527778097455,
// 1.1603737671553749
// )</span></code></pre>
<p>And do some stuff</p>
<pre><code class="nohighlight"><span class="identifier">v</span><span> + </span><span class="identifier">v_fill</span><span>
Expand All @@ -159,10 +159,10 @@ <h2 id="creating-a-vector" class="section"><a class="anchor-link left" href="#cr
</span><span class="comment">// res6: Double = 3.0
</span><span>
</span><span class="identifier">v</span><span>.</span><span class="identifier">corr</span><span>(</span><span class="identifier">v_rand</span><span>)
</span><span class="comment">// res7: Double = -0.6699138866668766
</span><span class="comment">// res7: Double = 0.8679234841577796
</span><span>
</span><span class="identifier">v_rand</span><span>.</span><span class="identifier">elementRanks</span><span>
</span><span class="comment">// res8: Vec[5] = Array(4.0, 5.0, 3.0, 1.0, 2.0)</span></code></pre>
</span><span class="comment">// res8: Vec[5] = Array(2.0, 1.0, 4.0, 3.0, 5.0)</span></code></pre>


<hr class="footer-rule"/>
Expand Down
38 changes: 19 additions & 19 deletions demo/poisson.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,56 +127,56 @@ <h1 id="poisson-distribution" class="title">Poisson Distribution</h1>
</span><span class="comment">// res2: Double = 1.0
</span><span>
</span><span class="keyword">val</span><span> </span><span class="identifier">rand</span><span> = </span><span class="identifier">slash</span><span>.</span><span class="type-name">Random</span><span>.</span><span class="identifier">defaultRandom</span><span>
</span><span class="comment">// rand: Random = scala.util.Random@6a88472c
</span><span class="comment">// rand: Random = scala.util.Random@452a0908
</span><span class="keyword">type</span><span> </span><span class="type-name">N</span><span> = </span><span class="number-literal">10000</span><span>
</span><span class="keyword">val</span><span> </span><span class="identifier">v</span><span> : </span><span class="type-name">NArray</span><span>[</span><span class="type-name">Long</span><span>] = </span><span class="identifier">dist1</span><span>.</span><span class="identifier">sample</span><span>(</span><span class="number-literal">10000</span><span>, </span><span class="identifier">rand</span><span>)
</span><span class="comment">// v: Array[Long] = Array(
// 0L,
// 0L,
// 3L,
// 1L,
// 0L,
// 3L,
// 2L,
// 2L,
// 3L,
// 1L,
// 1L,
// 0L,
// 2L,
// 0L,
// 0L,
// 1L,
// 2L,
// 1L,
// 0L,
// 1L,
// 0L,
// 0L,
// 3L,
// 2L,
// 1L,
// 0L,
// 0L,
// 0L,
// 1L,
// 2L,
// 2L,
// 2L,
// 1L,
// 0L,
// 0L,
// 2L,
// 1L,
// 4L,
// 1L,
// 0L,
// 2L,
// 2L,
// 1L,
// 1L,
// 2L,
// 3L,
// 2L,
// 0L,
// 0L,
// 2L,
// 0L,
// 0L,
// 3L,
// 1L,
// 3L,
// 2L,
// 0L,
// 1L,
// 0L,
// 1L,
// 1L,
// 3L,
// 0L,
// 4L,
// 0L,
// 2L,
// ...</span></code></pre>
Expand Down
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ <h1 id="introduction" class="title">Introduction</h1>

<h2 id="importing" class="section"><a class="anchor-link left" href="#importing"><i class="icofont-laika link">&#xef71;</i></a>Importing</h2>
<p>To add this library to an sbt project</p>
<pre class="keep-together pdf epub"><code class="nohighlight"><span class="identifier">libraryDependencies</span><span> += </span><span class="string-literal">&quot;ai.dragonfly&quot;</span><span> %%% </span><span class="string-literal">&quot;slash&quot;</span><span> % </span><span class="string-literal">&quot;0.1&quot;</span></code></pre>
<pre class="keep-together pdf epub"><code class="nohighlight"><span class="identifier">libraryDependencies</span><span> += </span><span class="string-literal">&quot;ai.dragonfly&quot;</span><span> %%% </span><span class="string-literal">&quot;slash&quot;</span><span> % </span><span class="string-literal">&quot;0.2&quot;</span></code></pre>
<p>To use this library in ammonite / mill</p>
<pre class="keep-together pdf epub"><code class="nohighlight"><span class="keyword">import</span><span> </span><span class="identifier">$ivy</span><span>.`</span><span class="identifier">ai</span><span>.</span><span class="identifier">dragonfly</span><span>::</span><span class="identifier">slash</span><span>:</span><span class="number-literal">0.1</span></code></pre>
<pre class="keep-together pdf epub"><code class="nohighlight"><span class="keyword">import</span><span> </span><span class="identifier">$ivy</span><span>.`</span><span class="identifier">ai</span><span>.</span><span class="identifier">dragonfly</span><span>::</span><span class="identifier">slash</span><span>:</span><span class="number-literal">0.2</span></code></pre>
<p>scala-cli</p>
<pre class="keep-together pdf epub"><code class="nohighlight"><span class="identifier">using</span><span> </span><span class="identifier">dep</span><span> </span><span class="identifier">ai</span><span>.</span><span class="identifier">dragonfly</span><span>::</span><span class="identifier">slash</span><span>:</span><span class="number-literal">0.1</span></code></pre>
<pre class="keep-together pdf epub"><code class="nohighlight"><span class="identifier">using</span><span> </span><span class="identifier">dep</span><span> </span><span class="identifier">ai</span><span>.</span><span class="identifier">dragonfly</span><span>::</span><span class="identifier">slash</span><span>:</span><span class="number-literal">0.2</span></code></pre>

<h2 id="elevator-pitch" class="section"><a class="anchor-link left" href="#elevator-pitch"><i class="icofont-laika link">&#xef71;</i></a>Elevator pitch</h2>
<pre class="keep-together pdf epub"><code class="nohighlight"><span class="keyword">import</span><span> </span><span class="identifier">slash</span><span>.</span><span class="identifier">vector</span><span>.*
Expand Down

0 comments on commit cc2514b

Please sign in to comment.