Skip to content

Commit

Permalink
deploy: 187bb44
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonfly-ai committed Dec 4, 2023
1 parent acd52ed commit 9096d83
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 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.17627482664754146,
// -0.5839360817977578,
// -0.11581102143125077,
// -0.4523814776407402,
// -0.1333576014420259
// -0.6605316824505935,
// -0.4009225978960489,
// -0.9528065989624793,
// -0.9022530208000766,
// -0.234243822378708
// )
</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">0.5</span><span>, </span><span class="number-literal">2.0</span><span>)
</span><span class="comment">// v_rand_max_min: Vec[5] = Array(
// 1.069860052252976,
// 0.5891281340527432,
// 1.6783586476666879,
// 1.0746236830082183,
// 1.1248634974785758
// 1.3312959812005758,
// 1.5420304018198874,
// 1.700466552751754,
// 1.5568294043839201,
// 1.2050507761480889
// )</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.16178500179377547
</span><span class="comment">// res7: Double = 0.17823573863898573
</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(3.0, 1.0, 5.0, 2.0, 4.0)</span></code></pre>
</span><span class="comment">// res8: Vec[5] = Array(3.0, 4.0, 1.0, 2.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,58 +127,58 @@ <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@244ac6f8
</span><span class="comment">// rand: Random = scala.util.Random@185beda5
</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(
// 2L,
// 1L,
// 1L,
// 1L,
// 2L,
// 1L,
// 4L,
// 0L,
// 0L,
// 1L,
// 2L,
// 2L,
// 1L,
// 1L,
// 0L,
// 2L,
// 1L,
// 0L,
// 1L,
// 1L,
// 0L,
// 1L,
// 1L,
// 2L,
// 0L,
// 2L,
// 5L,
// 1L,
// 0L,
// 1L,
// 0L,
// 0L,
// 3L,
// 0L,
// 0L,
// 1L,
// 0L,
// 0L,
// 1L,
// 2L,
// 3L,
// 1L,
// 1L,
// 1L,
// 1L,
// 2L,
// 3L,
// 1L,
// 0L,
// 2L,
// 2L,
// 0L,
// 1L,
// 1L,
// 2L,
// 1L,
// 2L,
// 1L,
// 1L,
// 1L,
// 0L,
// 2L,
// 0L,
// 0L,
// 1L,
// 0L,
// ...</span></code></pre>

<h3 id="funsies" class="section"><a class="anchor-link left" href="#funsies"><i class="icofont-laika link">&#xef71;</i></a>Funsies</h3>
Expand Down

0 comments on commit 9096d83

Please sign in to comment.