Skip to content

Commit

Permalink
deploy: 9a3ee36
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonfly-ai committed Dec 2, 2023
1 parent 1ecbc2e commit 695a2fc
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 30 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.45488120938209886,
// -0.011155066114074685,
// -0.2009308539397917,
// -0.2685019168006415,
// -0.37244052791915083
// -0.32445239132128845,
// -0.23684628666264962,
// -0.6639053219356185,
// -0.44388347816524487,
// -0.5524324610457888
// )
</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.2498882994054579,
// 1.5650396327655662,
// 1.9239609380373774,
// 0.7796997853568255,
// 1.4423766880816615
// 1.0477827127195027,
// 0.5498660198434693,
// 0.7282713710787302,
// 0.8226561667912669,
// 0.7149353275905236
// )</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.08581717784741394
</span><span class="comment">// res7: Double = -0.6121052959728247
</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(1.0, 5.0, 4.0, 3.0, 2.0)</span></code></pre>
</span><span class="comment">// res8: Vec[5] = Array(4.0, 5.0, 1.0, 3.0, 2.0)</span></code></pre>


<hr class="footer-rule"/>
Expand Down
36 changes: 18 additions & 18 deletions demo/poisson.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,57 +127,57 @@ <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@18f97631
</span><span class="comment">// rand: Random = scala.util.Random@294417a5
</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,
// 2L,
// 0L,
// 1L,
// 1L,
// 0L,
// 1L,
// 0L,
// 0L,
// 1L,
// 0L,
// 3L,
// 4L,
// 0L,
// 1L,
// 1L,
// 2L,
// 1L,
// 0L,
// 3L,
// 3L,
// 1L,
// 0L,
// 1L,
// 0L,
// 0L,
// 0L,
// 5L,
// 0L,
// 2L,
// 0L,
// 0L,
// 2L,
// 3L,
// 0L,
// 1L,
// 0L,
// 2L,
// 1L,
// 2L,
// 1L,
// 1L,
// 0L,
// 1L,
// 1L,
// 0L,
// 1L,
// 0L,
// 2L,
// 2L,
// 0L,
// 0L,
// 1L,
// 2L,
// 0L,
// 1L,
// 1L,
// 0L,
// 2L,
// 1L,
// 3L,
// 0L,
// 0L,
// 1L,
// 0L,
// ...</span></code></pre>

Expand Down

0 comments on commit 695a2fc

Please sign in to comment.