Skip to content

Commit a96bead

Browse files
committed
updated URLs
1 parent fa8a682 commit a96bead

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

_posts/2013-01-07-sugar-function-clamp.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ src: 2013-01-07-sugar-function-clamp.cpp
99
---
1010
Since the 0.10.* release series, Rcpp contains a new sugar function `clamp`
1111
which can be used to limit vectors to both a minimum and maximim value.
12-
[This recent StackOverflow question](http://stackoverflow.com/questions/13868963/clip-values-between-a-minimum-and-maximum-allowed-value-in-r/13870367#13870367) permitted `clamp` to
13-
shine. We retake some of the answers, including the `clamp` entry
14-
by Romain.
12+
[This recent StackOverflow question](http://stackoverflow.com/questions/13868963/clip-values-between-a-minimum-and-maximum-allowed-value-in-r/) permitted `clamp` to
13+
shine. We retake some of the answers, including the `clamp` [entry by Romain](http://stackoverflow.com/questions/13868963/clip-values-between-a-minimum-and-maximum-allowed-value-in-r/13870367#13870367).
1514

1615
We first define the three R versions.
1716

@@ -76,10 +75,10 @@ benchmark(pminpmaxClamp(x, a, b),
7675

7776
<pre class="output">
7877
test replications elapsed relative
79-
4 rcppClamp(x, a, b) 100 0.134 1.000
80-
3 operationsClamp(x, a, b) 100 0.509 3.799
81-
1 pminpmaxClamp(x, a, b) 100 0.532 3.970
82-
2 ifelseClamp(x, a, b) 100 5.266 39.299
78+
4 rcppClamp(x, a, b) 100 0.119 1.000
79+
3 operationsClamp(x, a, b) 100 0.505 4.244
80+
1 pminpmaxClamp(x, a, b) 100 0.530 4.454
81+
2 ifelseClamp(x, a, b) 100 5.268 44.269
8382
</pre>
8483

8584

src/2013-01-07-sugar-function-clamp.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88
*
99
* Since the 0.10.* release series, Rcpp contains a new sugar function `clamp`
1010
* which can be used to limit vectors to both a minimum and maximim value.
11-
* [This recent StackOverflow question]() permitted `clamp` to
12-
* shine. We retake some of the answers, including the `clamp` entry
13-
* by Romain.
11+
* [This recent StackOverflow question](http://stackoverflow.com/questions/13868963/clip-values-between-a-minimum-and-maximum-allowed-value-in-r/) permitted `clamp` to
12+
* shine. We retake some of the answers, including the `clamp` [entry by Romain](http://stackoverflow.com/questions/13868963/clip-values-between-a-minimum-and-maximum-allowed-value-in-r/13870367#13870367).
1413
*
1514
* We first define the three R versions.
1615
*/

0 commit comments

Comments
 (0)