Skip to content

Commit

Permalink
Updating homework 3
Browse files Browse the repository at this point in the history
  • Loading branch information
gvegayon committed Oct 16, 2024
1 parent a0b4923 commit 110e920
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions 09-midterm/homework.html
Original file line number Diff line number Diff line change
Expand Up @@ -3103,7 +3103,7 @@ <h1 class="title">Homework 03 - Functions, Profiling, and Rcpp</h1>

<section id="due-date" class="level1">
<h1>Due date</h1>
<p>Tuesday, February 28</p>
<p>Thursday, October 31</p>
</section>
<section id="background" class="level1">
<h1>Background</h1>
Expand Down Expand Up @@ -3211,7 +3211,7 @@ <h2 class="anchored" data-anchor-id="part-1-vectorizing-code">Part 1: Vectorizin
</section>
<section id="part-2-c" class="level2">
<h2 class="anchored" data-anchor-id="part-2-c">Part 2: C++</h2>
<p>You can read more <a href="https://gvegayon.github.io/networks-udd2024/02-random-graphs.html#code-example-1">here</a>.</p>
<p>As we saw in the Rcpp week, vectorization may not be the best solution. For this part, you must write a function using Rcpp that implements the <a href="https://gvegayon.github.io/networks-udd2024/02-random-graphs.html#scale-free-networks">scale-free algorithm</a>. The following code implements this in R:</p>
<div class="cell">
<div class="sourceCode cell-code" id="cb4"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="do">## Model parameters</span></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a>n <span class="ot">&lt;-</span> <span class="dv">500</span></span>
Expand Down Expand Up @@ -3262,6 +3262,7 @@ <h2 class="anchored" data-anchor-id="part-2-c">Part 2: C++</h2>
</div>
</div>
</div>
<p>Rewrite the function that generates the scale-free network using Rcpp.</p>
</section>
</section>

Expand Down

0 comments on commit 110e920

Please sign in to comment.