You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .editorconfig
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -121,7 +121,7 @@ indent_style = tab
121
121
[*.{md,md.txt}]
122
122
indent_style = space
123
123
indent_size = 4
124
-
trim_trailing_whitespace = false
124
+
trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+57Lines changed: 57 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,63 @@
2
2
3
3
> Package changelog.
4
4
5
+
<sectionclass="release"id="unreleased">
6
+
7
+
## Unreleased (2025-01-10)
8
+
9
+
<sectionclass="features">
10
+
11
+
### Features
12
+
13
+
-[`1040b76`](https://github.com/stdlib-js/stdlib/commit/1040b76eca609dd8557525b79be6903dcf8c607d) - add C implementation for `stats/base/dists/triangular/variance`[(#4000)](https://github.com/stdlib-js/stdlib/pull/4000)
-[`1040b76`](https://github.com/stdlib-js/stdlib/commit/1040b76eca609dd8557525b79be6903dcf8c607d) - **feat:** add C implementation for `stats/base/dists/triangular/variance`[(#4000)](https://github.com/stdlib-js/stdlib/pull/4000)_(by Prashant Kumar Yadav, Philipp Burckhardt, stdlib-bot)_
38
+
39
+
</details>
40
+
41
+
</section>
42
+
43
+
<!-- /.commits -->
44
+
45
+
<sectionclass="contributors">
46
+
47
+
### Contributors
48
+
49
+
A total of 2 people contributed to this release. Thank you to the following contributors:
Copy file name to clipboardExpand all lines: README.md
+100-2Lines changed: 100 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,7 +92,7 @@ var variance = require( '@stdlib/stats-base-dists-triangular-variance' );
92
92
93
93
#### variance( a, b, c )
94
94
95
-
Returns the [variance][variance] of a [triangular][triangular-distribution] distribution with minimum support `a`, maximum support`b`, and mode `c`.
95
+
Returns the [variance][variance] of a [triangular][triangular-distribution] distribution with minimum support `a`, maximum support`b`, and mode `c`.
96
96
97
97
```javascript
98
98
var v =variance( 0.0, 1.0, 0.8 );
@@ -174,6 +174,104 @@ for ( i = 0; i < 10; i++ ) {
174
174
175
175
<!-- /.examples -->
176
176
177
+
<!-- C interface documentation. -->
178
+
179
+
* * *
180
+
181
+
<sectionclass="c">
182
+
183
+
## C APIs
184
+
185
+
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
double v = (double)rand() / ( (double)RAND_MAX + 1.0 );
247
+
return min + ( v*(max-min) );
248
+
}
249
+
250
+
int main( void ) {
251
+
double a;
252
+
double b;
253
+
double c;
254
+
double y;
255
+
int i;
256
+
257
+
for ( i = 0; i < 25; i++ ) {
258
+
a = random_uniform( 0.0, 10.0 );
259
+
b = random_uniform( 0.0, 10.0 ) + a;
260
+
c = a + (b - a) * random_uniform( 0.0, 1.0 );
261
+
y = stdlib_base_dists_triangular_variance( a, b, c );
262
+
printf( "a: %lf, b: %lf, c: %lf, Var(X;a,b,c): %lf\n", a, b, c, y );
263
+
}
264
+
}
265
+
```
266
+
267
+
</section>
268
+
269
+
<!-- /.examples -->
270
+
271
+
</section>
272
+
273
+
<!-- /.c -->
274
+
177
275
<!-- Section to include cited references. If references are included, add a horizontal rule *before* the section. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
178
276
179
277
<sectionclass="references">
@@ -216,7 +314,7 @@ See [LICENSE][stdlib-license].
0 commit comments